Job
Jobs are actions that BigQuery runs on your behalf to load data, export data, query data, or copy data. Once a BigQuery job is created, it cannot be changed or deleted.
Create a Job Resource
new Job(name: string, args: JobArgs, opts?: CustomResourceOptions);def Job(resource_name, opts=None, copy=None, extract=None, job_id=None, job_timeout_ms=None, labels=None, load=None, location=None, project=None, query=None, __props__=None);public Job(string name, JobArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Job Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Job resource accepts the following input properties:
- Job
Id string The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- Copy
Job
Copy Args Copies a table. Structure is documented below.
- Extract
Job
Extract Args Configures an extract job. Structure is documented below.
- Job
Timeout stringMs Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- Labels Dictionary<string, string>
The labels associated with this job. You can use these to organize and group your jobs.
- Load
Job
Load Args Configures a load job. Structure is documented below.
- Location string
The geographic location of the job. The default value is US.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Query
Job
Query Args Configures a query job. Structure is documented below.
- Job
Id string The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- Copy
Job
Copy Copies a table. Structure is documented below.
- Extract
Job
Extract Configures an extract job. Structure is documented below.
- Job
Timeout stringMs Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- Labels map[string]string
The labels associated with this job. You can use these to organize and group your jobs.
- Load
Job
Load Configures a load job. Structure is documented below.
- Location string
The geographic location of the job. The default value is US.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Query
Job
Query Configures a query job. Structure is documented below.
- job
Id string The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- copy
Job
Copy Copies a table. Structure is documented below.
- extract
Job
Extract Configures an extract job. Structure is documented below.
- job
Timeout stringMs Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- labels {[key: string]: string}
The labels associated with this job. You can use these to organize and group your jobs.
- load
Job
Load Configures a load job. Structure is documented below.
- location string
The geographic location of the job. The default value is US.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- query
Job
Query Configures a query job. Structure is documented below.
- job_
id str The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- copy
Dict[Job
Copy] Copies a table. Structure is documented below.
- extract
Dict[Job
Extract] Configures an extract job. Structure is documented below.
- job_
timeout_ strms Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- labels Dict[str, str]
The labels associated with this job. You can use these to organize and group your jobs.
- load
Dict[Job
Load] Configures a load job. Structure is documented below.
- location str
The geographic location of the job. The default value is US.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- query
Dict[Job
Query] Configures a query job. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Job resource produces the following output properties:
Look up an Existing Job Resource
Get an existing Job resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: JobState, opts?: CustomResourceOptions): Jobstatic get(resource_name, id, opts=None, copy=None, extract=None, job_id=None, job_timeout_ms=None, job_type=None, labels=None, load=None, location=None, project=None, query=None, user_email=None, __props__=None);public static Job Get(string name, Input<string> id, JobState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Copy
Job
Copy Args Copies a table. Structure is documented below.
- Extract
Job
Extract Args Configures an extract job. Structure is documented below.
- Job
Id string The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- Job
Timeout stringMs Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- Job
Type string The type of the job.
- Labels Dictionary<string, string>
The labels associated with this job. You can use these to organize and group your jobs.
- Load
Job
Load Args Configures a load job. Structure is documented below.
- Location string
The geographic location of the job. The default value is US.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Query
Job
Query Args Configures a query job. Structure is documented below.
- User
Email string Email address of the user who ran the job.
- Copy
Job
Copy Copies a table. Structure is documented below.
- Extract
Job
Extract Configures an extract job. Structure is documented below.
- Job
Id string The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- Job
Timeout stringMs Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- Job
Type string The type of the job.
- Labels map[string]string
The labels associated with this job. You can use these to organize and group your jobs.
- Load
Job
Load Configures a load job. Structure is documented below.
- Location string
The geographic location of the job. The default value is US.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Query
Job
Query Configures a query job. Structure is documented below.
- User
Email string Email address of the user who ran the job.
- copy
Job
Copy Copies a table. Structure is documented below.
- extract
Job
Extract Configures an extract job. Structure is documented below.
- job
Id string The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- job
Timeout stringMs Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- job
Type string The type of the job.
- labels {[key: string]: string}
The labels associated with this job. You can use these to organize and group your jobs.
- load
Job
Load Configures a load job. Structure is documented below.
- location string
The geographic location of the job. The default value is US.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- query
Job
Query Configures a query job. Structure is documented below.
- user
Email string Email address of the user who ran the job.
- copy
Dict[Job
Copy] Copies a table. Structure is documented below.
- extract
Dict[Job
Extract] Configures an extract job. Structure is documented below.
- job_
id str The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
- job_
timeout_ strms Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
- job_
type str The type of the job.
- labels Dict[str, str]
The labels associated with this job. You can use these to organize and group your jobs.
- load
Dict[Job
Load] Configures a load job. Structure is documented below.
- location str
The geographic location of the job. The default value is US.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- query
Dict[Job
Query] Configures a query job. Structure is documented below.
- user_
email str Email address of the user who ran the job.
Supporting Types
JobCopy
- Source
Tables List<JobCopy Source Table Args> Source tables to copy. Structure is documented below.
- Create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- Destination
Encryption JobConfiguration Copy Destination Encryption Configuration Args Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- Destination
Table JobCopy Destination Table Args The destination table. Structure is documented below.
- Write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- Source
Tables []JobCopy Source Table Source tables to copy. Structure is documented below.
- Create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- Destination
Encryption JobConfiguration Copy Destination Encryption Configuration Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- Destination
Table JobCopy Destination Table The destination table. Structure is documented below.
- Write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- source
Tables JobCopy Source Table[] Source tables to copy. Structure is documented below.
- create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- destination
Encryption JobConfiguration Copy Destination Encryption Configuration Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- destination
Table JobCopy Destination Table The destination table. Structure is documented below.
- write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- source
Tables List[JobCopy Source Table] Source tables to copy. Structure is documented below.
- create
Disposition str Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- destination
Encryption Dict[JobConfiguration Copy Destination Encryption Configuration] Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- destination
Table Dict[JobCopy Destination Table] The destination table. Structure is documented below.
- write
Disposition str Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
JobCopyDestinationEncryptionConfiguration
- Kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- Kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms_
key_ strname Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
JobCopyDestinationTable
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset
Id string The ID of the dataset containing this model.
- project
Id string The ID of the project containing this model.
- table_
id str The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset_
id str The ID of the dataset containing this model.
- project_
id str The ID of the project containing this model.
JobCopySourceTable
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset
Id string The ID of the dataset containing this model.
- project
Id string The ID of the project containing this model.
- table_
id str The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset_
id str The ID of the dataset containing this model.
- project_
id str The ID of the project containing this model.
JobExtract
- Destination
Uris List<string> A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
- Compression string
The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
- Destination
Format string The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is SAVED_MODEL.
- Field
Delimiter string When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- Print
Header bool Whether to print out a header row in the results. Default is true.
- Source
Model JobExtract Source Model Args A reference to the model being exported. Structure is documented below.
- Source
Table JobExtract Source Table Args A reference to the table being exported. Structure is documented below.
- Use
Avro boolLogical Types Whether to use logical types when extracting to AVRO format.
- Destination
Uris []string A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
- Compression string
The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
- Destination
Format string The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is SAVED_MODEL.
- Field
Delimiter string When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- Print
Header bool Whether to print out a header row in the results. Default is true.
- Source
Model JobExtract Source Model A reference to the model being exported. Structure is documented below.
- Source
Table JobExtract Source Table A reference to the table being exported. Structure is documented below.
- Use
Avro boolLogical Types Whether to use logical types when extracting to AVRO format.
- destination
Uris string[] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
- compression string
The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
- destination
Format string The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is SAVED_MODEL.
- field
Delimiter string When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- print
Header boolean Whether to print out a header row in the results. Default is true.
- source
Model JobExtract Source Model A reference to the model being exported. Structure is documented below.
- source
Table JobExtract Source Table A reference to the table being exported. Structure is documented below.
- use
Avro booleanLogical Types Whether to use logical types when extracting to AVRO format.
- destination
Uris List[str] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
- compression str
The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
- destination
Format str The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is SAVED_MODEL.
- field
Delimiter str When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- print
Header bool Whether to print out a header row in the results. Default is true.
- source
Model Dict[JobExtract Source Model] A reference to the model being exported. Structure is documented below.
- source
Table Dict[JobExtract Source Table] A reference to the table being exported. Structure is documented below.
- use
Avro boolLogical Types Whether to use logical types when extracting to AVRO format.
JobExtractSourceModel
- dataset_
id str The ID of the dataset containing this model.
- model
Id str The ID of the model.
- project_
id str The ID of the project containing this model.
JobExtractSourceTable
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset
Id string The ID of the dataset containing this model.
- project
Id string The ID of the project containing this model.
- table_
id str The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset_
id str The ID of the dataset containing this model.
- project_
id str The ID of the project containing this model.
JobLoad
- Destination
Table JobLoad Destination Table Args The destination table. Structure is documented below.
- Source
Uris List<string> The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one ‘’ wildcard character and it must come after the ‘bucket’ name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the ‘’ wildcard character is not allowed.
- Allow
Jagged boolRows Accept 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 invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
- Allow
Quoted boolNewlines Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
- Autodetect bool
Indicates if we should automatically infer the options and schema for CSV and JSON sources.
- Create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- Destination
Encryption JobConfiguration Load Destination Encryption Configuration Args Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- Encoding string
The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
- Field
Delimiter string When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- Ignore
Unknown boolValues Indicates if BigQuery should allow 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 in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don’t match any column names
- Max
Bad intRecords The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
- Null
Marker string Specifies a string that represents a null value in a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.
- Projection
Fields List<string> If sourceFormat is set to “DATASTORE_BACKUP”, indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn’t found in the Cloud Datastore backup, an invalid error is returned in the job result.
- Quote string
The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote (‘“’). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
- Schema
Update List<string>Options Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- Skip
Leading intRows The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
- Source
Format string The format of the data files. For CSV files, specify “CSV”. For datastore backups, specify “DATASTORE_BACKUP”. For newline-delimited JSON, specify “NEWLINE_DELIMITED_JSON”. For Avro, specify “AVRO”. For parquet, specify “PARQUET”. For orc, specify “ORC”. The default value is CSV.
- Time
Partitioning JobLoad Time Partitioning Args Time-based partitioning specification for the destination table. Structure is documented below.
- Write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- Destination
Table JobLoad Destination Table The destination table. Structure is documented below.
- Source
Uris []string The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one ‘’ wildcard character and it must come after the ‘bucket’ name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the ‘’ wildcard character is not allowed.
- Allow
Jagged boolRows Accept 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 invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
- Allow
Quoted boolNewlines Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
- Autodetect bool
Indicates if we should automatically infer the options and schema for CSV and JSON sources.
- Create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- Destination
Encryption JobConfiguration Load Destination Encryption Configuration Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- Encoding string
The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
- Field
Delimiter string When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- Ignore
Unknown boolValues Indicates if BigQuery should allow 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 in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don’t match any column names
- Max
Bad intRecords The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
- Null
Marker string Specifies a string that represents a null value in a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.
- Projection
Fields []string If sourceFormat is set to “DATASTORE_BACKUP”, indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn’t found in the Cloud Datastore backup, an invalid error is returned in the job result.
- Quote string
The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote (‘“’). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
- Schema
Update []stringOptions Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- Skip
Leading intRows The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
- Source
Format string The format of the data files. For CSV files, specify “CSV”. For datastore backups, specify “DATASTORE_BACKUP”. For newline-delimited JSON, specify “NEWLINE_DELIMITED_JSON”. For Avro, specify “AVRO”. For parquet, specify “PARQUET”. For orc, specify “ORC”. The default value is CSV.
- Time
Partitioning JobLoad Time Partitioning Time-based partitioning specification for the destination table. Structure is documented below.
- Write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- destination
Table JobLoad Destination Table The destination table. Structure is documented below.
- source
Uris string[] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one ‘’ wildcard character and it must come after the ‘bucket’ name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the ‘’ wildcard character is not allowed.
- allow
Jagged booleanRows Accept 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 invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
- allow
Quoted booleanNewlines Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
- autodetect boolean
Indicates if we should automatically infer the options and schema for CSV and JSON sources.
- create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- destination
Encryption JobConfiguration Load Destination Encryption Configuration Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- encoding string
The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
- field
Delimiter string When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- ignore
Unknown booleanValues Indicates if BigQuery should allow 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 in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don’t match any column names
- max
Bad numberRecords The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
- null
Marker string Specifies a string that represents a null value in a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.
- projection
Fields string[] If sourceFormat is set to “DATASTORE_BACKUP”, indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn’t found in the Cloud Datastore backup, an invalid error is returned in the job result.
- quote string
The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote (‘“’). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
- schema
Update string[]Options Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- skip
Leading numberRows The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
- source
Format string The format of the data files. For CSV files, specify “CSV”. For datastore backups, specify “DATASTORE_BACKUP”. For newline-delimited JSON, specify “NEWLINE_DELIMITED_JSON”. For Avro, specify “AVRO”. For parquet, specify “PARQUET”. For orc, specify “ORC”. The default value is CSV.
- time
Partitioning JobLoad Time Partitioning Time-based partitioning specification for the destination table. Structure is documented below.
- write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- destination
Table Dict[JobLoad Destination Table] The destination table. Structure is documented below.
- source
Uris List[str] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one ‘’ wildcard character and it must come after the ‘bucket’ name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the ‘’ wildcard character is not allowed.
- allow
Jagged boolRows Accept 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 invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
- allow
Quoted boolNewlines Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
- autodetect bool
Indicates if we should automatically infer the options and schema for CSV and JSON sources.
- create
Disposition str Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- destination
Encryption Dict[JobConfiguration Load Destination Encryption Configuration] Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- encoding str
The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
- field
Delimiter str When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ‘,’
- ignore
Unknown boolValues Indicates if BigQuery should allow 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 in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don’t match any column names
- max
Bad floatRecords The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
- null
Marker str Specifies a string that represents a null value in a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.
- projection
Fields List[str] If sourceFormat is set to “DATASTORE_BACKUP”, indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn’t found in the Cloud Datastore backup, an invalid error is returned in the job result.
- quote str
The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote (‘“’). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
- schema
Update List[str]Options Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- skip
Leading floatRows The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
- source
Format str The format of the data files. For CSV files, specify “CSV”. For datastore backups, specify “DATASTORE_BACKUP”. For newline-delimited JSON, specify “NEWLINE_DELIMITED_JSON”. For Avro, specify “AVRO”. For parquet, specify “PARQUET”. For orc, specify “ORC”. The default value is CSV.
- time_
partitioning Dict[JobLoad Time Partitioning] Time-based partitioning specification for the destination table. Structure is documented below.
- write
Disposition str Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
JobLoadDestinationEncryptionConfiguration
- Kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- Kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms_
key_ strname Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
JobLoadDestinationTable
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset
Id string The ID of the dataset containing this model.
- project
Id string The ID of the project containing this model.
- table_
id str The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset_
id str The ID of the dataset containing this model.
- project_
id str The ID of the project containing this model.
JobLoadTimePartitioning
- Type string
The only type supported is DAY, which will generate one partition per day. Providing an empty string used to cause an error, but in OnePlatform the field will be treated as unset.
- Expiration
Ms string Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value.
- Field string
If not set, the table is partitioned by pseudo column ‘_PARTITIONTIME’; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value.
- Type string
The only type supported is DAY, which will generate one partition per day. Providing an empty string used to cause an error, but in OnePlatform the field will be treated as unset.
- Expiration
Ms string Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value.
- Field string
If not set, the table is partitioned by pseudo column ‘_PARTITIONTIME’; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value.
- type string
The only type supported is DAY, which will generate one partition per day. Providing an empty string used to cause an error, but in OnePlatform the field will be treated as unset.
- expiration
Ms string Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value.
- field string
If not set, the table is partitioned by pseudo column ‘_PARTITIONTIME’; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value.
- type str
The only type supported is DAY, which will generate one partition per day. Providing an empty string used to cause an error, but in OnePlatform the field will be treated as unset.
- expiration
Ms str Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value.
- field str
If not set, the table is partitioned by pseudo column ‘_PARTITIONTIME’; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value.
JobQuery
- Query string
Configures a query job. Structure is documented below.
- Allow
Large boolResults If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.
- Create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- Default
Dataset JobQuery Default Dataset Args Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. Structure is documented below.
- Destination
Encryption JobConfiguration Query Destination Encryption Configuration Args Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- Destination
Table JobQuery Destination Table Args The destination table. Structure is documented below.
- Flatten
Results bool If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened.
- Maximum
Billing intTier Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
- Maximum
Bytes stringBilled Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.
- Parameter
Mode string Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
- Priority string
Specifies a priority for the query.
- Schema
Update List<string>Options Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- Script
Options JobQuery Script Options Args Options controlling the execution of scripts. Structure is documented below.
- Use
Legacy boolSql Specifies whether to use BigQuery’s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery’s standard SQL.
- Use
Query boolCache Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
- User
Defined List<JobFunction Resources Query User Defined Function Resource Args> Describes user-defined function resources used in the query. Structure is documented below.
- Write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- Query string
Configures a query job. Structure is documented below.
- Allow
Large boolResults If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.
- Create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- Default
Dataset JobQuery Default Dataset Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. Structure is documented below.
- Destination
Encryption JobConfiguration Query Destination Encryption Configuration Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- Destination
Table JobQuery Destination Table The destination table. Structure is documented below.
- Flatten
Results bool If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened.
- Maximum
Billing intTier Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
- Maximum
Bytes stringBilled Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.
- Parameter
Mode string Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
- Priority string
Specifies a priority for the query.
- Schema
Update []stringOptions Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- Script
Options JobQuery Script Options Options controlling the execution of scripts. Structure is documented below.
- Use
Legacy boolSql Specifies whether to use BigQuery’s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery’s standard SQL.
- Use
Query boolCache Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
- User
Defined []JobFunction Resources Query User Defined Function Resource Describes user-defined function resources used in the query. Structure is documented below.
- Write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- query string
Configures a query job. Structure is documented below.
- allow
Large booleanResults If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.
- create
Disposition string Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- default
Dataset JobQuery Default Dataset Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. Structure is documented below.
- destination
Encryption JobConfiguration Query Destination Encryption Configuration Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- destination
Table JobQuery Destination Table The destination table. Structure is documented below.
- flatten
Results boolean If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened.
- maximum
Billing numberTier Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
- maximum
Bytes stringBilled Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.
- parameter
Mode string Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
- priority string
Specifies a priority for the query.
- schema
Update string[]Options Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- script
Options JobQuery Script Options Options controlling the execution of scripts. Structure is documented below.
- use
Legacy booleanSql Specifies whether to use BigQuery’s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery’s standard SQL.
- use
Query booleanCache Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
- user
Defined JobFunction Resources Query User Defined Function Resource[] Describes user-defined function resources used in the query. Structure is documented below.
- write
Disposition string Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
- query str
Configures a query job. Structure is documented below.
- allow
Large boolResults If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.
- create
Disposition str Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion
- default
Dataset Dict[JobQuery Default Dataset] Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. Structure is documented below.
- destination
Encryption Dict[JobConfiguration Query Destination Encryption Configuration] Custom encryption configuration (e.g., Cloud KMS keys) Structure is documented below.
- destination
Table Dict[JobQuery Destination Table] The destination table. Structure is documented below.
- flatten
Results bool If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened.
- maximum
Billing floatTier Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
- maximum
Bytes strBilled Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.
- parameter
Mode str Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
- priority str
Specifies a priority for the query.
- schema
Update List[str]Options Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
- script
Options Dict[JobQuery Script Options] Options controlling the execution of scripts. Structure is documented below.
- use
Legacy boolSql Specifies whether to use BigQuery’s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery’s standard SQL.
- use
Query boolCache Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
- user
Defined List[JobFunction Resources Query User Defined Function Resource] Describes user-defined function resources used in the query. Structure is documented below.
- write
Disposition str Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
JobQueryDefaultDataset
- dataset_
id str The ID of the dataset containing this model.
- project_
id str The ID of the project containing this model.
JobQueryDestinationEncryptionConfiguration
- Kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- Kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms
Key stringName Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms_
key_ strname Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
JobQueryDestinationTable
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- Table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- Dataset
Id string The ID of the dataset containing this model.
- Project
Id string The ID of the project containing this model.
- table
Id string The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset
Id string The ID of the dataset containing this model.
- project
Id string The ID of the project containing this model.
- table_
id str The table. Can be specified
{{table_id}}ifproject_idanddataset_idare also set, or of the formprojects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}if not.- dataset_
id str The ID of the dataset containing this model.
- project_
id str The ID of the project containing this model.
JobQueryScriptOptions
- Key
Result stringStatement Determines which statement in the script represents the “key result”, used to populate the schema and query results of the script job.
- Statement
Byte stringBudget Limit on the number of bytes billed per statement. Exceeding this budget results in an error.
- Statement
Timeout stringMs Timeout period for each statement in a script.
- Key
Result stringStatement Determines which statement in the script represents the “key result”, used to populate the schema and query results of the script job.
- Statement
Byte stringBudget Limit on the number of bytes billed per statement. Exceeding this budget results in an error.
- Statement
Timeout stringMs Timeout period for each statement in a script.
- key
Result stringStatement Determines which statement in the script represents the “key result”, used to populate the schema and query results of the script job.
- statement
Byte stringBudget Limit on the number of bytes billed per statement. Exceeding this budget results in an error.
- statement
Timeout stringMs Timeout period for each statement in a script.
- key
Result strStatement Determines which statement in the script represents the “key result”, used to populate the schema and query results of the script job.
- statement
Byte strBudget Limit on the number of bytes billed per statement. Exceeding this budget results in an error.
- statement
Timeout strMs Timeout period for each statement in a script.
JobQueryUserDefinedFunctionResource
- Inline
Code string An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
- Resource
Uri string A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
- Inline
Code string An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
- Resource
Uri string A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
- inline
Code string An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
- resource
Uri string A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
- inline
Code str An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
- resource_
uri str A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.