Skip to content
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

default compiler impl for get_from_hint_text #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Myles1
Copy link

@Myles1 Myles1 commented Apr 12, 2021

This is the same as the mssql and mysql compilers in sqlalchemy
mssql-impl
mysql-impl

This lets you use features like timetravel in Snowflake-SqlAlchemy with:

>>> from sqlalchemy.engine import url
>>> from sqlalchemy import table, column, select

>>> t = table('my_table', column('q'))
>>> stmt = select([t]).with_hint(t, "BEFORE(TIMESTAMP => current_timestamp())")

>>> sf_dialect = url.URL("snowflake").get_dialect()()
>>> print(stmt.compile(dialect=sf_dialect))

SELECT my_table.q 
FROM my_table BEFORE(TIMESTAMP => current_timestamp())

@Myles1
Copy link
Author

Myles1 commented Jun 3, 2021

@sfc-gh-kwagner Would you be able to take a quick look at this?

@Myles1
Copy link
Author

Myles1 commented Jul 12, 2021

@sfc-gh-mkeller Are public pull requests not accepted by snowflake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant