Skip to main content
Save my spot
TL;DR

Enable reverse sync to push asset descriptions authored in Atlan back to Snowflake as comments.

Your AI can read this via Docs MCPcurl -fsSL "https://docs.atlan.com/install-docs-mcp" | bashConnect

Push description updates to Snowflake

Atlan can push the descriptions that you write in Atlan back to Snowflake as comments on the matching objects. Your Snowflake comments then match the descriptions that your data stewards maintain in Atlan.

Description reverse sync is event driven. There is no workflow to schedule and no crawl to run. After you enable it for a connection, Atlan applies each description edit to Snowflake. Atlan only sets the comment on an existing Snowflake object. It doesn't create, drop, or recreate any object, and it doesn't change ownership or grants. For the asset types that Atlan supports and the statement it runs for each one, see Description reverse sync statements.

Reverse sync for Snowflake covers two kinds of metadata, and you enable each of them separately:

  • Descriptions: enabled per connection on the Snowflake connector, as described on this page.
  • Tags: enabled per tag in the Governance center.

Enabling one of them has no effect on the other.

Did you know?

The Asset description reverse sync app also writes Atlan descriptions to Snowflake. Description reverse sync on the connector offers the same kind of asset filters as the app, and it can write to the app's audit table. The app also runs on a schedule, and it offers a dry run, offline SQL generation, and a separate Snowflake credential. If you need these options, use the app.

Prerequisites​

Before you enable description reverse sync, make sure that you have the following:

  • An existing Snowflake connection in Atlan, with the assets you want to enrich already crawled. The connection must connect to Snowflake directly. Description reverse sync isn't available for connections that use the self-deployed agent.
  • Permission to modify the Snowflake workflow configuration in Atlan.
  • A Snowflake database and schema for the audit table, where Atlan records each statement that it runs. For details, see Configure audit trail.
  • A Snowflake administrator who can grant the privileges to set comments and to write the audit table, as described in Grant Snowflake privileges.

Grant Snowflake privileges​

Snowflake lets only a role with the OWNERSHIP privilege on an object set its comment. This applies to every object type Atlan writes to, including databases, schemas, and functions. A role that can see an object but doesn't own it gets an Insufficient privileges error. The same grants work for both extraction methods.

Atlan connects with the user and role of your Snowflake connection, and it activates all secondary roles of that user. Atlan can set a comment on an object when the role that owns the object is one of the following:

  • The connection role, or a role granted to the connection role.
  • A role granted to the connection user.
    • A granted role gives the Atlan user every privilege of that role, not only the privilege to set comments. Grant the narrowest owner role that covers the objects you want to sync.
    • Ownership of a database or schema doesn't give ownership of the objects inside it. Each table, view, and function keeps its own owner.
    • If a system role such as ACCOUNTADMIN or SYSADMIN owns an object, transfer ownership of that object to another role instead of granting the system role to the Atlan user.

To grant the privileges, your Snowflake administrator does the following:

  1. Find the owner of each table and view in a schema:

    SELECT table_name, table_type, table_owner
    FROM "<database-name>".INFORMATION_SCHEMA.TABLES
    WHERE table_schema = '<schema-name>';
  2. For each owner role that Atlan can't use yet, do one of the following:

    • Grant the owner role to the connection user:

      GRANT ROLE <owner-role> TO USER <atlan-user>;
    • Transfer ownership of the object to a role that Atlan can use:

      GRANT OWNERSHIP ON <object-type> <object-name> TO ROLE <role-name> COPY CURRENT GRANTS;
  3. Make sure that a role Atlan can use has USAGE on the database and schema that contain each object. The privileges of the connection role and of the secondary roles count together, so USAGE from any of these roles is enough.

Grant privileges on audit table​

Atlan writes a row to the audit table for each statement that it runs. The roles that Atlan can use need the following privileges:

  • USAGE on the audit database and the audit schema.
  • USAGE on the warehouse of the connection. Atlan needs a warehouse to write rows.
  • CREATE TABLE on the audit schema, while the audit table doesn't exist yet. Atlan creates the table at first use.
  • INSERT on the audit table, if a role that Atlan can't use created it. A table that Atlan creates is owned by the connection role, so Atlan can already write to it.

