Gcloud::Bigquery::LoadJob

LoadJob

A Job subclass representing a load operation that may be performed on a Table. A LoadJob instance is created when you call Gcloud::Bigquery::Table#load.

See Loading Data Into BigQuery and the Jobs API reference for details.

Methods

Public Instance Methods

allow_jagged_rows?()

Checks if the load operation accepts rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an error is returned. The default value is false. Only applicable to CSV, ignored for other formats.

backup?()

Checks if the source data is a Google Cloud Datastore backup.

csv?()

Checks if the format of the source data is CSV. The default is true.

delimiter()

The delimiter used between fields in the source data. The default is a comma (,).

destination()

The table into which the operation loads data. This is the table on which Gcloud::Bigquery::Table#load was invoked. Returns a Table instance.

ignore_unknown_values?()

Checks if the load operation allows extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned. The default is false.

input_file_bytes()

The number of bytes of source data.

input_files()

The number of source files.

iso8859_1?()

Checks if the character encoding of the data is ISO-8859-1.

json?()

Checks if the format of the source data is newline-delimited JSON. The default is false.

max_bad_records()

The maximum number of bad records that the load operation can ignore. If the number of bad records exceeds this value, an error is returned. The default value is 0, which requires that all records be valid.

output_bytes()

The number of bytes that have been loaded into the table. While an import job is in the running state, this value may change.

output_rows()

The number of rows that have been loaded into the table. While an import job is in the running state, this value may change.

quote()

The value that is used to quote data sections in a CSV file. The default value is a double-quote (+“+). If your data does not contain quoted sections, the value should be an empty string. If your data contains quoted newline characters, quoted_newlines? should return true.

quoted_newlines?()

Checks if quoted data sections may contain newline characters in a CSV file. The default is false.

schema()

The schema for the data. Returns a hash. Can be empty if the table has already has the correct schema (see Gcloud::Bigquery::Table#schema= and Gcloud::Bigquery::Table#schema), or if the schema can be inferred from the loaded data.

skip_leading_rows()

The number of header rows at the top of a CSV file to skip. The default value is 0.

sources()

The URI or URIs representing the Google Cloud Storage files from which the operation loads data.

utf8?()

Checks if the character encoding of the data is UTF-8. This is the default.