-
Notifications
You must be signed in to change notification settings - Fork 185
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
Use sessions #557
Comments
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. |
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?
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
} |
https://cloud.google.com/bigquery/docs/sessions-intro
Will allow temporary tables and transactions.
The text was updated successfully, but these errors were encountered: