If you're using any other IDE to work on this code other than Visual Studio Code, we have provided a shell script that you can use to have all the required environment variables set so you can run and debug this code.
Once you clone this repo, the shell script will be located at
./set-environment-vars.sh. Before running it, make sure to fill in all
the variable values. The piece of code below is a sample of the script:
#!/bin/sh
# Cluster Management Environment Variables
export DATABRICKS_DOMAIN="eastus.azuredatabricks.net"
export DATABRICKS_ACCESS_TOKEN="my-adb-access-token"
export DATABRICKS_CLUSTER_NAME_SUFFIX="my-env"
export DATABRICKS_CLUSTER_ID="my-cluster-id"Where:
eastus.azuredatabricks.netis the instance name of your Azure Databricks Workspacemy-adb-access-tokenis the Personal Access Token that you have generated on your Azure Databricks Workspacemy-envis a suffix you have chosen to give to every Cluster this script creates at runtimemy-cluster-idis the id of an existing Databricks Cluster, if you prefer to use one instead of creating a new Cluster every run
To get the details about all the environment variables used on this sample, check Project environment variables.
On your shell terminal, navigate to the root folder of this repo and run the following command:
source ./set-environment-vars.shTo make sure the script worked, you can try printing out the values of any variable that had the value set, for example:
echo $DATABRICKS_CLUSTER_NAME_SUFFIXShould print:
my-env