-
Notifications
You must be signed in to change notification settings - Fork 83
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
absolute DuckDB FileAttachment URL #389
Conversation
src/duckdb.js
Outdated
@@ -208,7 +208,7 @@ async function insertFile(database, name, file, options) { | |||
} | |||
if (/\.parquet$/i.test(file.name)) { | |||
return await connection.query( | |||
`CREATE VIEW '${name}' AS SELECT * FROM parquet_scan('${file.name}')` | |||
`CREATE VIEW '${name}' AS FROM parquet_scan('${file.name}')` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the shorter form recommended? Seems like the docs still use SELECT *
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's brand new. Documented in https://duckdb.org/docs/sql/query_syntax/from with one sentence “DuckDB also has an optional FROM-first syntax which enables you to also query without a SELECT statement.” The announcement (August 2023) mentions that SELECT *
is "obsolete".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll revert that commit for now, since I'm not sure when the new syntax was introduced and it's not related to the FileAttachment issue.
Co-authored-by: Mike Bostock <mbostock@gmail.com>
This reverts commit 9d88421.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving. 😁
I feel compelled to click on the ✅ |
I've only tested this locally (not sure how unit tests could work).