query_bq: Bigquery query function

query_bqR Documentation

Bigquery query function

Description

queries the bigquery database using the connection configuration see tly_version() for details

Usage

query_bq(
  sql,
  format = "dataframe",
  n_max = Inf,
  page_size = Inf,
  retry = 6,
  quiet = FALSE
)

Arguments

sql

sql string

format

can be either 'dataframe' or 'list'

n_max

Maximum number of results to retrieve. Use Inf to retrieve all rows.

page_size

The number of rows requested per chunk. It is recommended to leave this unspecified until you have evidence that the page_size selected automatically by bq_table_download() is problematic. When page_size = NULL bigrquery determines a conservative, natural chunk size empirically. If you specify the page_size, it is important that each chunk fits on one page, i.e. that the requested row limit is low enough to prevent the API from paginating based on response size.

retry

Number of times to retry if the download fails. With each retry the waiting time increases 2^t

quiet

If FALSE, displays progress bar; if TRUE is silent; if NA displays progress bar only for long-running jobs.

Value

data.dataframe if format is 'dataframe' or list if format is 'list'


transparentlyai/tlyrfunctions documentation built on May 6, 2022, 7:50 a.m.