Add contract impact analysis in GitHub Private Preview
Identify how modifications to data contracts might impact downstream processes and data quality using the Atlan GitHub Action. This action places impact analysis directly into your pull request, allowing you to view potential downstream impacts before merging changes.
Prerequisites
- Before running the action, you need to create an Atlan API token or configure an OAuth client.
- You 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
- You need to configure the default
GITHUB_TOKENpermissions. Grant Read and write permissions to theGITHUB_TOKENin your repository to enable theatlan-actionto 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:
- Create repository secrets in your repository:
ATLAN_INSTANCE_URLwith the URL of your Atlan instance.ATLAN_API_TOKENwith the value of the API token.
- Add the GitHub Action to your workflow:
-
Create a workflow file in your repository -
.github/workflows/atlan-action.yml. -
Add the following code to your workflow file:
name: Atlan actionon:pull_request:types: [opened, edited, synchronize, reopened, closed]jobs:get-downstream-impact:name: Get Downstream Assetsruns-on: ubuntu-lateststeps:- name: Checkoutuses: actions/checkout@v4- name: Run Actionuses: atlanhq/atlan-action@v1with: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 earlier, create a pull request with a changed Atlan data contract file to test the action. You can see the Atlan GitHub action running and then adding comments in your pull request:
- The GitHub workflow adds and updates a single comment for every file change.
- The impacted assets in the comment are displayed in a collapsible section and grouped by source and asset type.
- The comment includes 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 |