Thank you for the link @natac13!
In case this helps anyone… Don’t forget (like I did initially) to include the
--headerline tag in your mongoimport connection string if you are importing from a csv file. Specifying
--headerline instructs mongoimport to
determine the name of the fields using the first line in the CSV file. I had to search my notes from M201: MongoDB Performance to remember how to import a csv file properly.
mongoimport --host <your-host> --ssl --username <your-username> --password <your-password> --authenticationDatabase admin --db <db-name> --collection <collection-name> --type csv --headerline --file listings.csv
Practice === remembering:-)
I have uploaded the
listing.csv file to my m042 cluster and I have noticed that when I try to create a geospatial heat map I do not have the option to choose
MEAN from the available list of aggregate commands under the
Intensity field (where I have dragged the
price field). I’m wondering if it has something to do with the fact that the coordinates latitude and longitude are stored as separate strings, rather than being embedded within an object with a
"type" of "Point". I’m wondering if I could, or should, create or
add a new field to store the coordinates in order to get this to work, but I’m not sure how to do this in Charts.