bqTable: Functions to work with BigQuery tables

bqTableR Documentation

Functions to work with BigQuery tables

Description

Family of functions for common operations on tables

Usage

bqTableExists(table, dataset = bqDefaultDataset())

bqDeleteTable(table, dataset = bqDefaultDataset())

bqInitiateTable(
  table,
  schema.file,
  partition = FALSE,
  dataset = bqDefaultDataset(),
  clustering = NULL
)

bqPatchTable(table, schema.file, dataset = bqDefaultDataset())

bqTableSchema(table, dataset = bqDefaultDataset())

Arguments

table

name of the table

dataset

name of the dataset

schema.file

path to file with the table schema

partition

time partitioned table will be created if set to TRUE

clustering

list with fields that will be used for clustering

Details

'bqInitiateTable()' - creates table from schema file. If table already exists it will attempt to patch the table with new fields. Will fail if schema file is missing fields compared to the target table.

'bqPatchTable()' Adds new fields to a BigQuery table from a schema file. Will raise an exception if fields are removed from the schema file, but are still present in the target table.

Value

'bqTableExists' TRUE if table exists

'bqDeleteTable' TRUE if table was deleted

See Also

https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#schema.fields


madedotcom/retl documentation built on Sept. 19, 2022, 3:28 a.m.