Insertmany command ran successful but cant see data in compass

Hi All,

I have tried the unordered insert many option and the command says it ran successful. two records got inserted. But in compass its not showing, i have refreshed the data too.

When i try to rerun it says duplicate, is that am i missing anything.

@Natarajan_48642 where did you run it from? mongo shell?
Check the database that you’re connected to.

Hi @Natarajan_48642,

It was ordered or unordered ?

Please make sure you have inserted the data into the video database of your sandbox cluster. You should be able to see the two documents that got inserted in your database from Compass as well.

In any collection you can’t have two documents with the same value for the _id field. In this case, when you ran the command for the first time, the data got inserted and when you ran the same command again, you got a duplicate error because the data was already there.

Hope it helps!

If you have any other issue, please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

my experience is that Compass does not refresh. so the data is there but not showing in Compass. I was pressing the ‘redo’ circular arrow. Instead, just by chance I moved between collections - and then it refreshed and showed the data.

Can you reproduce the problem?

Hi @James_58604,

In order to be able to file a ticket for this issue, I would need some more actionable information. Can you please provide the following information?

  1. Steps to reproduce the problem
  2. What was the expected outcome
  3. What was the actual outcome

Thanks,
Shubham Ranjan
Curriculum Support Engineer

greetings, was just trying to aid the poster…but I did now just double check this and as per my first post above…Compass doesn’t refresh to show newly inserted documents upon press of the circular arrow. Not sure a screen shot of that is all that helpful…and not sure if the circular arrow is suppose to do that refresh - I was just guessing/assuming it should…

I had Compass opened to the Collection - and then using command prompt did the InsertMany - - was expecting maybe to see the Collection increase in real time…nothing…then pressed the circular arrow - - still nothing…but I had gotten a acknowledge in command prompt and so felt the records must be there…

I have Compass downloaded earlier this week for the first time - am brand new to all of MongoDB.

so when I move between collections then the refresh does work and now it displays the new records. it’s not really a biggie but if you don’t know about it - it can hang someone up…

Hi @James_58604,

Thanks for providing your valuable feedback. I have forwarded it to the relevant team and they are looking into it.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

According to this JIRA, this problem was fixed in the Beta release 1.20.0