JobConfiguration

JSON representation
{
  "jobType": string,
  "query": {
    object (JobConfigurationQuery)
  },
  "load": {
    object (JobConfigurationLoad)
  },
  "copy": {
    object (JobConfigurationTableCopy)
  },
  "extract": {
    object (JobConfigurationExtract)
  },
  "dryRun": boolean,
  "jobTimeoutMs": string,
  "labels": {
    string: string,
    ...
  }
}
Fields
jobType

string

Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.

query

object (JobConfigurationQuery)

[Pick one] Configures a query job.

load

object (JobConfigurationLoad)

[Pick one] Configures a load job.

copy

object (JobConfigurationTableCopy)

[Pick one] Copies a table.

extract

object (JobConfigurationExtract)

[Pick one] Configures an extract job.

dryRun

boolean

[Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.

jobTimeoutMs

string (Int64Value format)

[Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.

labels

map (key: string, value: string)

The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

JobConfigurationQuery

JobConfigurationQuery configures a BigQuery query job.

JSON representation
{
  "query": string,
  "destinationTable": {
    object (TableReference)
  },
  "tableDefinitions": {
    string: {
      object(ExternalDataConfiguration)
    },
    ...
  },
  "userDefinedFunctionResources": [
    {
      object (UserDefinedFunctionResource)
    }
  ],
  "createDisposition": string,
  "writeDisposition": string,
  "defaultDataset": {
    object (DatasetReference)
  },
  "priority": string,
  "preserveNulls": boolean,
  "allowLargeResults": boolean,
  "useQueryCache": boolean,
  "flattenResults": boolean,
  "maximumBillingTier": number,
  "maximumBytesBilled": string,
  "useLegacySql": boolean,
  "parameterMode": string,
  "queryParameters": [
    {
      object (QueryParameter)
    }
  ],
  "schemaUpdateOptions": [
    string
  ],
  "timePartitioning": {
    object (TimePartitioning)
  },
  "clustering": {
    object (Clustering)
  },
  "destinationEncryptionConfiguration": {
    object (EncryptionConfiguration)
  }
}
Fields
query

string

[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.

destinationTable

object (TableReference)

[Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size.

tableDefinitions

map (key: string, value: object (ExternalDataConfiguration))

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

userDefinedFunctionResources[]

object (UserDefinedFunctionResource)

Describes user-defined function resources used in the query.

createDisposition

string

[Optional] 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. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.

writeDisposition

string

[Optional] 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. The default value is WRITE_EMPTY. 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.

defaultDataset

object (DatasetReference)

[Optional] Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names.

priority

string

[Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.

preserveNulls

boolean

[Deprecated] This property is deprecated.

allowLargeResults

boolean

[Optional] 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.

useQueryCache

boolean

[Optional] 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.

flattenResults

boolean

[Optional] 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.

maximumBillingTier

number

[Optional] 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.

maximumBytesBilled

string (Int64Value format)

[Optional] 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.

useLegacySql

boolean

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: https://cloud.google.com/bigquery/sql-reference/

When useLegacySql is set to false, the value of flattenResults is ignored; query will be run as if flattenResults is false.

parameterMode

string

Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.

queryParameters[]

object (QueryParameter)

jobs.query parameters for standard SQL queries.

schemaUpdateOptions[]

string

Allows the schema of the destination table to be updated as a side effect of the query job. 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.

timePartitioning

object (TimePartitioning)

Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

clustering

object (Clustering)

[Experimental] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.

destinationEncryptionConfiguration

object (EncryptionConfiguration)

Custom encryption configuration (e.g., Cloud KMS keys)

JobConfigurationLoad

JobConfigurationLoad contains the configuration properties for loading data into a destination table.

JSON representation
{
  "sourceUris": [
    string
  ],
  "schema": {
    object (TableSchema)
  },
  "destinationTable": {
    object (TableReference)
  },
  "destinationTableProperties": {
    object (DestinationTableProperties)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "nullMarker": string,
  "fieldDelimiter": string,
  "skipLeadingRows": number,
  "encoding": string,
  "quote": string,
  "maxBadRecords": number,
  "schemaInlineFormat": string,
  "schemaInline": string,
  "allowQuotedNewlines": boolean,
  "sourceFormat": string,
  "allowJaggedRows": boolean,
  "ignoreUnknownValues": boolean,
  "projectionFields": [
    string
  ],
  "autodetect": boolean,
  "schemaUpdateOptions": [
    string
  ],
  "timePartitioning": {
    object (TimePartitioning)
  },
  "rangePartitioning": {
    object (RangePartitioning)
  },
  "clustering": {
    object (Clustering)
  },
  "destinationEncryptionConfiguration": {
    object (EncryptionConfiguration)
  },
  "useAvroLogicalTypes": boolean
}
Fields
sourceUris[]

string

[Required] 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.

schema

object (TableSchema)

[Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.

destinationTable

object (TableReference)

[Required] The destination table to load the data into.

destinationTableProperties

object (DestinationTableProperties)

[Experimental] [Optional] Properties with which to create the destination table if it is new.

createDisposition

string

[Optional] 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. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.

writeDisposition

string

[Optional] 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. 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. The default value is WRITE_APPEND. 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.

nullMarker

string

[Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').

fieldDelimiter

string

[Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. 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. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').

skipLeadingRows

number

[Optional] 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.

encoding

string

[Optional] 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.

quote

string

[Optional] 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. @default "

maxBadRecords

number

[Optional] 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.

schemaInlineFormat

string

[Deprecated] The format of the schemaInline property.

schemaInline

string

[Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".

allowQuotedNewlines

boolean

Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.

sourceFormat

string

[Optional] 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.

allowJaggedRows

boolean

[Optional] 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.

ignoreUnknownValues

boolean

[Optional] 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

projectionFields[]

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.

autodetect

boolean

[Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.

schemaUpdateOptions[]

string

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.

timePartitioning

object (TimePartitioning)

Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

rangePartitioning

object (RangePartitioning)

[Experimental] Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

clustering

object (Clustering)

[Experimental] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.

destinationEncryptionConfiguration

object (EncryptionConfiguration)

Custom encryption configuration (e.g., Cloud KMS keys)

useAvroLogicalTypes

boolean

[Optional] If sourceFormat is set to "AVRO", indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER). The default value will be true once this feature launches, but can be set now in preparation.

DestinationTableProperties

JSON representation
{
  "friendlyName": string,
  "description": string,
  "labels": {
    string: string,
    ...
  }
}
Fields
friendlyName

string

[Optional] Friendly name for the destination table. If the table already exists, it should be same as the existing friendly name.

description

string

[Optional] The description for the destination table. This will only be used if the destination table is newly created. If the table already exists and a value different than the current description is provided, the job will fail.

labels

map (key: string, value: string)

[Optional] The labels associated with this table. You can use these to organize and group your tables. This will only be used if the destination table is newly created. If the table already exists and labels are different than the current labels are provided, the job will fail.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

RangePartitioning

JSON representation
{
  "field": string,
  "range": {
    object (Range)
  }
}
Fields
field

string

[Experimental] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.

range

object (Range)

Range

[Experimental] [Required] Defines the ranges for range partitioning.

JSON representation
{
  "start": string,
  "end": string,
  "interval": string
}
Fields
start

string

[Experimental] [Required] The start of range partitioning, inclusive.

end

string

[Experimental] [Required] The end of range partitioning, exclusive.

interval

string

[Experimental] [Required] The width of each interval.

JobConfigurationTableCopy

JobConfigurationTableCopy configures a job that copies data from one table to another.

JSON representation
{
  "sourceTable": {
    object (TableReference)
  },
  "sourceTables": [
    {
      object (TableReference)
    }
  ],
  "destinationTable": {
    object (TableReference)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "destinationEncryptionConfiguration": {
    object (EncryptionConfiguration)
  }
}
Fields
sourceTable

object (TableReference)

[Pick one] Source table to copy.

sourceTables[]

object (TableReference)

[Pick one] Source tables to copy.

destinationTable

object (TableReference)

[Required] The destination table.

createDisposition

string

[Optional] 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. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.

writeDisposition

string

[Optional] 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. 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. The default value is WRITE_EMPTY. 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.

destinationEncryptionConfiguration

object (EncryptionConfiguration)

Custom encryption configuration (e.g., Cloud KMS keys).

JobConfigurationExtract

JobConfigurationExtract configures a job that exports data from a BigQuery table into Google Cloud Storage.

JSON representation
{
  "sourceTable": {
    object (TableReference)
  },
  "destinationUri": string,
  "destinationUris": [
    string
  ],
  "printHeader": boolean,
  "fieldDelimiter": string,
  "destinationFormat": string,
  "compression": string
}
Fields
sourceTable

object (TableReference)

[Required] A reference to the table being exported.

destinationUri

string

[Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.

destinationUris[]

string

[Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.

printHeader

boolean

[Optional] Whether to print out a header row in the results. Default is true.

fieldDelimiter

string

[Optional] Delimiter to use between fields in the exported data. Default is ',' Providing an empty string used to cause an error, but in OnePlatform the default value ',' will be used instead.

destinationFormat

string

[Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.

compression

string

[Optional] 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.

Cette page vous a-t-elle été utile ? Évaluez-la :

Envoyer des commentaires concernant…