Skip to content

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