Navigation

Supported MongoDB Commands

Beta

The Atlas Data Lake is available as a Beta feature. The product and the corresponding documentation may change at any time during the Beta stage. For support, see Request Support.

The following MongoDB query operations are supported by Data Lake.

Important

Some commands have special behavior in Data Lake that differs from standard MongoDB functionality.

To run a command against your Data Lake, use db.runCommand():

db.runCommand( { <command> } )

Aggregation Commands

Command Description
aggregate

The following limitations apply:

  • Only the explain and cursor options are supported.
  • The $collStats, $geoNear, $graphLookup, $indexStats, $listLocalSessions, $listSessions, and $out aggregation pipeline stages are not supported.
count

The following limitations apply:

  • count() is converted to an aggregation pipeline internal to Data Lake.
  • Only the query option is supported.

Diagnostic Commands

Command Description
buildInfo

The response returns the following fields:

ok
Returns 1 for success or 0 for failure.
version
The MongoDB client compatibility version. This is the earliest version of the MongoDB client with which the Data Lake service is compatible.
versionArray
The MongoDB client compatibility version in array format.
dataLake.version
The version number of Data Lake.
dataLake.gitVersion
The git version the Data Lake service.
dataLake.date
The build timestamp of the Data Lake service.

Example

{
  "ok" : <return>,
  "version" : "<version-number>",
  "versionArray" : [
    <number>,
    <number>,
    <number>,
    <number>
  ],
  "dataLake" : {
    "version" : "<version-number>",
    "gitVersion" : "<version-number>",
    "date" : "<timestamp>"
  }
}
collStats

The following fields are omitted from the response:

  • count
  • avgObjSize
  • capped
  • max
  • maxSize
  • wiredTiger
  • nindexes
  • totalIndexSize
  • indexSizes

The following fields are added to the response. You can use these fields to verify what S3 partitions are being used to populate a collection.

partitions.format
The file format of the S3 partition.
partitions.attributes
The filtering attributes of the S3 partition.
partitions.url
The URL of the backing data of the partition.
partitions.size
The size, in bytes, of the partition.
partitionCount
The number of partitions.
avgPartitionSize
The average size of all paritions.

Example

{
  ...
   "partitions": [{
      "format": <file format>,
       "attributes": <filtering attributes>,
       "url": <url to the backing data of the partition>,
       "size": <size, in bytes, of the partition>
      }, ...],
     "partitionCount": <number of partitions>,
     "avgPartitionSize": <average size of all partitions>
 ...
}
connectionStatus Returns information about the current connection, specifically the state of authenticated users and their available roles.
dbStats

The following fields are omitted from the response:

  • object
  • avgObjSize
  • fsUsedSize
  • fsTotalSize
explain

The data returned by explain documents the Data Lake query plan, and differs from MongoDB in that it provides information about the data partitions used to satisfy the query.

The following commands are explainable in Data Lake:

  • aggregate()
  • count()
  • find()

The verbosity option is not supported.

getLog The response returns successfully, but includes no log data.
getMore The MaxTimeMS option is not supported.
hostInfo

The reponse returns the following subset of fields from the standard MongoDB response:

{
   "ok" : <return>,
   "system" : {
          "currentTime" : ISODate("<timestamp>"),
          "hostname" : "<hostname>",
          "cpuAddrSize" : <number>,
          "memSizeMB" : <number>,
          "numCores" : <number>,
          "cpuArch" : "<identifier>",
   },
   "os" : {
          "type" : "<string>",
          "name" : "<string>",
   },
   "extra" : {
   },
}
ping Tests whether a server is responding to commands.
whatsmyuri Returns the client IP address.

Query and Write Operation Commands

Command Description
find

The following options are supported:

  • batchSize
  • singleBatch
  • filter
  • limit
  • projection
  • skip
  • sort

find() is converted to an aggregation pipeline internal to the Data Lake.

Authentication Commands

Command Description
authentication Data Lake uses SCRAM-SHA authentication.

Replication Commands

Command Description
isMaster

The response always returns a document in which isMaster: true. It also returns operational parameters.

The optional saslSupportedMechs field set to the <db.user> is supported.

Administration Commands

Command Description
killCursors Kills the specified cursor or cursors for a collection.
listCollections

Retrieves information about the collections in a database, such as collection names and options. The response contains information that can be used to create a cursor to the collection information.

The following options are supported:

  • filter (Exact match only.)
  • nameOnly
  • authorizedCollections
listDatabases

Provides a list of all existing databases. You must use the admin database to run the listDatabases command.

The following options are supported:

  • filter (Exact match only.)
  • nameOnly
  • authorizedDatabases

listDatabases always returns sizeOnDisk: 0 and empty: false so it can return quickly, without scanning all the files in the Data Lake.

Role Management Commands

Command Description
rolesInfo Returns inheritance and privilege information for specified roles.

User Management Commands

Command Description
usersInfo

Returns information about one or more users.

The forAllDBs argument is not supported.

Data Lake Commands

Command Description
storageGetConfig

Returns the current Data Lake configuration. For complete documentation on the configuration document format, see Configuration Document Format.

db.runCommand( { "storageGetConfig" : 1 } )
storageSetConfig

Replaces the current Data Lake configuration with a JSON document. For complete documentation on the configuration document format, see Configuration Document Format.

db.runCommand( { "storageSetConfig" : <config> } )