Importing CSV files
-
Hello,
I am trying to use the data source of type "data file" and want to import .csv files from a specified directory.
-
I created a testing directory on the mango box. Tested that the directory exists using the check file option on
the data source. -
Placed a .csv file in the testing directory.
The csv file contents is:
TIME, DP_TEST_VALUE
12/10/2014 7:09,-1
12/10/2014 7:24,-2
12/10/2014 7:30,-3 -
I added a data point to the data source called DP_TEST_VALUE in the .csv file.
I have data point details "Logging All".
I'm an seeing the value N/A value which is wrong. Not sure if the format is wrong. If someone can send me a link to
that can show a simple example as shown above that would be great.Cheers,
Gary C -
-
I tried the data file source with a CSV file that I've previously used to import some data to a point using the 'import data' function. I would expect that they use the same method for parsing data but, having skimmed the help file for the data file source (you have to write your own classes?), maybe not..
I couldn't get my data file source to work, but I didn't try very hard to figure it out, and it's not clear to me whether you need to create points for the DP_'s that you're importing, or what.
But maybe you'll find my CSV of some use anyway. I notice that you wrote 'TIME' but my file has 'Time', for example.Are you running Mango as root? Maybe it's a permissions issue.
Attachment: download link