Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 11:59 AM
Hey everyone,
So I managed to create a Streamlit app on Databricks, works fine deployed in the cloud.
However, when I try to run it locally, it complains about "assert os.getenv('DATABRICKS_WAREHOUSE_ID'), "DATABRICKS_WAREHOUSE_ID must be set in app.yaml."" It looks like
valueFrom: "sql-warehouse" is not being picked up properly in the yaml file. In the app config, it created a service principal with the "sql-warehouse" key that should pick up my serverless warehouse that I want to use.
My workaround is to specify the value of the warehouse as an environment variable in the app.py and that seems to work.
like this:
like this:
#assert os.getenv('DATABRICKS_WAREHOUSE_ID'), "DATABRICKS_WAREHOUSE_ID must be set in app.yaml."
os.environ['DATABRICKS_WAREHOUSE_ID'] = my_value
Any thoughts on how to enforce the yaml file to pick up the right values?
Many thanks!
Ana