Comments (5)
What about name clashes? Which object gets priority if a table by that name exists already?
I forget where I read this, but I believe DuckDB has the ability to look for tables that are not on the DB from other places and just use that.
For example, the behavior is already different when the table test.csv
exists and when it does not exist, as shown below.
(Needless to say, if the table test.csv
does not exist, it will look for a CSV file named test.csv and use it as a virtual table.)
data.frame(bar = 2) |>
write.csv("test.csv", row.names = FALSE)
duckdb:::sql('CREATE SCHEMA "test"; CREATE TABLE "test.csv" AS SELECT 1 AS foo; FROM "test.csv"')
#> foo
#> 1 1
Created on 2024-04-24 with reprex v2.0.2
data.frame(bar = 2) |>
write.csv("test.csv", row.names = FALSE)
duckdb:::sql('FROM "test.csv"')
#> bar
#> 1 2
Created on 2024-04-24 with reprex v2.0.2
How would we control this feature? I suspect just enabling it might lead to surprises for existing code.
Given that this is already in use in the Python API, this is hardly a problem.
From what environment -- the current environment plus all parent (enclosing) environments?
Perhaps an additional argument is needed to specify the environment.
from duckdb-r.
Indeed this should be straightforward, the R package can define a so-called replacement scan for this.
from duckdb-r.
I looked into this, it's not that straightforward for arrow regrettably. So for now let's just do this for data.frame
s.
from duckdb-r.
Are you proposing to make available all data-frame-like things for accessing them by name? From what environment -- the current environment plus all parent (enclosing) environments?
How would we control this feature? I suspect just enabling it might lead to surprises for existing code.
What about name clashes? Which object gets priority if a table by that name exists already?
from duckdb-r.
First stab is here: #164
from duckdb-r.
Related Issues (20)
- progress bar does not work HOT 2
- Cannot write MAP type to DB HOT 1
- Are binaries available on CRAN? HOT 2
- Can't cancel motherduck auth HOT 1
- Duckdb 1.0.0-1 doesn't compile on shinyapps.io HOT 5
- Duckdb-R n_distinct translation doesn't allow management of NA values HOT 6
- Parallel compilation? HOT 11
- Timezone conversion is not working for POSIXct datetimes. HOT 1
- What is the canonical way to write parquet to disk using duckdb and dbplyr without collecting first? HOT 3
- Parquet large file write performance degredation HOT 2
- Implement `db_copy_to.duckdb_connection(temporary = TRUE)`
- duckdb throws an error if one of the columns in your query is named "group" HOT 1
- Logging is truncated
- `n_distinct()` doesn't work correctly with `.by` HOT 4
- Cannot Connect to S3-Compatible Data Store
- Check binary size on PPM
- Verify `sum(na.rm = )` from rfuns extension
- Bump vendored cpp11 version
- R: Add support for the `type`/`dtypes` in `duckdb_read_csv`?
- Implement DISTINCT ON for dbplyr backend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckdb-r.