Manage DocumentDB assets¶
Operations on DocumentDB assets (connections, databases, collections).
In general, these should be:
- Created in top-down order (connection, then database, then collection)
- Deleted in bottom-up order (collections, then databases, then connections)1
erDiagram
Connection ||--o{ DocumentDBDatabase : contains
DocumentDBDatabase ||--o{ DocumentDBCollection : contains
Asset structure¶
Connection¶
A DocumentDB connection requires a name
and qualifiedName
. For creation, specific settings are also required to distinguish it as a DocumentDB connection rather than another type of connection. In addition, at least one of adminRoles
, adminGroups
, or adminUsers
must be provided.
Create a DocumentDB connection | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
- Build up the minimum request to create a connection.
- Provide a human-readable name for your connection, such as
production
ordevelopment
. - Set the type of connection to DocumentDB.
- List the workspace roles that should be able to administer the connection (or null if none). All users with that workspace role (current and future) will be administrators of the connection. Note that the values here need to be the GUID(s) of the workspace role(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List the group names that can administer this connection (or null if none). All users within that group (current and future) will be administrators of the connection. Note that the values here are the name(s) of the group(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List the user names that can administer this connection (or null if none). Note that the values here are the username(s) of the user(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - Actually call Atlan to create the connection. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClient
through which to connect to the tenant. - Retrieve the qualifiedName for use in subsequent creation calls. (You'd probably want to do some null checking first.)
Create a DocumentDB connection | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
- Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
- Build up the minimum request to create a connection.
- Provide a human-readable name for your connection, such as
production
ordevelopment
. - Set the type of connection to DocumentDB.
- List the workspace roles that should be able to administer the connection (or
None
if none). All users with that workspace role (current and future) will be administrators of the connection. Note that the values here need to be the GUID(s) of the workspace role(s). At least one ofadmin_roles
,admin_groups
, oradmin_users
must be provided. - List the group names that can administer this connection (or
None
if none). All users within that group (current and future) will be administrators of the connection. Note that the values here are the name(s) of the group(s). At least one ofadmin_roles
,admin_groups
, oradmin_users
must be provided. - List the user names that can administer this connection (or
None
if none). Note that the values here are the username(s) of the user(s). At least one ofadmin_roles
,admin_groups
, oradmin_users
must be provided. - Actually call Atlan to create the connection.
- Retrieve the
qualified_name
for use in subsequent creation calls. (You'd probably want to do some null checking first.)
Create a DocumentDB connection | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
- Build up the minimum request to create a connection.
- Provide a human-readable name for your connection, such as
production
ordevelopment
. - Set the type of connection to DocumentDB.
- List the workspace roles that should be able to administer the connection (or null if none). All users with that workspace role (current and future) will be administrators of the connection. Note that the values here need to be the GUID(s) of the workspace role(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List the group names that can administer this connection (or null if none). All users within that group (current and future) will be administrators of the connection. Note that the values here are the name(s) of the group(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List the user names that can administer this connection (or null if none). Note that the values here are the username(s) of the user(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - Actually call Atlan to create the connection. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClient
through which to connect to the tenant. - Retrieve the qualifiedName for use in subsequent creation calls. (You'd probably want to do some null checking first.)
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
- The
typeName
must be exactlyConnection
. - Human-readable name for your connection, such as
production
ordevelopment
. - The
connectorName
must be exactlydocumentdb
. - The
qualifiedName
should follow the pattern:default/documentdb/<epoch>
, where<epoch>
is the time in milliseconds at which the connection is being created. - The
category
must bedatabase
. - List any workspace roles that can administer this connection. All users with that workspace role (current and future) will be administrators of the connection. Note that the values here need to be the GUID(s) of the workspace role(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List any groups that can administer this connection. All users within that group (current and future) will be administrators of the connection. Note that the values here are the name(s) of the group(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List any users that can administer this connection. Note that the values here are the username(s) of the user(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided.
Access policies
Atlan creates the policies that grant access to a connection, including the ability to retrieve the connection and to create assets within it, asynchronously. It can take several seconds (even up to approximately 30 seconds) before these are in place after creating the connection.
You may therefore need to wait before you'll be able to create the assets below within the connection.
To confirm access, retrieve the connection after it has been created. The SDKs' retry loops will automatically retry until the connection can be successfully retrieved. At that point, your API token has permission to create the other assets.
Note: if you are reusing an existing connection rather than creating one via your API token, you must give your API token a persona that has access to that connection. Otherwise all attempts to create, read, update, or delete assets within that connection will fail due to a lack of permissions.
DocumentDBDatabase¶
A DocumentDB database requires a name
and a qualifiedName
. For creation, you also need to specify the connectionQualifiedName
of the connection for the database.
Create a DocumentDB database | |
---|---|
11 12 13 14 15 16 17 |
|
- Build up the minimum request to create a DocumentDB database.
- Provide a human-readable name for your database.
- Provide the qualifiedName of the connection for this database.
- Optionally provide additional metadata about the database.
- Actually call Atlan to create the database. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClient
through which to connect to the tenant. - Retrieve the created database for use in subsequent creation calls. (You'd probably want to do some null checking first.)
Create a DocumentDB database | |
---|---|
17 18 19 20 21 22 23 |
|
- Build up the minimum request to create a DocumentDB database.
- Provide a human-readable name for your database.
- Provide the qualifiedName of the connection for this database.
- Optionally provide additional metadata about the database.
- Actually call Atlan to create the database.
- Retrieve the created database for use in subsequent creation calls. (You'd probably want to do some null checking first.)
Create a DocumentDB database | |
---|---|
11 12 13 14 15 16 17 |
|
- Build up the minimum request to create a DocumentDB database.
- Provide a human-readable name for your database.
- Provide the qualifiedName of the connection for this database.
- Optionally provide additional metadata about the database.
- Actually call Atlan to create the database. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClient
through which to connect to the tenant. - Retrieve the created database for use in subsequent creation calls. (You'd probably want to do some null checking first.)
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
- The
typeName
must be exactlyDocumentDBDatabase
. - Human-readable name for your database.
- The
qualifiedName
should follow the pattern:default/documentdb/<epoch>/<database_name>
, wheredefault/documentdb/<epoch>
is the qualifiedName of the connection for this asset and<database_name>
is the name of the database. - The
connectionQualifiedName
must be the exact qualifiedName of the connection for this asset. - The
connectorName
must be the same value as the connector type used when creating the connection. - Optionally include additional metadata about the database.
DocumentDBCollection¶
A DocumentDB collection requires a name
and a qualifiedName
. For creation, you also need to specify the databaseQualifiedName
of the database that contains the collection.
Create a DocumentDB collection | |
---|---|
18 19 20 21 22 23 24 25 |
|
- Build up the minimum request to create a DocumentDB collection.
- Provide a human-readable name for your collection.
- Provide the qualifiedName of the database that contains this collection.
- Optionally provide the schema definition for the collection.
- Optionally specify whether the collection is capped or not.
- Optionally provide additional metadata about the collection.
- Actually call Atlan to create the collection. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClient
through which to connect to the tenant.
Create a DocumentDB collection | |
---|---|
24 25 26 27 28 29 30 31 |
|
- Build up the minimum request to create a DocumentDB collection.
- Provide a human-readable name for your collection.
- Provide the qualifiedName of the database that contains this collection.
- Optionally provide the schema definition for the collection.
- Optionally specify whether the collection is capped or not.
- Optionally provide additional metadata about the collection.
- Actually call Atlan to create the collection.
Create a DocumentDB collection | |
---|---|
18 19 20 21 22 23 24 25 |
|
- Build up the minimum request to create a DocumentDB collection.
- Provide a human-readable name for your collection.
- Provide the qualifiedName of the database that contains this collection.
- Optionally provide the schema definition for the collection.
- Optionally specify whether the collection is capped or not.
- Optionally provide additional metadata about the collection.
- Actually call Atlan to create the collection. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClient
through which to connect to the tenant.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
- The
typeName
must be exactlyDocumentDBCollection
. - Human-readable name for your collection.
- The
qualifiedName
should follow the pattern:default/documentdb/<epoch>/<database_name>/<collection_name>
, wheredefault/documentdb/<epoch>/<database_name>
is the qualifiedName of the database that contains this collection. - The
databaseQualifiedName
must be the exact qualifiedName of the database that contains this collection. - The
connectorName
must be the same value as the connector type used when creating the connection. - Optionally provide the schema definition for the collection.
- Optionally specify whether the collection is capped or not.
- Optionally provide additional metadata about the collection.
Additional collection properties¶
The DocumentDBCollection
asset type has a number of specific properties that you can use to provide more detailed information:
documentDBCollectionAverageObjectSize
: Average size of an object in the collectiondocumentDBCollectionExpireAfterSeconds
: Seconds after which documents in a time series collection or clustered collection expiredocumentDBCollectionMaxSize
: Maximum size allowed in a capped collectiondocumentDBCollectionMaximumDocumentCount
: Maximum number of documents allowed in a capped collectiondocumentDBCollectionNumOrphanDocs
: Number of orphaned documents in the collectiondocumentDBCollectionSubtype
: Subtype of a DocumentDB collection (e.g., Capped, Time Series, etc.)documentDBCollectionTimeField
: Name of the field containing the date in each time series documentdocumentDBCollectionTimeGranularity
: Closest match to the time span between consecutive incoming measurementsdocumentDBCollectionTotalIndexSize
: Total size of all indexes
Available relationships¶
Each DocumentDB asset is an Asset
, and can therefore be related to the following other assets.
erDiagram
Asset }o--o{ AtlasGlossaryTerm : meanings
Asset ||--o{ Link : links
Asset ||--o| Readme : readme
Asset }o--o{ Process : inputToProcesses
Asset }o--o{ Process : outputFromProcesses
AtlasGlossaryTerm¶
A glossary term provides meaning to an asset. The link terms to assets snippet provides more detail on setting this relationship.
Link¶
A link provides additional context to an asset, by providing a URL to additional information.
Readme¶
A README provides rich documentation for an asset. The add asset READMEs snippet provides more detail on setting this relationship.
Process¶
A process provides lineage information for an asset. An asset can be both an input and an output for one or more processes. The lineage snippets provide more detail on creating and working with lineage.
-
Note that unlike other assets, the packaged connection delete utility in the UI will not remove DocumentDB assets associated with the connection. So the DocumentDB assets themselves must be deleted, separately from the connection. ↩