-
Notifications
You must be signed in to change notification settings - Fork 104
Connector reads 0 rows although Cluster returned results #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@andrefurlan-db thoughts? |
|
|
Thank you @pimonteiro! Yes, CloudFetch should improve handling of very large results. I asked you to disable it to narrow down the scope of the issue. If you're able to get your data with P.S. I see you provided library version and warehouse details - which is very nice, thank you! Can you please also tell us if you're using AWS or Azure workspace. Thanks! |
Sounds good, we will in the meantime try and reduce the query results size, optimize it in order to continue development. I assume there's nothing wrong in, for now, disabling And lastly, I'm using Azure Workspace. That should have been on the opening line of the ticket, I do apologize :) |
Yes, you can just disable CloudFetch and go on. You'll still be able to get large results, just maybe less efficient than with CloudFetch enabled, that's it |
Any update on this? |
Hi, we're facing the same issue. Any update on this? |
@pimonteiro @akshay-s-ciq sorry, no much updates for now. I'm still trying to figure this out. However, recently we've got a very similar bug report but for Go driver. But we're still not sure what's going on. Also, considering all the mentioned above, may I ask you to run same query but using a Nodejs connector? If any of you volunter to help - I can prepare a test project for you |
@pimonteiro @akshay-s-ciq We have few hypotheses about what may cause your issues. Currently we're checking them, but you may help us. We just released a v3.2.0, which, among the other changes, has more debug logging added. You can help us by using the v3.2.0, enabling debug logging (add P.S. Don't forget to re-enable CloudFetch - |
I was also facing the same issue and use_cloud_fetch=False helped. if it helps, here is what I get when I show debug logging
Python 3.11.9, databricks-sql-connector-3.2.0 |
Do you have a VPN or Proxy on the machine running the connector? It most
likely cannot complete the SSL handshake between your machine and the DBFS
URIs provided by CloudFetch. Do you have SSL / Proxy traffic logs?
…On Thu, Jun 27, 2024 at 8:56 AM Akshay R N ***@***.***> wrote:
I was also facing the same issue and use_cloud_fetch=False helped.
if it helps, here is what I get when I show debug logging
(we forma
/python3.11/site-packages/databricks/sql/thrift_backend.py", line 408, in attempt_request
logger.debug(
Message: 'Received response: TCloseSessionResp(<REDACTED>)'
Arguments: ()
DEBUG - 2024-06-27 15:10:05,748 - databricks.sql.cloudfetch.downloader - is_file_download_successful:62 - Cloud fetch download timed out after 60 seconds for link representing rows 0 to 53424
DEBUG - 2024-06-27 15:10:05,749 - databricks.sql.cloudfetch.download_manager - get_next_downloaded_file:112 - ResultFileDownloadManager: cannot find file for row index 0
DEBUG - 2024-06-27 15:10:05,751 - databricks.sql.utils - _create_next_table:244 - CloudFetchQueue: Cannot find downloaded file for row 0
DEBUG - 2024-06-27 15:10:05,771 - databricks.sql.thrift_backend - attempt_request:396 - Sending request: CloseOperation(<REDACTED>)
DEBUG - 2024-06-27 15:10:05,967 - databricks.sql.thrift_backend - attempt_request:408 - Received response: TCloseOperationResp(<REDACTED>)
—
Reply to this email directly, view it on GitHub
<#383 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEY2HKHIEKBQSWRKIA4FO3ZJQKZ5AVCNFSM6AAAAABFRUQL26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUG42TKMRXGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hmm, we do use VPN but I am not sure about the details. |
Interesting, is there any kind of extensive lag in debug between execution
and fetch? Maybe if the connection is returned to the pool you can no
longer retrieve session details like row counts even though you can still
retrieve the data.
…On Fri, Jun 28, 2024 at 3:21 AM Akshay R N ***@***.***> wrote:
Hmm, we do use VPN but I am not sure about the details.
In my case, the above issue happens only when I am in Python debug mode.
When run end to end this issue doesn't occur.
—
Reply to this email directly, view it on GitHub
<#383 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEY2HIWPMJK4TAFDN5BUETZJUMHJAVCNFSM6AAAAABFRUQL26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJWGM4DSOJWG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
hmm, I don't think so. We use pandas read_sql function with databricks_sql.connect for connection. |
Hi guys 👋 First - thank you all for your reports, logs, and any other information you provided on this issue. We also collected other reports from Databricks customers, and this helped to identify several problems in CloudFetch code. Now we do a first attempt to fix what we've found so far - #405. Hopefully, this will fix all the major issues we know about so far. I will let you know when we release this fix. Thank you for patience! |
Edit: never mind, this fixes it. The linked issue was for a specific case of combining large queries with SSL verification that had to be disabled. |
Hello here 👋 We just released v3.3.0 which includes a refactoring of CloudFetch-related code. We think it should fix your issues, so please give it a try and let me know if it helped or not (remember to enable CloudFetch via |
As the title says, I'm having an issue where the SQL connector, upon executing .fetchall() returns 0 rows, while the Cluster that ran the query returns approx. 151,653 rows - retrieved from cached in 500ms.
In other situations where the same query returns fewer rows (i.e. 10s to return 28k rows), the connection reads correctly.
Python: 3.8.12
Package Version: 3.1.1
Databricks SQL Warehouse configuration:
The text was updated successfully, but these errors were encountered: