Skip to content

default compiler impl for get_from_hint_text - #220

Open
Myles1 wants to merge 1 commit into
snowflakedb:mainfrom
Myles1:master
Open

default compiler impl for get_from_hint_text#220
Myles1 wants to merge 1 commit into
snowflakedb:mainfrom
Myles1:master

Conversation

@Myles1

@Myles1 Myles1 commented Apr 12, 2021

Copy link
Copy Markdown

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

Myles1 commented Jun 3, 2021

Copy link
Copy Markdown
Author

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

@Myles1

Myles1 commented Jul 12, 2021

Copy link
Copy Markdown
Author

@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