Here are the steps to fetch your Atlan catalog into Jupyter Notebook.


Requirements:

  1. Python 3.X distribution (For eg. Anaconda)

  2. Atlan Access Token


Follow the next steps if you already have access to a Python 3.X distribution on your system. Otherwise, please feel free to download ANACONDA or any other python distribution of your choice. 


Step 1: Installing the Atlan Library  


Upon the installation of Anaconda, you would need to install the Atlan Library in order to connect with Atlan catalog. To install the Atlan Library open the command terminal and copy the command below. 


  1. Open the Command Terminal by following: Press Windows+R to open “Run” box >> Type “cmd” and then click “OK” to open Command Prompt.
  2. Copy the command below and press Enter
pip install "https://drive.google.com/uc?export=download&id=1pe_s-T9IDWGVWDOF6M_qDMjKN5sKUSQw"


Step 2. Get Access Token from Atlan


  1. Go to Atlan and click on the Governance tab on the left
  2. Under the Admin Hub, click on Access Tokens
  3. Click on Generate New Token and a window will open where the tool needs to be chosen. Choose Jupyter Notebook as the tool.
  4. On the next screen, fill up the Application Name and attach relevant access policies for the user. Click on Generate to move ahead. 



4. On the next screen, a token will be generated. Please copy this access token and save it on your system/share it with the relevant user (as required) as you would not be able to see it on Atlan again for security purposes. 




Step 3.  Launch Jupyter Notebook


Open Anaconda and launch Jupyter Notebook as shown in image below. 



Step 4. Accessing Atlan Catalog


In order to access Atlan catalog, type out the configuration as below on a new notebook.

from atlan import Atlan
import pandas as pd
atlan = Atlan(host='<instance>-api.atlan.com', api_key='<API KEY>')
catalog = atlan.get_catalog('XYZ')
x = pd.DataFrame(catalog.query("select * from XYZ"))
x.describe()



Once you've typed this, click on Run. Now, you will be able to see your catalog on Jupyter Notebook.

Here is a sample Jupyter Notebook.


In case you run into any issues, feel free to drop us a line at support@atlan.com. :)