-
Notifications
You must be signed in to change notification settings - Fork 102
UNBOUND_SQL_PARAMETER when running the example with 14.2 #288
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
Thanks for this report. I'm trying to reproduce right now. |
I've reproduced the same issue internally. Will follow-up with our internal engineers to figure out what's happening here since I'm using the latest 14.2 snapshot with an all-purpose cluster. |
Just following up to say that this exact code snippet does work when connected to a SQL warehouse with DBR 14.2 |
thanks, same here! |
I'm puzzled about why the parameter designed to help optimize the query, specifically the 'get the first n rows so I can check the data,' isn't functioning as intended. Any insights on this issue?
|
This looks like a question for the langchain repo. I don't have any insight about their codebase. |
Until this issue is fixed for DBR 14.2 clusters, I suppose the workaround is to use Inline Parameters, correct? Is there a way to use those with SQLAchemy? The SQLAlchemy docs do describe inlining parameters, but I'm not sure how to use that information alongside the parameter docs for this library here. |
@nchammas Try using a SQL warehouse instead, that sounds easier than using inline parameters. |
@Falydoor is correct that using a sql warehouse for the time-being is the only true workaround at this time. I'm following up with the engineers about when this will be fixed on all-purpose clusters.
No, databricks-sql-connector's inline parameters are never supported with sqlalchemy (because sqlalchemy doesn't know how to write out the correct variable markers). As you found in the sqlalchemy docs, you can force sqlalchemy to write parameter values as strings in emitted queries - this uses a completely different code path from databricks-sql-connector's inline behaviour, though. |
@nchammas What was your in line workaround? I'm facing the same issue here and need a workaround while the Databricks team fixes this. I cannot use SQL warehouse due to cost reasons |
changing databricks cluster version to 14.2 beta made it for me. |
I ended up using a warehouse. As @susodapop explained, inline parameters are not supported for SQLAlchemy, and it didn't seem worth trying to figure some complex workaround if, presumably, an upcoming release of DBR (hopefully 14.3) is going to fix the issue anyway. |
Hi everyone in this thread! Can you please let me know if this issue is still relevant for any of you? Thank you so much! |
Hey @kravets-levko, I just tried with a cluster using |
Hello,
When running the example from the doc:
I'm getting this error:
It looks like the native query parameter isn't working correctly. I'm using an all purpose cluster with a runtime of
14.2
with photon acceleration disabled.Thank you!
The text was updated successfully, but these errors were encountered: