I have sports watch data which measures heart rate, calories, strides taken etc.
I have created a database and table in cloud9 and was wondering if there is a way to import the .tsv data. I also have a copy of the raw data as .txt saved on cloud9 if that is easier to work with?
I am new with sql and its my 1st year in university could use some help with this as I don't understand a method on how to do it.
LOAD DATA INFILE 'all_project_database/MeanMachine/data/data_all.tsv' INTO TABLE Patients;
ERROR 13 (HY000): Can't get stat of '/var/lib/mysql/all_project_database/MeanMachine/data/data_all.tsv' (Errcode: 2)
any help is much appreciated, thank you in advance.
MySQL has a command LOAD DATA INFILE:
https://dev.mysql.com/doc/refman/5.5/en/loading-tables.html
It should be able to solve your problem.
UPDATE: to correct the error, you need a slash in your file path:
LOAD DATA INFILE '/all_project_database/MeanMachine/data/data_all.tsv' INTO TABLE Patients;
assuming you do have a file at that location. To check if you do:
ls -l /all_project_database/MeanMachine/data/data_all.tsv
I moved the .tsv file into the mysql directory and it the code worked! Thanks for help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With