Reputation: 427
I have time series data in many csv files. The format is essentially this:
timestamp | type yyyy-MM-dd hh:mm:ss | value
I can import this easily enough using the mongoimport function. The options I've used create one document for every entry in the CSV file. Instead, I would like to import the data (using mongoimport) and transform it at the same time to a better or more appropriate schema for time-series data as described in this blog post
http://blog.mongodb.org/post/65517193370/schema-design-for-time-series-data-in-mongodb
The recommended approach is a document oriented design with multiple readings in one document. Is it possible to do this with mongoimport itself? Or should import it first and then transform it?
Upvotes: 0
Views: 713
Reputation: 4421
mongoimport is simply an "importer" for some data format.
As your source data with that format, you have to import first, then transform it to certain schema you expect.
Upvotes: 1