Navigation

create

On this page

  • Syntax
  • Parameters
  • Output
  • Examples
  • Basic Example
  • Multiple Data Sources Example
  • Wildcard Usage Examples
  • Verify Collection
  • Troubleshoot Errors

The create command creates a collection for existing stores or a view on a collection in the Atlas Data Lake storage configuration.

The wildcard "*" can be used with the create command in two ways:

  • As the name of the collection to dynamically create collections that maps to files and folders in the specified file path on the stores data store.
  • In the path parameter to create a collection that maps to multiple files and folders in the specified file path on the stores data store.

Click on the tab to learn more about creating a collection or a view.

The command returns the following output if it succeeds. You can verify the results by running the commands in Verify Collection. If it fails, see Troubleshoot Errors below for recommended solutions.

{ ok: 1 }

You can verify that the command successfully created the collection or view by running one of the following commands:

show collections
db.runCommand({ "storageGetConfig" : 1 })
db.runCommand({ "listCollections" : 1 })
Give Feedback

On this page

  • Syntax
  • Parameters
  • Output
  • Examples
  • Basic Example
  • Multiple Data Sources Example
  • Wildcard Usage Examples
  • Verify Collection
  • Troubleshoot Errors