<?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: Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/131006#M48969</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Your recommendation worked. I modified JDBC url to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jdbc:databricks://adb-{workspace_id}.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=sql/protocolv1/o/{workspace_id}/{cluster_id};AuthMech=11;Auth_Flow=2;TokenCachePassPhrase=U2MToken;EnableTokenCache=0;EnableQueryResultDownload=0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tried another solution which looks essentially same what&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp; you recommended. Solution is attached.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Sep 2025 14:25:53 GMT</pubDate>
    <dc:creator>fly_high_five</dc:creator>
    <dc:date>2025-09-05T14:25:53Z</dc:date>
    <item>
      <title>Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130953#M48949</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to query a table using JDBC endpoint of Interactive Cluster. I am connected to JDBC endpoint using DBeaver. When I export a small subset of data 2000-8000 rows, it works fine and export the data. However, when I try to export all rows of table, it fails by saying request timed out. My table has almost 1 million rows.&lt;/P&gt;&lt;P&gt;I tried same using Python application by trying to export data in CSV and got the same result i.e. it succeeds for small number of rows but fails for entire table.&lt;/P&gt;&lt;P&gt;Can someone try this and tell if they are experiencing same issue and help me understand why I'm experiencing this issue? Note - I'm using non-UC ADB (Hive_metastore)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;csv&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;databricks&lt;/SPAN&gt; &lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;sql&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;connect&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;server_hostname&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"databricks_hostname"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;http_path&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"sql/protocolv1/o/databricks_details"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;auth_type&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"databricks-oauth"&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;connection&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Open a cursor&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;connection&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;cursor&lt;/SPAN&gt;&lt;SPAN&gt;() &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;cursor&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Execute query to fetch 20,000 rows&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;cursor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;execute&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"SELECT * FROM schema.table_name L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N&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;writer&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;csv&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;writer&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;file&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Write header (column names)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;column_names&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN&gt;desc&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;] &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;desc&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;cursor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;description&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;writer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;writerow&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;column_names&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Write data rows&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;writer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;writerows&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;result&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Data saved to output.csv"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Sep 2025 09:48:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130953#M48949</guid>
      <dc:creator>fly_high_five</dc:creator>
      <dc:date>2025-09-05T09:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130974#M48956</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using latest JDBC driver 2.7.3&amp;nbsp;&lt;A href="https://www.databricks.com/spark/jdbc-drivers-archive" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.databricks.com/spark/jdbc-drivers-archive&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And my JDBC url comes from JDBC endpoint of Interactive Cluster.&lt;/P&gt;&lt;P&gt;jdbc:databricks://adb-{workspace_id}.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=sql/protocolv1/o/{workspace_id}/{cluster_id};AuthMech=11;Auth_Flow=2;TokenCachePassPhrase=U2MToken;EnableTokenCache=0&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 11:12:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130974#M48956</guid>
      <dc:creator>fly_high_five</dc:creator>
      <dc:date>2025-09-05T11:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130978#M48958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/182698"&gt;@fly_high_five&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I found these references about this situation, see if they help you: increase the SocketTimeout in JDBC (Databricks KB “Best practices when using JDBC with Databricks SQL” –&amp;nbsp;&lt;A href="https://kb.databricks.com/dbsql/job-timeout-when-connecting-to-a-sql-endpoint-over-jdbc" target="_blank"&gt;https://kb.databricks.com/dbsql/job-timeout-when-connecting-to-a-sql-endpoint-over-jdbc&lt;/A&gt;&lt;BR /&gt;) and replace fetchall() with fetchmany() while adjusting cursor.arraysize (Databricks SQL Connector for Python docs – &lt;A href="https://docs.databricks.com/en/dev-tools/python-sql-connector.html" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/dev-tools/python-sql-connector.html&lt;/A&gt;&lt;BR /&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 11:25:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130978#M48958</guid>
      <dc:creator>WiliamRosa</dc:creator>
      <dc:date>2025-09-05T11:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130981#M48959</link>
      <description>&lt;P&gt;If this is related to following topic:&amp;nbsp;&lt;A href="https://community.databricks.com/t5/data-engineering/exposing-data-for-consumers-in-non-uc-adb/td-p/130954" target="_blank"&gt;Exposing Data for Consumers in non-UC ADB - Databricks Community - 130954&lt;/A&gt;&lt;BR /&gt;Then:&lt;/P&gt;&lt;P&gt;"Looking at the error I noticed the weird name of the storage account. So now I'm thinking that your jdbc connection is using CloudFetch.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;Cloud Fetch, a capability that fetches query results through the cloud storage that is set up in your Azure Databricks deployment.&lt;/P&gt;&lt;P&gt;Query results are uploaded to an internal&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dbfs/" target="_blank" rel="noopener"&gt;DBFS storage location&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as Arrow-serialized files of up to 20 MB. When the driver sends fetch requests after query completion, Azure Databricks generates and returns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview" target="_blank" rel="noopener"&gt;shared access signatures&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to the uploaded files. The JDBC driver then uses the URLs to download the results directly from DBFS."&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1757070663568.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19740iC2F1675A7A283754/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1757070663568.png" alt="szymon_dybczak_0-1757070663568.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you add following option to your JDBC url? It will disable cloudFetch. Once you set this option try again.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;EnableQueryResultDownload=0&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 11:44:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/130981#M48959</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-05T11:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/131006#M48969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Your recommendation worked. I modified JDBC url to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jdbc:databricks://adb-{workspace_id}.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=sql/protocolv1/o/{workspace_id}/{cluster_id};AuthMech=11;Auth_Flow=2;TokenCachePassPhrase=U2MToken;EnableTokenCache=0;EnableQueryResultDownload=0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tried another solution which looks essentially same what&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp; you recommended. Solution is attached.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 14:25:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/131006#M48969</guid>
      <dc:creator>fly_high_five</dc:creator>
      <dc:date>2025-09-05T14:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve all rows of delta table using SQL endpoint of Interactive Cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/131008#M48971</link>
      <description>&lt;P&gt;Great that it worked &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/182698"&gt;@fly_high_five&lt;/a&gt;&amp;nbsp;. I'm happy that I could help.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 14:31:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-retrieve-all-rows-of-delta-table-using-sql-endpoint-of/m-p/131008#M48971</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-05T14:31:20Z</dc:date>
    </item>
  </channel>
</rss>

