I've a product feed collection of different category of products. I get these feeds as CSV file and using mongoimport I'm importing data into MongoDB.
My problem is now I want to add additional fields while using mongoimport, i.e. 25 fields are there in CSV file but I want to add two more columns with static value for both of them.
For example,
25 fields + "category":"xyz" , "version":123456
For each category there is a distinct CSV file. So 35 category, 35 CSV files, and I want 35 different category and version values for each.
Programmatically it is possible to read CSV and while importing add those additional fields. Is there a way with mongoimport?