Snowflake checks CREATE privileges only against the primary role, not against secondary roles. Grant CREATE TABLE to the connection role, or to a role granted to the connection role:

GRANT USAGE ON DATABASE <audit-database> TO ROLE <atlan-role>;
GRANT USAGE ON SCHEMA <audit-database>.<audit-schema> TO ROLE <atlan-role>;
GRANT CREATE TABLE ON SCHEMA <audit-database>.<audit-schema> TO ROLE <atlan-role>;
warning

If Atlan can't write to the audit table, it doesn't set any comment for that connection. Atlan retries those edits for a limited time and then stops.

Enable description reverse sync​

Reverse Sync Descriptions is a toggle, and it's off by default. It appears in two places, and it does the same thing in both:

  • On the Snowflake connector setup form, when you create a new connection.
  • On the workflow configuration form, when you modify the configuration of an existing Snowflake workflow.

With the toggle on, you configure the following settings:

  • Sync view column descriptions: whether Atlan sets the comments of view and materialized view columns. On by default. For details, see Sync view column descriptions.
  • Sync scope: optional conditions that limit which assets Atlan syncs. For details, see Limit which assets sync.
  • Audit Trail: the Database Name and Schema Name of the audit table. Required. For details, see Configure audit trail.

To enable description reverse sync:

  1. Open either the Snowflake connector setup form or the configuration of an existing Snowflake workflow.
  2. Find the Reverse Sync Descriptions toggle.
  3. Turn on the toggle.
  4. Optional: to skip the comments of view columns, turn off Sync view column descriptions.
  5. Optional: under Sync scope, add a row for each condition that an asset must meet.
  6. Under Audit Trail, enter the Database Name and Schema Name of the audit table.
  7. Save your configuration.
  8. Wait 5 minutes before you edit your first description. The new setting takes a few minutes to take effect, and Atlan discards any description edit that you make before then.

You don't need to run a crawl to enable description reverse sync, and you don't need to run one afterward. A later change to the sync scope, the view column toggle, or the audit trail also takes a few minutes to take effect after you save.

To stop description reverse sync, turn off the toggle and save your configuration. Atlan discards any description edit that you make while the toggle is off, and it doesn't push those edits when you turn the toggle on again.

Limit which assets sync​

Sync scope limits which assets of the connection Atlan syncs, like the filters of the app. Each row is a condition with a field, an operator, and a value. Atlan syncs an asset only when the asset meets every row. With no rows, Atlan syncs every supported asset of the connection.

FieldOperatorsValue
Asset typeIs one of, Is not one ofOne or more of Database, Schema, Table, View, Column, and Function
Qualified nameStarts with, Equals, Does not equal, Contains, Does not contain, Matches patternA qualified name, part of a qualified name, or a regular expression
GUIDIs one of, Is not one ofOne or more asset GUIDs, one per line or separated by commas
  • Table includes dynamic tables, external tables, and Iceberg tables. View includes materialized views. Column includes the columns of all of these.
  • An Asset type row applies to the asset itself, not to its parent. For example, Asset type Is one of View syncs the descriptions of views but not of their columns. To also sync the columns, select Column as well.
  • Starts with, Contains, and Does not contain ignore case. Equals, Does not equal, and Matches pattern are case sensitive.
  • Matches pattern takes a regular expression that must match the whole qualified name. For example, default/snowflake/1700000000/SALES/.* matches every asset in the SALES database of that connection.
  • The GUID of an asset is in the URL of its asset profile in Atlan.
warning

A Matches pattern value that Atlan can't use stops description reverse sync for the whole connection until you fix it. Atlan refuses a pattern that doesn't compile, is longer than 500 characters, repeats a group that itself contains a repeat, such as (a+)+, or has more than three unbounded repeats (*, +, or {n,}), such as .*.*.*.*Z. These patterns can take too long to evaluate.

