Manage Insights assets (Collection, Folder, Query)¶
In general, these should be:
- Created in top-down order (collection, folder, query)
- Deleted in bottom-up order (query, folder, collection)1
erDiagram
Collection ||--o{ Folder : contains
Folder ||--o{ Query : contains
Collection¶
To create a Collection:
| Create a collection | |
|---|---|
1 2 3 4 | |
-
Build the minimum request to create a collection.
- provide an instance of
AtlanClient. - specify a human-readable name for your collection.
- (optional) specify the name of the group that can administer this collection.
You can use also use
adminUsers,viewerUsers,ownerUsers, etc to manage different levels of access control for the collection.
- provide an instance of
-
Actually call Atlan to create the collection. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClientthrough which to connect to the tenant.
| Create a collection | |
|---|---|
1 2 3 4 5 6 7 8 | |
-
Build the minimum request to create a collection
- provide an instance of
AtlanClient. - specify a human-readable name for your collection.
- provide an instance of
-
(optional) Specify the name of the group that can administer this collection. You can use also use
adminUsers,viewerUsers,ownerUsers, etc to manage different levels of access control for the collection. -
Actually call Atlan to create the collection.
| Create a collection | |
|---|---|
1 2 3 4 | |
-
Build the minimum request to create a collection.
- provide an instance of
AtlanClient. - specify a human-readable name for your collection.
- (optional) specify the name of the group that can administer this collection.
You can use also use
adminUsers,viewerUsers,ownerUsers, etc to manage different levels of access control for the collection.
- provide an instance of
-
Actually call Atlan to create the collection. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClientthrough 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 | |
- When creating a collection through API tokens, make sure your qualified
name follows this convention:
default/collection/<api-token-username-here>/<some-uuid4-string>. - Specify a human-readable name for your collection.
- (optional) Specify the name of the group that can administer this collection.
You can use also use
adminUsers,viewerUsers,ownerUsers, etc to manage different levels of access control for the collection.
Folder¶
To create a Folder:
| Create a folder | |
|---|---|
5 6 | |
-
Build the minimum request to create a folder.
- specify a human-readable name for your folder.
- provide an instance of
Collection, or if you want to create a sub-folder, provide an instance ofFolder.
-
Actually call Atlan to create the folder. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClientthrough which to connect to the tenant.
| Create a folder | |
|---|---|
9 10 11 12 13 14 15 16 17 18 19 | |
-
Build the minimum request to create a folder.
- specify a human-readable name for your folder.
- provide the
qualifiedNameof theCollection, or if you want to create a sub-folder, provide theparent_folder_qualified_name.
-
Actually call Atlan to create the folder.
| Create a folder | |
|---|---|
5 6 | |
-
Build the minimum request to create a folder.
- specify a human-readable name for your folder.
- provide an instance of
Collection, or if you want to create a sub-folder, provide an instance ofFolder.
-
Actually call Atlan to create the folder. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClientthrough 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 17 18 19 | |
- When creating a folder through API tokens, make sure your qualified
name follows this convention:
<parent-qualified-name>/<folder-name>. - Specify a human-readable name for your folder.
- In this example, we're creating a folder inside an existing collection;
therefore, we specify the
qualifiedNameof the collection here. If you're creating a sub-folder, you should provide thequalifiedNameof the parentFolder. - Specify the
qualifiedNameof the collection. - In this example, we're creating a folder inside an existing collection;
therefore, we specify the
qualifiedNameof the collection here. If you're creating a sub-folder, you should provide thequalifiedNameof the parentFolder.
Query¶
To create a Query:
| Create a query | |
|---|---|
7 8 9 10 11 | |
-
Build the minimum request to create a query.
- specify a human-readable name for your query.
- provide an instance of
Folder, or if you want to create a query inside a collectin, provide an instance ofCollection.
-
In this example, we're creating a query for an existing
Snowflakeschema. - Actually call Atlan to create the folder. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClientthrough which to connect to the tenant.
| Create a query | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
-
Build the minimum request to create a query.
- specify a human-readable name for your query.
- provide the qualifedName of the
Folder, or if you want to create a query inside a collection, provide thecollection_qualified_name.
-
In this example, we're creating a query for an existing
Snowflakeschema. - Actually call Atlan to create the folder.
| Create a query | |
|---|---|
7 8 9 10 11 | |
-
Build the minimum request to create a query.
- specify a human-readable name for your query.
- provide an instance of
Folder, or if you want to create a query inside a collectin, provide an instance ofCollection.
-
In this example, we're creating a query for an existing
Snowflakeschema. - Actually call Atlan to create the folder. Because this operation will persist the asset in Atlan, you must provide it an
AtlanClientthrough 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 17 18 19 20 21 22 23 24 25 26 27 | |
- When creating a query through API tokens, ensure that your
qualifiedNamefollows this convention:<parent-qualified-name>/<query-name>. - Specify a human-readable name for your query.
- Since we're creating a query for a
Snowflakeschema. - Provide the
qualifiedNameof theSnowflakeconnection. - Specify the raw SQL query.
- Provide the
qualifiedNameof theSnowflakeschema. - Provide the
qualifiedNameof theSnowflakedatabase. - In this example, we're creating a folder inside an existing collection; therefore, we specify the
qualifiedNameof the collection here. If you're creating a sub-folder, you should provide thequalifiedNameof the parent folder. - Specify the
qualifiedNameof the collection. - Since this is a non-visual query, ensure it is appropriately marked as such.
- In this example, we're creating a query inside an existing folder; therefore, we specify the
qualifiedNameof the folder here. If you're creating a query inside a collection, you should provide thequalifiedNameof the collection.
-
Although if you want to delete everything in a connection, your better avenue is the packaged connection delete utility in the UI. ↩