-
Notifications
You must be signed in to change notification settings - Fork 152
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
SNOW-994645: snowflake.connector.errors.ProgrammingError: 001003 (42000): SQL compilation error: syntax error line 1 at position 27 unexpected 'ON' #461
Comments
@jm-nab you are trying to create index in snowflake which is not supported. Do you know where create index statement is generated from? |
@sfc-gh-aalam It's created by adding For example the use case is where there is an app which has a model working on sqlite/postgres, etc. However, its not intuitive the differences in transitioning between the dialects. I think the case could be made that when using sqlalchemy, the transition code for snowflake handling classical RDBMS paradigms are warned and ignored? Would it be possible to override/modify the compiler such that the transition between the two would be more intuitive? Such as adding warnings that index creation is being skipped because its not needed/supported? If its not supported it would be nice if there was a way to have it automated. Thanks for the quick response! |
hey @jm-nab , I agree with you that it's the dialect's duty to make sure the gaps are properly addressed. e.g., for the case of yours, a user-friendly error shall be raised or this shall just be a no-op to snowflake. we have tried to cover most of the APIs, but it's challenging to cover all of them, there are cases like parameters will affect the behavior and our tests don't cover.
with this being said, you're more than welcome to make a PR to help improve the lib! |
@sfc-gh-aling do you know if this sort of stuff would be resolved by using the currently in private preview "hybrid tables"? For example, instead of using snowflake OLAP/hybrid tables, i've opted to use postgres and a kafka cluster/kafka-connect, since it is a "production ready", tried, and tested path. Does Snowflake plan to commit any staffing resources to support big libraries like sqlalchemy for the feature parity between dialects? It was a big factor for me not adopting "hybrid tables", on the project I am currently working on. Thanks for the responses! Much appreciated. |
Hybrid Tables are not supported yet unfortunately for snowflake-sqlalchemy, and at this moment there is no timeline attached to when it would be. For the rest of the request, I'd rely on Adam's response from earlier and indeed if resources permit, PRs are more than welcome to address the already-identified gaps. |
(Hybrid Table support) released with version 1.7.0 in November 2024 release cycle |
@sfc-gh-dszmolka @sfc-gh-jvasquezrojas Awesome! Thank you! |
Please answer these questions before submitting your issue. Thanks!
3.11
ubuntu 22.04
pip freeze
)?@latest
alembic upgrade head
SUCCESS
The text was updated successfully, but these errors were encountered: