Here, we’ll use ChatGPT to help us get our database setup.
[Download Sample Listings](https://www.saas-product.com/wp-content/uploads/2023/11/sample-listings.json "sample-listings")
Prompt
I use mongosh to connect to this: mongosh -u adam -p dino --host=159.223.2.58
My authentication database is 'admin'
I have a file, '/Users/adamarthur/Desktop/sample-data.txt' that I want to upload into a 'throwaway-1' database into a 'listings' collection from my terminal on mac.
And the output is
mongoimport -u adam -p dino --host=159.223.2.58 --authenticationDatabase=admin --db throwaway-1 --collection listings --file /Users/adamarthur/Desktop/sample-listings.json
This imports the sample data into my database.