Learn R Programming

bigrquery (version 0.2.0)

insert_upload_job: Upload data.

Description

This sends all of the data inline in the HTTP request so is only suitable for relatively small datasets.

Usage

insert_upload_job(project, dataset, table, values, billing = project,
  create_disposition = "CREATE_IF_NEEDED",
  write_disposition = "WRITE_APPEND")

Arguments

project
project containing this table
dataset
dataset containing this table
table
name of table to insert values into
values
data frame of data to upload
billing
project ID to use for billing
create_disposition
behavior for table creation if the destination already exists. defaults to "CREATE_IF_NEEDED", the only other supported value is "CREATE_NEVER"; see https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.loa
write_disposition
behavior for writing data if the destination already exists. defaults to "WRITE_APPEND", other possible values are "WRITE_TRUNCATE" and "WRITE_EMPTY"; see https://cloud.google.com/bigquery/docs/reference/v2/job

See Also

Google API documentation: https://developers.google.com/bigquery/loading-data-into-bigquery#loaddatapostrequest

Other jobs: get_job, insert_query_job, wait_for

Examples

Run this code
list_datasets("193487687779")
list_tables("193487687779", "houston")
job <- insert_upload_job("193487687779", "houston", "mtcars", mtcars)
wait_for(job)
list_tables("193487687779", "houston")
delete_table("193487687779", "houston", "mtcars")

Run the code above in your browser using DataLab