I am equally new and have the same difficulties. Did you finally get a solution to your worry?
what should we do to normal csv files before importing them to influxDB? Each time i try uploading I get the error message “Failed to upload the selected CSV: error in csv.from(): failed to read metadata: missing expected annotation datatype”
Nope, nothing yet. I’m going to play with it a little more today. I’m pretty sure its just my lack of understanding with the Syntax and how Tag, Measurement, etc, etc are used for particular data types. The documentation isn’t quite giving me that “ah ha” moment.
If I used the below link, I can import that CSV created from the examples in the documentation no problem. But I don’t understand why it works vs why it doesnt work with my data.
@derek,
you are writing CSV, but you are telling the tool that format is line protocol. Remove the --format param and you will get a more relevant error, that your CSV needs some data (field) columns.
Also, the dateTime must be in RFC3339 format. Correct: 2022-06-07T10:20:50.327Z
@Prince
Finally got time to focus on this for a bit this morning. Got it working with my own data. Here is my example that is confirmed to work. Remove “dryrun” and it actually posts to my testbucket.
My example2.csv file is the data below.
hostname,cpu,ram,loc,date
Host01,8,16,LOC,2022-06-07
Host02,16,16,LOC,2022-06-07
Host03,12,16,LOC,2022-06-07
Host04,4,40,LOC,2022-06-07