Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 导出Apple HealthKit数据_Mysql_Healthkit - Fatal编程技术网

Mysql 导出Apple HealthKit数据

Mysql 导出Apple HealthKit数据,mysql,healthkit,Mysql,Healthkit,我导出健康应用程序dataApple并希望导入到我的数据库中进行进一步开发。但是,当我运行以下命令时: load xml local infile 'PATHTOFILE' into Table Record rows identified by '<Record>' 什么也没发生。我试图修改从apple health app导出的文件中的两个标签 <ExportDate value="20150424105126+0800"/> <Me HKCharacter

我导出健康应用程序dataApple并希望导入到我的数据库中进行进一步开发。但是,当我运行以下命令时:

load xml local infile 'PATHTOFILE'
into Table Record
rows identified by '<Record>' 
什么也没发生。我试图修改从apple health app导出的文件中的两个标签

<ExportDate value="20150424105126+0800"/>
<Me HKCharacteristicTypeIdentifierDateOfBirth="" HKCharacteristicTypeIdentifierBiologicalSex="0" HKCharacteristicTypeIdentifierBloodType="0"/>

您是否通过其中一个在线格式检查程序运行过XML?XML文件很好,我发现问题可能发生在使用“row identified by*”时,它可能不适合我的XML文件。无论如何,谢谢~是的,我从未像那样将XML加载到MySQL中。只是CSV。无论如何,祝你好运!你能描述一下表格记录吗?可能是唯一密钥的问题。HealthData示例具有唯一的UUID,我将导出/导入UUID,以确保所有记录只导入一次。
<ExportDate value="20150424105126+0800"/>
<Me HKCharacteristicTypeIdentifierDateOfBirth="" HKCharacteristicTypeIdentifierBiologicalSex="0" HKCharacteristicTypeIdentifierBloodType="0"/>
<?xml version="1.0" encoding="UTF-8"?>
<HealthData locale="en_CA">
<ExportDate value="20150424105126+0800"/>
<Me HKCharacteristicTypeIdentifierDateOfBirth="" HKCharacteristicTypeIdentifierBiologicalSex="0" HKCharacteristicTypeIdentifierBloodType="0"/>
<Record type="HKQuantityTypeIdentifierStepCount" source="Mi Fit" unit="count" startDate="20150423120000+0800" endDate="20150423120100+0800" value="11.5365" recordCount="1"/>
<Record type="HKQuantityTypeIdentifierStepCount" source="Mi Fit" unit="count" startDate="20150423120100+0800" endDate="20150423120200+0800" value="11.5365" recordCount="1"/>
<Record type="HKQuantityTypeIdentifierStepCount" source="Mi Fit" unit="count" startDate="20150423120200+0800" endDate="20150423120300+0800" value="11.5365" recordCount="1"/>