You can save queries to re-run them later, schedule them, or share them.
Save a query
To save a query:
- Open the query in Insights.
- At the top right of the query, click the Save button.
- In the resulting Save query dialog, enter the following details:
- For Query name, enter a name for the query.
- (Optional) For Description, add a description for the query.
- For Collection, you can either:
- If you have access to existing collections, click the Choose collection dropdown to select an existing collection.
- If you do not have any existing collections, click the Create Collection button. In the Create collection dialog, enter the following details:
- For Name, enter a name for the collection.
- (Optional) To the left of the name, click the image icon to choose an icon for the collection.
- (Optional) For Description, describe the collection.
- (Optional) For Share, select other users or groups that can access the collection. (See below for more details.)
- At the bottom of the Create Collection dialog, click Create.
- (Optional) For Certificate, click the No certification dropdown to assign a certificate to the query.
- (Optional) For Linked terms, click the Select terms dropdown to assign a term to the query.
- At the bottom of the dialog:
- To only save your query, click Save.
- To save and share your query, click Save and share.
- In the Query saved dialog, enter the following details:
- For Add users or groups, select other users or groups that can access the saved query.
- (Optional) To the right of the user or group, click the Editor dropdown to change the sharing permissions:
- Viewer allows users to view and run all queries in the collection, but not edit them.
- Editor allows users to view, run, and edit all queries in the collection.
- Click Invite to invite the users or groups.
- (Optional) To the right of the user or group, click the Editor dropdown to change the sharing permissions:
- (Optional) Click Copy Link to copy the link for the saved query to share with others in your team.
- (Optional) Click the Slack or Teams button to share directly on Slack or Microsoft Teams, respectively.
- For Add users or groups, select other users or groups that can access the saved query.
- Click Done to confirm your selections.
- In the Query saved dialog, enter the following details:
Share a query collection
A collection helps you organize saved queries in Atlan. A collection could represent a topic, department, or team with similar saved queries under one roof. Within each collection, you can have a folder that contains multiple saves queries of a similar type.Â
To share a collection of queries:
- Open Insights.
- In the upper left, click the papers-in-a-box icon.
- Under the icon, click the name of the selected query collection.
- From the resulting list of collections, hover over the collection you want to share.
- Click the 3-dot icon to the right of the collection name and choose Edit collection.
- In the Edit collection dialog, under Share:
- Search for users or groups with whom to share the collection.
- (Optional) To the right of the user or group, click the Can edit dropdown to change the sharing permissions:
- Can edit allows users to view, run, and edit all queries in the collection.
- Can view allows users to view and run all queries in the collection, but not edit them.
- Repeat these steps for each user or group with whom you want to share the collection.
- At the bottom of the Edit collection dialog, click Update.
Move a saved query
To move a saved query to another query collection:
- Open Insights.
- In the upper left, click the papers-in-a-box icon.
- Under the icon, click the name of the selected query collection.
- From the resulting list of collections, hover over the collection from which you want to move a query.
- Click the 3-dot icon to the right of the saved query name, and then click Move to.
- In the Move to dialog, select the query collection to which you want to move your saved query.
- Click Move to complete moving the saved query.
To duplicate, rename, edit, or delete your saved query, click the 3-dot icon to the right of the saved query name and select the relevant option.
View query sidebar
Once you've saved a query, you can access the query sidebar to view additional context for your saved queries.
To open the query sidebar for a saved query:
- In the left Explorer panel in Insights, hover over a saved query and click the Open query sidebar icon.
- From the saved query sidebar in the right, you can:
- View details about your saved query in Overview, including the actual query. (Optional) You can add more details to your saved query:
- Click the star button to star the query for quick access.
- For Description, add a description to your saved query.
- Click +Add README to add a README to your saved query and provide more context.
- For Collection, click the collection name to view the query collection.
- Copy the SQL query or expand the query view to fullscreen.
- For Terms, add a term to link to your saved query.
- For Owners, update the owner of the saved query or add more owners.
- For Tags, attach a tag to your saved query.
- For Certificate, update the certification status of your saved query.
- Click the Relations tab to view queried assets.Â
- (Optional) Select a related asset to open the asset sidebar. From the asset sidebar, click the Queries tab to view the saved query auto-linked to the asset.
- Click the Activity tab to view the activity log for the saved query.
- Click the Schedules tab to view associated schedules for the saved query, if any.
- Click the Resources tab to view any linked resources.
- Click the Requests tab to view any requests on the saved query.
- Click the Properties tab to view query properties.
- Click the Slack or Teams tab to view Slack or Teams messages pertaining to the query.
- View details about your saved query in Overview, including the actual query. (Optional) You can add more details to your saved query:
Link saved queries
Once you have saved a query, the saved query will be auto-linked to all the assets queried or referenced in the SQL query. Linked queries are displayed in the asset profile and sidebar.
You might want to link it to other assets, too. This can help you provide additional context on the assets and quickly find the saved query. For such assets, you can link the saved query as a resource.
To link a saved query to an asset:
- Open Insights.
- In the upper left, click the papers-in-a-box icon.
- Under the icon, click the name of a query collection.
- From the resulting list of collections, select a collection and then select the saved query you want to link as a resource.
- To copy the link for a saved query, you can either:
- Click the 3-dot icon to the right of the saved query name and then click Copy link.
- In the top right of the query editor, click the 3-dot icon and then click Share. From the Share menu, click Copy link.
- From the left of menu, click Assets to navigate to your assets.
- From the Assets page, select an asset to open the asset sidebar.
- From the asset sidebar on the right, click the Resources tab and then click + Add resource.
- In the Add Resource dialog, enter the following details:
- For Link, paste the saved query link you copied in Insights.
- For Title, add a title for your saved query.
- Click Add to add the saved query as a resource to the asset.