Skip to content

Atlan CLI

Data contracts only (so far)

You can use Atlan's command-line interface (CLI) to manage some metadata in Atlan. Currently only data contracts can be managed through the CLI.

Obtain the CLI


For now, the CLI must be downloaded as a pre-built binary:

Disclaimer — closed preview

This feature is in closed preview and therefore any download and installation from this link will be subject to the terms applicable to Product Release Stages . Contact your Atlan Customer Success Manager for your preview today.

If your organization is already part of the closed preview, your installation of the feature from this link shall become subject to the terms and scope of preview as agreed with your organization. Accordingly, any use of the feature outside the agreed scope may result in revocation of the closed preview for your organization. Please contact your system administrator before downloading.

curl -o atlan.tgz -L
tar xf atlan.tgz
curl -o atlan.tgz -L
tar xf atlan.tgz
curl -o atlan.tgz -L
tar -zxf atlan.tgz
curl -o -L

Configure the CLI


You can configure the CLI using a config file or in some cases environment variables, with the following minimum settings1:

atlan_api_key: eyZid92...  # (1)
atlan_base_url:  # (2)
  enabled: false  # (3)
  level: info  # (4)
  1. An API token that has access to your assets.
  2. The base URL of your tenant (including the https://).
  3. (Optional) Enable logging to produce more details on what the CLI is doing.
  4. When logging is enabled, specify the level of verbosity.
Environment variables
ATLAN_API_KEY=eyZid92...  # (1)
  1. An API token that has access to your assets.

Define data sources

You should also define data sources in the config file:

data_source snowflake:  # (1)
  type: snowflake  # (2)
  connection:  # (3)
    name: snowflake-prod  # (4)
    qualified_name: "default/snowflake/1234567890"  # (5)
  database: db  # (6)
  schema: analytics  # (7)
  1. Each data source definition must start with data_source, followed by a space and a unique reference name for the data source (snowflake in this example).

    Reference name is your choice

    The reference name you give in the configuration file is only used here and as a reference in any data contracts you define. It need not match the name of the connection or data source in Atlan itself.

  2. You must indicate the type of connector for the data source (see connector types for options).

  3. Details of the connection must also be provided.
  4. You must provide the name of the connection, as it appears in Atlan.
  5. You must provide the unique qualified_name of the connection in Atlan.
  6. (Optional) You can also specify the database to use for this connection's assets by default, if none is specified in the data contract.
  7. (Optional) You can also specify the schema to use for this connection's assets by default, if none is specified in the data contract.

These ensure the CLI can map the details you specify in your data contract to the appropriate corresponding asset in Atlan.

What's next?

Currently, it is only possible to manage data contracts through the CLI.

  1. When both are specified, environment variables will take precedence.