Questions tagged [bigrquery]

bigquery is an R package makes it easy to work with data stored in Google BigQuery by allowing you to query BigQuery tables and retrieve metadata about your projects, datasets, tables, and jobs

The bigrquery package makes it easy to work with data stored in Google BigQuery by allowing you to query BigQuery tables and retrieve metadata about your projects, datasets, tables, and jobs

77 questions
0
votes
1 answer

I've performed a JOIN using bigrquery and the dbGetQuery function. Now I'd like to query the temporary table I've created but can't connect

I'm afraid that if a bunch of folks start running my actual code I'll be billed for the queries so my example code is for a fake database. I've successfully established my connection to BigQuery: con <- dbConnect( bigrquery::bigquery(), project…
0
votes
0 answers

BigQuery and R Shiny - having users billed for queries

I have created a simply Shiny application that connects to my database and produces a table given an SQL query: ui <- fluidPage( textAreaInput("query", "SQL query"), actionButton("submit", "Submit query"), …
Dylan Russell
  • 936
  • 1
  • 10
  • 29
0
votes
0 answers

R bigrquery Losing Decimals in Writing

I am losing decimals when I write data from R into Google BigQuery using the bigrquery package. I have tried to mess with both the scipen and digits option but nothing is working. Below is an example. options(scipen =…
Nick Criswell
  • 1,733
  • 2
  • 16
  • 32
0
votes
0 answers

How to load a CSV (or TSV) into BigQuery directly with R---without creating a dataframe

I'm working with CSV files in an R notebook. To upload the data I'm using a bash chunk and bq command. I'd like to be able to do it in an R chunk. I use bigrquery and dbplyr for my BigQuery work in R. But bigrquery and DBI don't seem to have methods…
abalter
  • 9,663
  • 17
  • 90
  • 145
0
votes
1 answer

How to authenticate BigQuery in R on Linux Server (bigrquery)

We are trying to authenticate to BigQuery in an R script scheduled to run on a linux server. We have: bigrquery::bq_auth(path = '~/path-to/credentials/our-creds.json') and when I run this locally in R, I get this prompt The bigrquery package is…
Canovice
  • 9,012
  • 22
  • 93
  • 211
0
votes
0 answers

Bigquery Failed to Parse bq_parse_files with bq_table_download?

I have bigquery some table. bq_table_download functions work for most of the table, however, it shows failed to parse errors with 1 table. bigrquery::bq_auth() sql_query=paste0("select * from…
3Mcollab
  • 111
  • 1
  • 4
0
votes
1 answer

bigrquery: Create a BigQuery table with geoJSON files doesn't work

I'd like to create a BigQuery table with geoJSON files, despite the geoJSONis an accepted format in BQ (NEWLINE_DELIMITED_JSON) and bq_fields specification, or something coercible to it (like a data frame) the function bq_table_create() of the…
Leprechault
  • 1,531
  • 12
  • 28
0
votes
1 answer

How to filter by partition using dbplyr and BigQuery

I am connecting to BigQuery tables using dbplyr and the tables are partitioned, usually by date or time (the column is called _PARTITIONDATE or _PARTITIONTIME). In BigQuery, you can filter using the WHERE _PARTITIONDATE > "some date" to access…
mundos
  • 459
  • 6
  • 14
0
votes
0 answers

Request had invalid authentication credentials, what to do? R Studio

Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. [authError]…
0
votes
1 answer

bigrquery bq_table_load csv file with tab delimiter

I am trying to use bigrquery's bq_table_load() command to move a tab delimited csv file from google storage to bigrquery. It works but it doesn't automatically recognize the column names. Doing the same thing interactively (i.e. in the bigquery…
0
votes
1 answer

Bigrquery - no errors

I've been working with R and the library Bigrquery for a year. But since a few months, I'm not receiving any errors or warnings anymore from the function bq_perform_upload(). For exemple, when a data.frame column is numeric, while the bigquery table…
0
votes
1 answer

Discrepancy between "query_exec" and "bq_table_download" using bigrquery

So far I used bigrquery's query_exec to download timeseries data from BigQuery. sql <- "SELECT Date, val1, val2 FROM `mydata` WHERE DATE(_PARTITIONTIME) BETWEEN '2020-05-01' AND '2020-06-01'" project <- "myproj" df <-…
mgrund
  • 1,415
  • 8
  • 10
0
votes
1 answer

How to read data from Bigquery into Shiny App made with Golem

I am trying to read data from a Bigquery table into a Shiny App following Golem's framework. This can be easily done by adding the following code before the ui and server functions in an App.R file bq_auth(path = "xxxxxxxxxxxx.json") #…
csmontt
  • 614
  • 8
  • 15
0
votes
2 answers

How to write virtual BQ table back to BQ using R DBI and bigrquery?

I want to be able to Access a BQ table. This is class [1] "tbl_BigQueryConnection" "tbl_dbi" "tbl_sql" [4] "tbl_lazy" "tbl" ` Alter the table using dbplyr to create a new table. Again, has class [1]…
abalter
  • 9,663
  • 17
  • 90
  • 145
0
votes
1 answer

Can't query VIEW in BigQuery with dbplyr

In the following reprex, I create a BigQuery dataset, create a table with mtcars, create a view, and then try to query the view. I can query the table, but the view returns no data. library(DBI) library(dplyr, warn.conflicts =…
abalter
  • 9,663
  • 17
  • 90
  • 145