Setup configuration¶
Our lib was developed by use in Microsoft Databricks. So, if you need to use in your Databricks, the steps bellow is necessary to start.
Creating an init script¶
First, you have to create an init script to include our lib in your cluster initialization. There are two ways to create an init script in your Databricks environment, but we recommend a global init script. You will have to create only once and all the clusters in a same Databricks will be able to use Pyiris.
The init script¶
pip install git+https://$PYIRIS_TOKEN:x-oauth-basic@github.com/cervejaria-ambev/pyiris.git@v$PYIRIS_VERSION_NUMBER
To create the global init script, access the Admin Console -> Global Init Script and click in the button + Add. In the name, write “install-pyiris” and paste the script above.
The environment variables¶
Also, you have to set some environment variables to perform a good work:KEY_VAULT_NAME=kv_nonprod_iris
PYIRIS_SECRET={{secrets/KeyVault//IrisLakeSecret}}
PYIRIS_TENANT_ID={{secrets/KeyVault//IrisLakeTenantID}}
PYIRIS_CLIENT_ID={{secrets/KeyVault//IrisLakeClientID}}
PYIRIS_TOKEN={{secrets/KeyVault//pyirisGit}}
ENVIRONMENT_PERMISSION=PUBLIC
PYIRIS_VERSION_NUMBER=1.4.0
OBS: you have to guarantee that your Databricks is connected with IRIS Key-Vault, accord to your environment.
To insert the environment variables access, individual, your clusters in Clusters -> select one cluster -> Edit -> Advanced Options -> insert the above environment variables in the Environment Variables text box.
Good job, the Pyiris was successfully installed! :)