<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/113211#M1956</link>
    <description>&lt;P&gt;thanks for that&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132493"&gt;@pdiamond&lt;/a&gt;&amp;nbsp;- the underscore didn't work for me, but trying again with the parameter set up it seems that it works now!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see the key "sql-warehouse" under App resources. Yours must be set up "sql_warehouse" instead.&lt;/P&gt;&lt;P&gt;Glad we both sorted it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnaMocanu_0-1742501278445.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15543i3BFC44D269B51613/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnaMocanu_0-1742501278445.png" alt="AnaMocanu_0-1742501278445.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 20:08:33 GMT</pubDate>
    <dc:creator>AnaMocanu</dc:creator>
    <dc:date>2025-03-20T20:08:33Z</dc:date>
    <item>
      <title>Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/102299#M1755</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;So I managed to create a Streamlit app on Databricks, works fine deployed in the cloud.&lt;/P&gt;&lt;P&gt;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&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;valueFrom&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"sql-warehouse" is not being picked up properly in the yaml file. In the app config, it created a service principal with the "&lt;SPAN class=""&gt;sql-warehouse" key that should pick up my serverless warehouse that I want to use.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;My workaround is to specify the value of the warehouse as an environment variable in the app.py and that seems to work.&amp;nbsp;&lt;BR /&gt;like this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#assert os.getenv('DATABRICKS_WAREHOUSE_ID'), "DATABRICKS_WAREHOUSE_ID must be set in app.yaml."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;os&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;environ&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'DATABRICKS_WAREHOUSE_ID'&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;my_value&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any thoughts on how to enforce the yaml file to pick up the right values?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ana&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:59:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/102299#M1755</guid>
      <dc:creator>AnaMocanu</dc:creator>
      <dc:date>2024-12-16T19:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/102302#M1756</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/103893"&gt;@AnaMocanu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;How are you setting up:&amp;nbsp;DATABRICKS_WAREHOUSE_ID?&lt;/P&gt;
&lt;P&gt;When running the app locally, the environment variables set in the &lt;CODE&gt;app.yaml&lt;/CODE&gt; file might not be picked up automatically. You can manually set the environment variable in your local environment before running the app. For example, in a Unix-based system, you can use&lt;/P&gt;
&lt;P&gt;export DATABRICKS_WAREHOUSE_ID=&amp;lt;your_warehouse_id&amp;gt;&lt;BR /&gt;streamlit run app.py&lt;/P&gt;
&lt;P&gt;Additionally, you might want to implement some prints to validate if information is correct:&lt;/P&gt;
&lt;P&gt;import os&lt;BR /&gt;print("DATABRICKS_WAREHOUSE_ID:", os.getenv('DATABRICKS_WAREHOUSE_ID'))&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 20:51:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/102302#M1756</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2024-12-16T20:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/102313#M1757</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/106294"&gt;@Alberto_Umana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply!&lt;BR /&gt;DATABRICKS_WAREHOUSE_ID is set up in yaml file like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"DATABRICKS_WAREHOUSE_ID"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;valueFrom&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"sql-warehouse"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;When the app is running on Databricks, I can see a Service principal in app resources that has the value set up.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnaMocanu_0-1734389590650.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13567i6034FDFED0599402/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnaMocanu_0-1734389590650.png" alt="AnaMocanu_0-1734389590650.png" /&gt;&lt;/span&gt;&lt;P&gt;Your suggestion is how I hack it at the moment, I'm setting up the id manually, but I don't want to do it like that, cause I'm using a serverless warehouse and that value could change?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Dec 2024 22:53:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/102313#M1757</guid>
      <dc:creator>AnaMocanu</dc:creator>
      <dc:date>2024-12-16T22:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/112833#M1947</link>
      <description>&lt;P&gt;I'm running into the same problem. Did you ever figure it out?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 17:22:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/112833#M1947</guid>
      <dc:creator>pdiamond</dc:creator>
      <dc:date>2025-03-17T17:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/112844#M1948</link>
      <description>&lt;P&gt;Unfortunately not &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; the other way to avoid it is to not use serverless as the warehouse name won't change then.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 19:56:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/112844#M1948</guid>
      <dc:creator>AnaMocanu</dc:creator>
      <dc:date>2025-03-17T19:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/113162#M1955</link>
      <description>&lt;P&gt;I figured it out this morning. You have to use an underscore in the yaml file instead of a dash. This works for me:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; - name: &lt;/SPAN&gt;&lt;SPAN&gt;"DATABRICKS_WAREHOUSE_ID"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; valueFrom: &lt;/SPAN&gt;&lt;SPAN&gt;"sql_warehouse"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:47:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/113162#M1955</guid>
      <dc:creator>pdiamond</dc:creator>
      <dc:date>2025-03-20T14:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Streamlit app on Databricks doesn't recognise the DATABRICKS_WAREHOUSE_ID in the yaml file</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/113211#M1956</link>
      <description>&lt;P&gt;thanks for that&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132493"&gt;@pdiamond&lt;/a&gt;&amp;nbsp;- the underscore didn't work for me, but trying again with the parameter set up it seems that it works now!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see the key "sql-warehouse" under App resources. Yours must be set up "sql_warehouse" instead.&lt;/P&gt;&lt;P&gt;Glad we both sorted it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnaMocanu_0-1742501278445.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15543i3BFC44D269B51613/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnaMocanu_0-1742501278445.png" alt="AnaMocanu_0-1742501278445.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 20:08:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/streamlit-app-on-databricks-doesn-t-recognise-the-databricks/m-p/113211#M1956</guid>
      <dc:creator>AnaMocanu</dc:creator>
      <dc:date>2025-03-20T20:08:33Z</dc:date>
    </item>
  </channel>
</rss>

