We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Twin issue of duckdb/duckdb#4314, it was suggested to continue here.
import duckdb from sqlalchemy import func, select, create_engine, MetaData, Table # setup conn = duckdb.connect("test.duckdb") conn.execute("create table test (dt date); insert into test values ('2022-01-01');"); # query engine = create_engine("duckdb:///test.duckdb") metadata = MetaData(engine) metadata.reflect() test = metadata.tables["test"] part = "year" date_part = func.date_part(part, test.c.dt) stmt = select(date_part).select_from(test).group_by(date_part) engine.execute(stmt).fetchall()
Compiled statement:
SELECT date_part(?, test.dt) AS date_part_1 FROM test GROUP BY date_part(?, test.dt)
So, from our discussion, I see several possibilities:
duckdb
duckdb_engine
sqlalchemy
The text was updated successfully, but these errors were encountered:
As of #836 this is now fixed for SQLAlchemy 2+
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Twin issue of duckdb/duckdb#4314, it was suggested to continue here.
To reproduce
Compiled statement:
So, from our discussion, I see several possibilities:
duckdb
library itself, I guess the consensus is that this is not the case.duckdb_engine
.sqlalchemy
library.The text was updated successfully, but these errors were encountered: