feat: Add temporary argument to duckdb_read_csv()#223
Merged
Conversation
krlmlr
reviewed
Sep 14, 2024
Collaborator
krlmlr
left a comment
There was a problem hiding this comment.
Thanks, I was confused and thought there's a COPY TEMPORARY ... FROM syntax for disambiguation. There doesn't seem to be one: https://duckdb.org/docs/sql/statements/copy.html#copy--from .
Can you please also add a test?
| #' dbDisconnect(con) | ||
| duckdb_read_csv <- function(conn, name, files, header = TRUE, na.strings = "", nrow.check = 500, | ||
| delim = ",", quote = "\"", col.names = NULL, lower.case.names = FALSE, sep = delim, transaction = TRUE, ...) { | ||
| duckdb_read_csv <- function(conn, name, files, ..., header = TRUE, na.strings = "", nrow.check = 500, |
Collaborator
There was a problem hiding this comment.
We'd want to check that the ellipsis is actually empty. This is touching the same file, but the move of the ellipsis and the check could also be a separate PR.
Contributor
Author
There was a problem hiding this comment.
I have added a warning. Is it what you wanted?
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Collaborator
|
Thanks! |
temporary parameter to duckdb_read_csv()temporary parameter to duckdb_read_csv()
Contributor
Author
|
Hi @krlmlr, |
temporary parameter to duckdb_read_csv()temporary argument to duckdb_read_csv()
Collaborator
|
Thanks for the nudge. I thought I had turned on auto-merge for this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here is a try for #142
@krlmlr: You suggested to modify the SQL and to use
tbl_function().I do not understand why it is needed. Cannot we just pass temporary to
dbCreateTable()like I did? Can you please clarify?Warning: this example will overwrite
test.dbandiris.csvfiles on your disk if present.Check that the temporary table is gone: