Unable to import csv file to time-series collection using Compass

When trying to import csv file into a time-series collection, I got an error: ‘startAt’ must be present and contain a valid BSON UTC datetime value. I tried several formats, “2022-01-01T00:05:00.000+00:00”, “2022-01-01T00:05:00.000Z”, “2022-01-01T00:05:00Z”, etc. but none of them worked. Here is the data I used:

loadId, startAt, value
“632f85238b50ca44b3720982”, “2022-01-01T00:05:00.000+00:00”, 5213.2
“632f85238b50ca44b3720982”, “2022-01-01T00:10:00.000+00:00”, 4987.4

here is the error I got:

Any suggestions on how to import time-series data from csv file would be appreciated. Thanks.

Buck

Thanks for reporting this. I reproduced this locally and get the same error. It seems to be the fact that the CSV file has spaces after the commas. That’s confusing the date parsing. I verified this by importing the file into a non-timeseries collection. Compass turns all the startAt fields into the 1970 unix epoch.

Simply removing the spaces fixes it. By the way: The quotes are also not needed in this case.

I’ll file an issue on our end as well. I think we should either be resilient to the comma followed by space format variant or we should make it much clearer to the user that that’s wrong.