bigrquery (version 0.4.1)

list_tabledata: Retrieve data from a table.

Description

Retrieve data from a table.

list_tabledata_callback calls the supplied callback with each page of data.

Usage

list_tabledata(project, dataset, table, page_size = 10000,
  table_info = NULL, max_pages = 10, warn = TRUE,
  quiet = getOption("bigrquery.quiet"))

list_tabledata_callback(project, dataset, table, callback, table_info = NULL, page_size = getOption("bigrquery.page.size"), max_pages = 10, warn = TRUE, quiet = getOption("bigrquery.quiet"))

list_tabledata_iter(project, dataset, table, table_info = NULL)

Arguments

project

The project name, a string

dataset

The name of the dataset to create, a string

table

name of the table

page_size

Number of items per page.

table_info

if known, the table information retrieved with get_table()

max_pages

maximum number of pages to retrieve. Use Inf to retrieve the complete dataset.

warn

If TRUE, warn when there are rows remaining to be pulled down from database.

quiet

if FALSE, prints informative status messages.

callback

function called with single argument, the data from the current page of data

Value

list_tabledata returns a single dataframe.

list_tabledata_iter returns a named list with functions

  • next_ (fetches one chunk of rows)

  • next_paged (fetches arbitrarily many rows using a specified page size)

  • is_complete (checks if all rows have been fetched)

  • get_schema (returns the schema of the table),

  • get_rows_fetched (returns the number of rows already fetched).

  • get_rows (returns total number of rows)

See Also

API documentation at https://developers.google.com/bigquery/docs/reference/v2/tabledata/list

Examples

Run this code
# NOT RUN {
billing_project <- "341409650721" # put your project number here
natal <- list_tabledata("publicdata", "samples", "natality", max_pages = 2,
  page_size = 10)
dim(natal)
# }

Run the code above in your browser using DataCamp Workspace