How to add contract impact analysis in GitHub

🧪 Preview feature! This feature is only available to select users for a limited period of time. The purpose of this private preview is to allow participating users to experiment with the feature and provide valuable feedback. If you'd like to participate in the private preview, reach out to your customer success manager for more information.

Impact analysis helps you identify how modifications to your data contracts might impact downstream processes, data quality, and overall business operations. This can help you analyze proposed changes and mitigate potential risks before implementation.

If you have ever changed a data contract only to find out later that it broke a downstream table or dashboard, Atlan provides a GitHub Action to help you out.

This action places Atlan's impact analysis right into your pull request. So, you can view the potential downstream impact of your changes before merging the pull request.

Prerequisites

  1. Before running the action, you will need to create an Atlan API token.
  2. You will also need to assign a persona to the API token and add a metadata policy that provides the requisite permissions on assets for the Atlan action to work. For example, you can add the following permissions:
    • Asset, such as a table — Read only
    • Any downstream connections, such as Microsoft Power BI — Read only
  3. You will need to configure the default GITHUB_TOKEN permissions. Grant Read and write permissions to the GITHUB_TOKEN in your repository to allow the atlan-action to seamlessly add or update comments on pull requests. Refer to GitHub documentation to learn more.

Configure the action

To set up the Atlan action in GitHub:

  1. Create repository secrets in your repository:
    • ATLAN_INSTANCE_URL with the URL of your Atlan instance.
    • ATLAN_API_TOKEN with the value of the API token.
  2. Add the GitHub Action to your workflow:
    1. Create a workflow file in your repository — .github/workflows/atlan-action.yml.
    2. Add the following code to your workflow file:
      name: Atlan action
      
      on:
        pull_request:
          types: [opened, edited, synchronize, reopened, closed]
      
      jobs:
        get-downstream-impact:
          name: Get Downstream Assets
          runs-on: ubuntu-latest
          steps:
            - name: Checkout
              uses: actions/checkout@v4
                
            - name: Run Action
              uses: atlanhq/atlan-action@v1
              with:
                GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
                ATLAN_INSTANCE_URL: ${{secrets.ATLAN_INSTANCE_URL}}
                ATLAN_API_TOKEN: ${{secrets.ATLAN_API_TOKEN}}
                ATLAN_CONFIG: .atlan/config.yaml
      

Test the action

After you've completed the configuration above, create a pull request with a changed Atlan data contract file to test the action. You should see the Atlan GitHub action running and then adding comments in your pull request:

  • The GitHub workflow will add and update a single comment for every file change.
  • The impacted assets in the comment will be displayed in a collapsible section and grouped by source and asset type.
  • The comment will include some metadata for your impacted assets — such as descriptions, owners, and linked glossary terms.
  • View impacted assets directly in Atlan.

Inputs

Name Description Required
GITHUB_TOKEN For writing comments on PRs to print downstream assets true
ATLAN_INSTANCE_URL For making API requests to the user's tenant true
ATLAN_API_TOKEN For authenticating API requests to the user's tenant true
ATLAN_CONFIG For impact analysis of Atlan data contracts, if included in a GitHub PR true

Related articles

Was this article helpful?
0 out of 0 found this helpful