Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect collection name in multiple versions of the documentation #318

Closed
YHatahet opened this issue Dec 15, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@YHatahet
Copy link

In the "Relate your MongoDB deployment" pages for channels 5/stable and 6/edge, the collections names are mismatched. At the first part it says to create it as "test-collection" and right under it, it is being used as "test_collection" with an underscore rather than a hyphen.

"""
This is the name of the database we specified when we first deployed the data-integrator charm. To create a collection in the “test-database” and then show the collection enter:

db.createCollection("test-collection")   <----- Here
show collections

Now insert a document into this database:

db.test_collection.insertOne(      <----- Here
  {
    First_Name: "Jammy",
    Last_Name: "Jellyfish",
  })

You can verify this document was inserted by running:

db.**test_collection**.find()  <----- Here
@YHatahet YHatahet added the bug Something isn't working label Dec 15, 2023
Copy link

@MiaAltieri
Copy link
Contributor

Hi @YHatahet Thanks for your message.

The tutorials are actually correct as is, but perhaps the tutorial should be changed.

In mongosh commands - is not a valid character so even though the collection is created with - , when we must to the collection with MongoDB with _.

If this is confusing, try to run:

db.test-collection.insertOne(     
  {
    First_Name: "Jammy",
    Last_Name: "Jellyfish",
  })

this will fail because the - character is not valid in mongosh commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants