Skip to main content

Set up Amazon Redshift

Who can do this?

You need your Amazon Redshift administrator to run these commands. You may not have access yourself.

Atlan supports fetching metadata from Amazon Redshift for the following deployment types:

  • Provisioned
    • RA3
    • DC2
  • Serverless
warning

If you're using the DC2 node type, Redshift restricts cross-database joins and metadata access to a single database. For more information, see Considerations - Amazon Redshift. Because of this restriction, you must set up a separate workflow for each database you want to crawl.

Select your deployment type to see the steps that apply to you.

Grant permissions

Create group and user

Run the following commands to create the group and user Atlan uses to connect:

CREATE GROUP atlan_users;
CREATE USER atlan_user PASSWORD '<pass>' IN GROUP atlan_users;
  • Replace <pass> with the password for atlan_user.
  • When you crawl Amazon Redshift, enter this username in the Username field.

Grant required permissions to group

Run the following commands to grant the minimum permissions needed for Atlan to crawl metadata:

GRANT USAGE ON SCHEMA <schema_name> TO GROUP atlan_users;
GRANT SELECT ON pg_catalog.svv_table_info TO GROUP atlan_users;
  • Replace <schema_name> with your schema name.
  • Repeat these commands for each database in your schema.

SVV_TABLE_INFO is used to retrieve the relationship between table IDs and their schema and database.

Grant permissions for external schemas

If your Redshift instance uses external schemas, grant permissions for each one.

Run the following command to grant USAGE permission:

GRANT USAGE ON SCHEMA <schema_name> TO GROUP atlan_users;
  • Replace <schema_name> with the external schema name.
  • Repeat for all external schemas.
info

If your external tables are sourced from Amazon S3 and AWS Glue Catalog, USAGE permission is sufficient, provided the IAM role associated with your Redshift cluster has read access to the data.

For Redshift-based external schemas, you must also grant SELECT permission to enable metadata crawling:

GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO GROUP atlan_users;
  • Replace <schema_name> with the external schema name.
  • Repeat for all Redshift-based external schemas.

Verify external schema permissions

To verify your permissions are configured correctly:

  1. Connect to Redshift using the atlan_user credentials.

  2. Run the following query using any database viewer tool:

    SELECT * FROM SVV_EXTERNAL_TABLES WHERE schema_name = '<external_schema_name>';

    Replace <external_schema_name> with your external schema name.

If the tables appear in the results, permissions are correctly configured.

Cloned schema for restricted access

If you can't grant USAGE or SELECT permissions on your external schemas, create a cloned schema containing the necessary metadata views, then grant permissions on the clone.

  1. Log in as dbadmin.

  2. Create a new schema. For example, atlan.

  3. Clone the following views as tables from pg_catalog into your new schema:

    • pg_views
    • SVV_TABLES
    • SVV_EXTERNAL_TABLES
    • SVV_COLUMNS
  4. Clone the following views as tables from information_schema into your new schema:

    • key_column_usage as information_schema_key_column_usage
    • table_constraints as information_schema_table_constraints
  5. Grant access to the atlan_users group on the cloned schema:

    GRANT USAGE ON SCHEMA <cloned_schema_name> TO GROUP atlan_users;
    GRANT SELECT ON ALL TABLES IN SCHEMA <cloned_schema_name> TO GROUP atlan_users;

    Replace <cloned_schema_name> with your cloned schema name.

  6. Schedule a cron job to refresh the cloned tables periodically, as Atlan relies on these tables to crawl metadata.

info

Contact Atlan support if you need assistance setting up a cloned schema.

Grant additional permissions for mining query history

If you plan to use query history mining, run the following commands:

GRANT SELECT ON pg_catalog.stl_ddltext TO GROUP atlan_users;
GRANT SELECT ON pg_catalog.stl_query TO GROUP atlan_users;
GRANT SELECT ON pg_catalog.stl_connection_log TO GROUP atlan_users;
GRANT SELECT ON pg_catalog.stl_undone TO GROUP atlan_users;
GRANT SELECT ON pg_catalog.stl_insert TO GROUP atlan_users;
GRANT SELECT ON pg_catalog.svl_statementtext TO GROUP atlan_users;
ALTER USER atlan_user SYSLOG ACCESS UNRESTRICTED;

These permissions are used for:

Configure AWS authentication

Select your authentication method.

No AWS IAM configuration is needed for basic authentication. Your setup is complete.

Next steps

Crawl Amazon Redshift assets: Configure and run the crawler to extract metadata from Amazon Redshift.