<?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 Databricks SQL Statement Execution API in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-sql-statement-execution-api/m-p/38381#M26613</link>
    <description>&lt;P&gt;I'm trying to follow the example provided here&amp;nbsp;&lt;A href="https://github.com/databricks-demos/dbsql-rest-api/blob/main/python/external_links.py" target="_blank"&gt;https://github.com/databricks-demos/dbsql-rest-api/blob/main/python/external_links.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It fails when it comes to downloading the data chunks. The statement status turns from SUCCEEDED to CLOSED right away without giving me time to download the data.&lt;/P&gt;&lt;P&gt;Here's the error message I get&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;Response [404]&amp;gt;
b'{"error_code":"NOT_FOUND","message":"The result of the statement 01ee2ae9-da85-1e4f-a760-0abb04e34beb was not found.","details":[{"@type":"type.googleapis.com/google.rpc.ResourceInfo","resource_type":"result","resource_name":"01ee2ae9-da85-1e4f-a760-0abb04e34beb","owner":"","description":"the statement state should be SUCCEEDED before you can start fetching the result"}]}'&lt;/LI-CODE&gt;&lt;P&gt;How can I configure my queries or my sql warehouse so that my queries have at some time to be downloaded?&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2023 13:25:17 GMT</pubDate>
    <dc:creator>RamozanbekS</dc:creator>
    <dc:date>2023-07-25T13:25:17Z</dc:date>
    <item>
      <title>Databricks SQL Statement Execution API</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-statement-execution-api/m-p/38381#M26613</link>
      <description>&lt;P&gt;I'm trying to follow the example provided here&amp;nbsp;&lt;A href="https://github.com/databricks-demos/dbsql-rest-api/blob/main/python/external_links.py" target="_blank"&gt;https://github.com/databricks-demos/dbsql-rest-api/blob/main/python/external_links.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It fails when it comes to downloading the data chunks. The statement status turns from SUCCEEDED to CLOSED right away without giving me time to download the data.&lt;/P&gt;&lt;P&gt;Here's the error message I get&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;Response [404]&amp;gt;
b'{"error_code":"NOT_FOUND","message":"The result of the statement 01ee2ae9-da85-1e4f-a760-0abb04e34beb was not found.","details":[{"@type":"type.googleapis.com/google.rpc.ResourceInfo","resource_type":"result","resource_name":"01ee2ae9-da85-1e4f-a760-0abb04e34beb","owner":"","description":"the statement state should be SUCCEEDED before you can start fetching the result"}]}'&lt;/LI-CODE&gt;&lt;P&gt;How can I configure my queries or my sql warehouse so that my queries have at some time to be downloaded?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 13:25:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-statement-execution-api/m-p/38381#M26613</guid>
      <dc:creator>RamozanbekS</dc:creator>
      <dc:date>2023-07-25T13:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks SQL Statement Execution API</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sql-statement-execution-api/m-p/38387#M26616</link>
      <description>&lt;P&gt;It turns out that if the response is small and can fit 16mb limit, then status check will also provide single external link to download the data.&lt;/P&gt;&lt;P&gt;So I need a condition here. Maybe even something like this&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if len(chunks) == 1:
    external_url = response.json()['result']['external_links'][0]['external_link']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 13:52:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sql-statement-execution-api/m-p/38387#M26616</guid>
      <dc:creator>RamozanbekS</dc:creator>
      <dc:date>2023-07-25T13:52:10Z</dc:date>
    </item>
  </channel>
</rss>

