CSV file import

I have been trying to import a csv with heart rate reading from my smart band into influxdb. The file was originally in json and had many stuff i didn’t need.
After converting to csv and striping out the columns i didn’t need, i tried importing it through the CLI but kept getting lots of errors.
After reading the help pages and trying to figure out what was missing i ended up with something like this:

#constant measurement,HR
#datatype dateTime:number,long,tag
time,measurment,type
1647267060000,81,HeartRate
1647267120000,88,HeartRate
1647267180000,95,HeartRate
1647267240000,105,HeartRate
1647267300000,74,HeartRate
1647267480000,78,HeartRate

This one doesn’t give any errors and it seems to import fine but when i go to the data explorer in the GUI, there isn’t anything there.
The time i’m providing isn’t in nanoseconds and i can’t seem to find online a way to put in the headers that i want to import it as milliseconds. Is that the problem?
Also, the official help pages seem to conflict with what we can find online in forums, github, etc.
There are lot’s of information on GitHub - influxdata/influxdb2-sample-data: Sample data for InfluxDB 2.0 for example that i can’t seem to find on the official webpages.
Even so, i’ve tried adapting my columns with other names and trying other header values but i either get errors or a supposedly “empty” bucket.
Anyone can lend an hand?

Hi @nikkoaki,
So I would make sure to check out the data schema of InfluxDB aswell.

_time 
_measurments
_tags
_fields

In your case, I would see your structure being

_time 1647267060000
_measurments healthband
_tags bandID
_fields HeartRate

So in your case it would look more like this:

#datatype measurement,tag,double,dateTime:number
m,bandID,HeartRate,time
healthband,band1,8,1647267060000
healthband,band1,88,1647267120000
healthband,band1,
healthband,band1,
healthband,band1,
healthband,band1,

First i tried using the #constant header to add those columns
Then i made a csv file exactly like the one you proposed

#datatype measurement,tag,double,dateTime:number
m,BandID,Heartrate,time
Healthband,band1,81,1647267060000
Healthband,band1,88,1647267120000
Healthband,band1,95,1647267180000
Healthband,band1,105,1647267240000
Healthband,band1,74,1647267300000
Healthband,band1,78,1647267480000
Healthband,band1,74,1647267540000
Healthband,band1,69,1647267900000

But still nothing

Then i remembered that influxdb uses nanoseconds by default and that time is in milliseconds so i added “-precision ms” on the CLI command and it finally worked.
I probably had this working in the past and i was just choosing the wrong time range, hence having no results on the GUI.
Thanks a bunch.