Comments (2)
This is a bit more involved than I had hoped because temporary tables seem to be only part of the SQL API, not the REST api. So if we enable sessions, it'll mean switching implementations for many of the DBI methods and I don't have much sense of what the performance implications will be.
from bigrquery.
Since no one has actually asked for this, and it looks like it's going to be a decent amount of work I'll delay to the next release. If this issue sounds interesting to you, please thumbs up it!
What exactly does a temp table look like from the API? need to inspect result of job β canβt see anything obvious in the docs that give created table name. Can we get info from INFORMATION_SCHEMA.TABLES?
bq_perform_query()
needs session argument β goes in connectionProperties
field
- Display in print method
- Need to pass to resault
dbDisconnect()
should terminate session, setting session to NULLdbIsValid()
should check session fielddbWriteTable
needs calldbCreateTable()
thendbAppendTable()
dbCreateTable()
needs to call `sqlCreateTable() then execute itdbAppendTable()
needs to callsqlAppendTable()
then execute itdbReadTable()
needs to switch to perform query? Otherwise need to figure out if the table is temporary, which might be available inINFORMATION_SCHEMA
.dbListTables
needs to queryINFORMATION_SCHEMA
? Similarly withdbExistsTable
. Need to see if temporary tables are even there.dbRemoveTable()
needs to use DROP TABLE;
Given that reading and writing table might have performance differences, it might be necessary to make this option, even if it's on by default.
To create a session:
bq_session_create <- function(project) {
check_string(project)
url <- bq_path(project, jobs = "")
body <- list(
configuration = list(
query = list(
query = "SELECT 1;",
createSession = list(
value = unbox(TRUE)
)
)
)
)
res <- bq_post(url, body = bq_body(body))
res$statistics$sessionInfo$sessionId
}
from bigrquery.
Related Issues (20)
- Upkeep for bigrquery (2021)
- Use cli errors
- Use standard argument checkers
- Speed up tests HOT 1
- Update for dbplyr 2.4.0 quoting semantics
- Remove unprefixed deprecated functions
- Switch `expect_error()` to `expect_snapshot()`
- Switch to defer
- Add gzip to user agent? HOT 1
- update scheduled query HOT 8
- Seconds decimal dropped in new parsing HOT 4
- tbl() breaking when used with dbConnect - again? HOT 2
- Release bigrquery 1.5.0
- compute() function in dplyr is broken HOT 2
- Release bigrquery 1.5.1
- compute() permission denied even for temporary tables. HOT 2
- `dbplyr::table_path_components()` fails to parse components as table name is enclosed with backticks HOT 5
- Write a tbl_dbi as a table in bigquery HOT 8
- Improve bq_perform_upload to upload as PARQUET file HOT 1
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 bigrquery.