Configure your Snowflake setup so Atlan can use system data metric functions (DMFs).
Configure Snowflake data metric functions
To use system data metric functions (DMFs) from Snowflake, configure the Snowflake objects that Atlan's data quality integration depends on: two roles, a dedicated service user, a database with its schemas, and the MANAGE_DMF secure procedure that Atlan calls to attach and manage DMFs.
Set up Snowflake holds the current, complete SQL for this configuration, including the MANAGE_DMF procedure. The Snowflake-side steps are the same whether you start from the Snowflake connector or from Data Quality Studio, so they're maintained in one place rather than copied here.
Prerequisites
Confirm the following before you start:
- Snowflake Enterprise or Business Critical edition. Data quality for Snowflake doesn't support other editions.
ACCOUNTADMINrole in Snowflake, or equivalent administrative privileges.- Dedicated Snowflake warehouse for running data quality queries.
Configure Snowflake
Follow Set up Snowflake, which covers these steps in order:
- Set the session variables that name your data quality database, warehouse, roles, and user. The database name is configurable, so you can repeat the setup for separate Atlan connections on the same Snowflake account.
- Create the
DQ_ADMINandATLAN_DQ_SERVICE_ROLEroles and grant each one access to your data quality warehouse. - Create the Snowflake user that Atlan connects as, then grant it the service role.
- Create the data quality database and its
SHARED,DMFS,META,STORE, andCOREschemas. - Create the
MANAGE_DMFsecure procedure, which attaches, detaches, suspends, resumes, and reschedules DMFs, creates custom DMFs, and turns anomaly detection on or off. - Grant
DQ_ADMINownership of the database, its schemas, and the procedure. - Grant the service role the system privileges and object access it needs.
Update earlier setup
This page previously included its own copy of the setup SQL. That copy defined an older MANAGE_DMF procedure that hardcoded the ATLAN_DQ database name, accepted seven parameters, and didn't implement the GET_PROCEDURE_VERSION action Atlan uses to check which procedure version is installed. Setups built from it can't use anomaly detection or custom DMFs.
If you configured Snowflake from that earlier SQL, follow Upgrade Snowflake Data Quality Studio to move to the current procedure without rebuilding your setup.
Next steps
Enable data quality for Snowflake: Turn on data quality for your Snowflake connection in Atlan
See also
- Set up Snowflake - Complete setup SQL, including the
MANAGE_DMFprocedure - Upgrade Snowflake Data Quality Studio - Move an existing setup to the current procedure
- Data quality permissions - Privileges each role needs
- Operations - Actions the
MANAGE_DMFprocedure supports - Enable anomaly detection - Turn on anomaly detection for Snowflake assets