Atlan discards the description edits of assets outside the sync scope. If you widen the scope later, Atlan doesn't push those earlier edits. Edit the description again after the change takes effect.

Sync view column descriptions​

With Sync view column descriptions on, Atlan sets the comment of a view column or materialized view column with ALTER VIEW ... ALTER COLUMN ... COMMENT. The statement doesn't change the view definition or its grants, and Atlan doesn't recreate the view. Unlike the Recompile views? option of the app, the view stays available.

Turn off the toggle to leave the comments of view columns in Snowflake as they are. Atlan then discards the description edits of view columns and materialized view columns. The descriptions of the views and materialized views themselves still sync.

Configure audit trail​

Atlan records each statement that it runs in an audit table in your Snowflake account, <Database Name>.<Schema Name>.TBL_ATLAN_REVERSE_SYNC_AUDIT. Before it sets any comment for a connection, Atlan checks that it can write to this table.

  • Database Name and Schema Name are required. Enter each one as a plain Snowflake identifier: letters, digits, _, and $, starting with a letter or _, with no quotes and no dots. Atlan doesn't quote the names, so Snowflake resolves them in uppercase.
  • If the table doesn't exist, Atlan creates it with the columns in the table below. This needs CREATE TABLE on the schema, as described in Grant privileges on audit table.
  • If you used the Asset description reverse sync app, you can enter the database and schema of its audit table. That table has the same name and columns, except ERROR_MESSAGE. Atlan writes its rows without the error text. To add the error text, add the column: ALTER TABLE <audit-database>.<audit-schema>.TBL_ATLAN_REVERSE_SYNC_AUDIT ADD COLUMN ERROR_MESSAGE STRING;
warning

If Database Name or Schema Name isn't a plain identifier, description reverse sync stays off for the connection, and Atlan discards description edits. Check both names before you save.

The audit table has one row for each statement that Atlan ran:

ColumnContent
guidGUID of the asset in Atlan
fullnameSnowflake path of the object
nameName of the object, or of the column for a column
qualified_nameQualified name of the asset in Atlan
type_nameAsset type in Atlan, or View Column for a column of a view or materialized view
workflow_idID of the Atlan run that ran the statement
current_DDLStatement that Atlan ran
last_view_ddlAlways empty. Atlan keeps this column for compatibility with the app.
statussuccess or failed
update_dateTime in UTC when Atlan wrote the row
event_keyID of the description edit in Atlan
userAtlan user who edited the description
ERROR_MESSAGESnowflake error for a failed statement, empty for a successful one

An edit that Atlan skips before it runs a statement gets no row, for example an asset outside the sync scope or an empty description. If Atlan retries a connection, a row can appear twice.

Verify description updates​

After you edit a description in Atlan, verify that the description reached Snowflake:

  1. Wait a few minutes. Atlan collects edits for a short time before it applies them, so a single edit isn't instant.

  2. In Snowsight, open the object and read its comment. You can also read the comment column of SHOW TABLES, SHOW VIEWS, or DESCRIBE TABLE.

  3. To see the result of each statement and its error, query the audit table:

    SELECT update_date, fullname, status, error_message
    FROM <audit-database>.<audit-schema>.TBL_ATLAN_REVERSE_SYNC_AUDIT
    ORDER BY update_date DESC
    LIMIT 100;

    If you reuse the audit table of the app and didn't add the ERROR_MESSAGE column, remove error_message from the query.

  4. To list every statement that Atlan ran, including the audit table statements, query the Snowflake query history for the query tag atlan-snowflake-description-reverse-sync:

    SELECT start_time, query_text, execution_status, error_message
    FROM snowflake.account_usage.query_history
    WHERE query_tag = 'atlan-snowflake-description-reverse-sync'
    ORDER BY start_time DESC
    LIMIT 100;

    ACCOUNT_USAGE views have a data latency of up to 45 minutes for query history.

If a description doesn't reach Snowflake, see Why didn't my description reach Snowflake?

See also​