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

Transpiling a CREATE TABLE ... LIKE ... statement to DuckDB does not use the existing DuckDB syntax #2922

Closed
tharwan opened this issue Feb 6, 2024 · 1 comment · Fixed by #2923
Assignees

Comments

@tharwan
Copy link

tharwan commented Feb 6, 2024

Fully reproducible code snippet

import sqlglot

sqlglot.transpile("CREATE TABLE t2 LIKE t1", read="snowflake", write="duckdb")

Official Documentation
https://duckdb.org/docs/sql/statements/create_table.html

While DuckDB does not support the LIKE property, but the same can be expressed with:

CREATE TABLE t2 AS FROM t1 LIMIT 0;
@georgesittas
Copy link
Collaborator

Thanks, will take a look shortly.

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 a pull request may close this issue.

2 participants