Slackbot
09/28/2022, 7:26 AMHaytham Abuelfutuh
09/28/2022, 2:06 PMMehtab Mehdi
09/28/2022, 8:36 PMEduardo Apolinario (eapolinario)
09/28/2022, 9:04 PMFile "/var/lib/jenkins/.local/lib/python3.7/site-packages/databricks/sql/client.py", line 100, in __init__
raise ValueError("No valid authentication settings. Please provide an access token.")
I'm assuming you're using the connection as described in the link you mentioned, right? So in one of your tasks you have something along the lines of:
from databricks import sql
import os
connection = sql.connect(server_hostname = os.getenv("DATABRICKS_SERVER_HOSTNAME"),
http_path = os.getenv("DATABRICKS_HTTP_PATH"),
access_token = os.getenv("DATABRICKS_TOKEN"))
How are you defining those environment variables in your task?Mehtab Mehdi
09/28/2022, 9:25 PMEduardo Apolinario (eapolinario)
09/28/2022, 9:39 PMMehtab Mehdi
09/28/2022, 9:46 PMEduardo Apolinario (eapolinario)
09/28/2022, 9:51 PMwith
statement in the definition of get_sql
separately in a python repl?)
2. In case the answer to 1. is yes, can you double-check that the env vars are actually set to the right value in the context of a flyte task?Mehtab Mehdi
09/28/2022, 10:22 PMEduardo Apolinario (eapolinario)
09/28/2022, 10:25 PMfrom databricks import sql
import os
connection = sql.connect(server_hostname = os.getenv("XXXXXXX"),
http_path = os.getenv("XXXXXX"),
access_token = os.getenv("XXXXXXX"))
Mehtab Mehdi
09/30/2022, 6:48 AM