user
09/28/2022, 7:26 AMhigh-park-82026
handsome-noon-32363
09/28/2022, 8:36 PMhigh-accountant-32689
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?handsome-noon-32363
09/28/2022, 9:25 PMhigh-accountant-32689
09/28/2022, 9:39 PMhandsome-noon-32363
09/28/2022, 9:46 PMhigh-accountant-32689
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?handsome-noon-32363
09/28/2022, 10:22 PMhigh-accountant-32689
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"))
handsome-noon-32363
09/30/2022, 6:48 AM