Definitions for @turbot/gcp-bigquery

AvroOptions

{
"properties": {
"useAvroLogicalTypes": {
"description": "[Optional] If sourceFormat is set to \"AVRO\", indicates whether to interpret logical types as the corresponding BigQuery data type (for example, TIMESTAMP), instead of using the raw type (for example, INTEGER).",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/AvroOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

bigQuery

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/bigqueryName"
},
"state": {
"$ref": "gcp#/definitions/state"
},
"config": {
"type": "object"
},
"parent": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/bigqueryAka"
}
},
"title": {
"type": "string"
},
"custom": {
"type": "object",
"properties": {
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
}
}
}
}
}
},
"required": [
"name"
],
"tests": [
{
"description": "Valid - base test",
"input": {
"name": "projects/932405488407/services/bigquery.googleapis.com",
"turbot": {
"akas": [
"gcp://serviceusage.googleapis.com/projects/932405488407/services/bigquery.googleapis.com"
],
"title": "BigQuery",
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
}
}
}
},
{
"description": "Invalid - service provider name prefixed",
"input": {
"name": "GCP Bigquery",
"turbot": {
"akas": [
"gcp://serviceusage.googleapis.com/projects/932405488407/services/bigquery.googleapis.com"
],
"title": "BigQuery",
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/bigQuery",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

bigqueryAka

{
"type": "string",
"pattern": "^gcp://serviceusage.googleapis.com/projects/[0-9]{12}/services/bigquery.googleapis.com",
"tests": [
{
"description": "base",
"input": "gcp://serviceusage.googleapis.com/projects/932405488407/services/bigquery.googleapis.com"
},
{
"description": "invalid aka",
"input": "gcp://serviceusage.googleapis.com/projects/cse-legolas-2/services/bigquery.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/bigqueryAka",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

bigqueryName

{
"type": "string",
"pattern": "^projects/[0-9]{1,12}/services/bigquery.googleapis.com$",
"tests": [
{
"description": "base",
"input": "projects/932405488407/services/bigquery.googleapis.com"
},
{
"description": "invalid name",
"input": "projects/cse-legolas-2/services/iam.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/bigqueryName",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

bigQuerySupportedRegions

{
"type": "array",
"items": {
"$ref": "#/definitions/regionName"
},
"minItems": 1,
"example": [
[
"asia-east1",
"us-east4"
]
],
"default": [
"asia-east1",
"asia-east2",
"asia-northeast1",
"asia-south1",
"asia-southeast1",
"australia-southeast1",
"europe-north1",
"europe-west2",
"northamerica-northeast1",
"southamerica-east1",
"us-east4",
"us-west2"
],
"tests": [
{
"description": "only one region",
"input": [
"australia-southeast1"
]
},
{
"description": "all supported regions",
"input": [
"asia-east1",
"asia-east2",
"asia-northeast1",
"asia-south1",
"asia-southeast1",
"australia-southeast1",
"europe-north1",
"europe-west2",
"northamerica-northeast1",
"southamerica-east1",
"us-east4",
"us-west2"
]
},
{
"description": "invalid - no regions",
"input": [],
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/bigQuerySupportedRegions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

BigtableColumn

{
"properties": {
"encoding": {
"description": "[Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels.",
"type": "string"
},
"fieldName": {
"description": "[Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.",
"type": "string"
},
"onlyReadLatest": {
"description": "[Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels.",
"type": "boolean"
},
"qualifierEncoded": {
"description": "[Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name.",
"format": "byte",
"type": "string"
},
"qualifierString": {
"type": "string"
},
"type": {
"description": "[Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/BigtableColumn",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

BigtableColumnFamily

{
"properties": {
"columns": {
"description": "[Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field.",
"items": {
"$ref": "#/definitions/BigtableColumn"
},
"type": "array"
},
"encoding": {
"description": "[Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.",
"type": "string"
},
"familyId": {
"description": "Identifier of the column family.",
"type": "string"
},
"onlyReadLatest": {
"description": "[Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column.",
"type": "boolean"
},
"type": {
"description": "[Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/BigtableColumnFamily",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

BigtableOptions

{
"properties": {
"columnFamilies": {
"description": "[Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable.",
"items": {
"$ref": "#/definitions/BigtableColumnFamily"
},
"type": "array"
},
"ignoreUnspecifiedColumnFamilies": {
"description": "[Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false.",
"type": "boolean"
},
"readRowkeyAsString": {
"description": "[Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false.",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/BigtableOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

BqmlIterationResult

{
"properties": {
"durationMs": {
"description": "[Output-only, Beta] Time taken to run the training iteration in milliseconds.",
"format": "int64",
"type": "string"
},
"evalLoss": {
"description": "[Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.",
"format": "double",
"type": "number"
},
"index": {
"description": "[Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.",
"format": "int32",
"type": "integer"
},
"learnRate": {
"description": "[Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.",
"format": "double",
"type": "number"
},
"trainingLoss": {
"description": "[Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.",
"format": "double",
"type": "number"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/BqmlIterationResult",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

BqmlTrainingRun

{
"properties": {
"iterationResults": {
"description": "[Output-only, Beta] List of each iteration results.",
"items": {
"$ref": "#/definitions/BqmlIterationResult"
},
"type": "array"
},
"startTime": {
"description": "[Output-only, Beta] Training run start time in milliseconds since the epoch.",
"format": "date-time",
"type": "string"
},
"state": {
"description": "[Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.",
"type": "string"
},
"trainingOptions": {
"description": "[Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.",
"properties": {
"earlyStop": {
"type": "boolean"
},
"l1Reg": {
"format": "double",
"type": "number"
},
"l2Reg": {
"format": "double",
"type": "number"
},
"learnRate": {
"format": "double",
"type": "number"
},
"learnRateStrategy": {
"type": "string"
},
"lineSearchInitLearnRate": {
"format": "double",
"type": "number"
},
"maxIteration": {
"format": "int64",
"type": "string"
},
"minRelProgress": {
"format": "double",
"type": "number"
},
"warmStart": {
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/BqmlTrainingRun",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

CloneDefinition

{
"properties": {
"baseTableReference": {
"$ref": "#/definitions/TableReference",
"description": "[Required] Reference describing the ID of the table that was cloned."
},
"cloneTime": {
"description": "[Required] The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format.",
"format": "date-time",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/CloneDefinition",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

Clustering

{
"properties": {
"fields": {
"description": "[Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/Clustering",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

CsvOptions

{
"properties": {
"allowJaggedRows": {
"description": "[Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. 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.",
"type": "boolean"
},
"allowQuotedNewlines": {
"description": "[Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.",
"type": "boolean"
},
"encoding": {
"description": "[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.",
"type": "string"
},
"fieldDelimiter": {
"description": "[Optional] The separator for fields 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. BigQuery also supports the escape sequence \"\\t\" to specify a tab separator. The default value is a comma (',').",
"type": "string"
},
"null_marker": {
"description": "[Optional] An custom string that will represent a NULL value in CSV import data.",
"type": "string"
},
"preserveAsciiControlCharacters": {
"description": "[Optional] Preserves the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\\x00' to '\\x1F') when loading from CSV. Only applicable to CSV, ignored for other formats.",
"type": "boolean"
},
"quote": {
"default": "\"",
"description": "[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.",
"pattern": ".?",
"type": "string"
},
"skipLeadingRows": {
"description": "[Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading 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.",
"format": "int64",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/CsvOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

dataset

{
"type": "object",
"properties": {
"datasetId": {
"$ref": "#/definitions/id"
},
"datasetReference": {
"type": "object"
},
"labels": {
"$ref": "gcp#/definitions/labels"
},
"defaultEncryptionConfiguration": {
"type": "object",
"properties": {
"kmsKeyName": {
"type": "string"
}
}
},
"lastUsedTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/datasetAka"
}
},
"title": {
"$ref": "#/definitions/id"
},
"tags": {
"$ref": "gcp#/definitions/labels"
},
"custom": {
"type": "object",
"properties": {
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"lastUsedTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"required": [
"datasetReference"
],
"additionalProperties": true,
"tests": [
{
"description": "Valid - All properties",
"input": {
"datasetId": "snap_test_123",
"datasetReference": {
"datasetId": "snap_test_123",
"projectId": "123-456"
},
"labels": {
"foo": "bar",
"foo1": "bar1"
},
"turbot": {
"title": "a123456789a123456789a123456789a123456789a123456789a123456789a12",
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"custom": {
"gcp": {
"projectId": "123-456"
}
}
}
}
},
{
"description": "Invalid - Missing datasetReference",
"input": {
"labels": {
"foo": "bar",
"foo1": "bar1"
},
"turbot": {
"title": "a123456789a123456789a123456789a123456789a123456789a123456789a12",
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"custom": {
"gcp": {
"projectId": "123-456"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/dataset",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

Dataset

{
"properties": {
"access": {
"description": "[Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;",
"items": {
"properties": {
"dataset": {
"$ref": "#/definitions/DatasetAccessEntry",
"description": "[Pick one] A grant authorizing all resources of a particular type in a particular dataset access to this dataset. Only views are supported for now. The role field is not required when this field is set. If that dataset is deleted and re-created, its access needs to be granted again via an update operation."
},
"domain": {
"description": "[Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: \"example.com\". Maps to IAM policy member \"domain:DOMAIN\".",
"type": "string"
},
"groupByEmail": {
"description": "[Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member \"group:GROUP\".",
"type": "string"
},
"iamMember": {
"description": "[Pick one] Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group.",
"type": "string"
},
"role": {
"description": "[Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to \"roles/bigquery.dataOwner\", it will be returned back as \"OWNER\".",
"type": "string"
},
"routine": {
"$ref": "#/definitions/RoutineReference",
"description": "[Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation."
},
"specialGroup": {
"description": "[Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users. Maps to similarly-named IAM members.",
"type": "string"
},
"userByEmail": {
"description": "[Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member \"user:EMAIL\" or \"serviceAccount:EMAIL\".",
"type": "string"
},
"view": {
"$ref": "#/definitions/TableReference",
"description": "[Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation."
}
},
"type": "object"
},
"type": "array"
},
"creationTime": {
"description": "[Output-only] The time when this dataset was created, in milliseconds since the epoch.",
"format": "int64",
"type": "string"
},
"datasetReference": {
"$ref": "#/definitions/DatasetReference",
"description": "[Required] A reference that identifies the dataset."
},
"defaultCollation": {
"description": "[Output-only] The default collation of the dataset.",
"type": "string"
},
"defaultEncryptionConfiguration": {
"$ref": "#/definitions/EncryptionConfiguration"
},
"defaultPartitionExpirationMs": {
"description": "[Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.",
"format": "int64",
"type": "string"
},
"defaultRoundingMode": {
"description": "[Output-only] The default rounding mode of the dataset.",
"type": "string"
},
"defaultTableExpirationMs": {
"description": "[Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table's expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.",
"format": "int64",
"type": "string"
},
"description": {
"description": "[Optional] A user-friendly description of the dataset.",
"type": "string"
},
"etag": {
"description": "[Output-only] A hash of the resource.",
"type": "string"
},
"friendlyName": {
"description": "[Optional] A descriptive name for the dataset.",
"type": "string"
},
"id": {
"description": "[Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.",
"type": "string"
},
"isCaseInsensitive": {
"description": "[Optional] Indicates if table names are case insensitive in the dataset.",
"type": "boolean"
},
"kind": {
"default": "bigquery#dataset",
"description": "[Output-only] The resource type.",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.",
"type": "object"
},
"lastModifiedTime": {
"description": "[Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.",
"format": "int64",
"type": "string"
},
"location": {
"description": "The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.",
"type": "string"
},
"maxTimeTravelHours": {
"description": "[Optional] Number of hours for the max time travel for all tables in the dataset.",
"format": "int64",
"type": "string"
},
"satisfiesPzs": {
"description": "[Output-only] Reserved for future use.",
"type": "boolean"
},
"selfLink": {
"description": "[Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.",
"type": "string"
},
"storageBillingModel": {
"description": "[Optional] Storage billing model to be used for all tables in the dataset. Can be set to PHYSICAL. Default is LOGICAL.",
"type": "string"
},
"tags": {
"description": "[Optional]The tags associated with this dataset. Tag keys are globally unique.",
"items": {
"properties": {
"tagKey": {
"description": "[Required] The namespaced friendly name of the tag key, e.g. \"12345/environment\" where 12345 is org id.",
"type": "string"
},
"tagValue": {
"description": "[Required] Friendly short name of the tag value, e.g. \"production\".",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/Dataset",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

DatasetAccessEntry

{
"properties": {
"dataset": {
"$ref": "#/definitions/DatasetReference",
"description": "[Required] The dataset this entry applies to."
},
"targetTypes": {
"items": {
"enum": [
"TARGET_TYPE_UNSPECIFIED",
"VIEWS",
"ROUTINES"
],
"type": "string"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/DatasetAccessEntry",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

datasetAka

{
"type": "string",
"pattern": "^gcp://bigquery.googleapis.com/projects/[a-z0-9-]{5,29}[a-z0-9]{1}/datasets/[-a-zA-Z0-9_]{1,1024}$",
"tests": [
{
"descritpion": "base case",
"input": "gcp://bigquery.googleapis.com/projects/aar-a4b6d489/datasets/snap-_test_123"
},
{
"description": "invalid - invalid id",
"input": "gcp://bigquery.googleapis.com/projects/aar-a4b6d489/datasets/test01*-",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/datasetAka",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

DatasetReference

{
"properties": {
"datasetId": {
"description": "[Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.",
"type": "string"
},
"projectId": {
"description": "[Optional] The ID of the project containing this dataset.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/DatasetReference",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

encryptConfiguration

{
"type": "object",
"properties": {
"kmsKeyName": {
"$ref": "#/definitions/kmskeyname"
}
},
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/encryptConfiguration",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

EncryptionConfiguration

{
"properties": {
"kmsKeyName": {
"description": "Optional. 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.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/EncryptionConfiguration",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

ExternalDataConfiguration

{
"properties": {
"autodetect": {
"description": "Try to detect schema and format options automatically. Any option specified explicitly will be honored.",
"type": "boolean"
},
"avroOptions": {
"$ref": "#/definitions/AvroOptions",
"description": "Additional properties to set if sourceFormat is set to Avro."
},
"bigtableOptions": {
"$ref": "#/definitions/BigtableOptions",
"description": "[Optional] Additional options if sourceFormat is set to BIGTABLE."
},
"compression": {
"description": "[Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.",
"type": "string"
},
"connectionId": {
"description": "[Optional, Trusted Tester] Connection for external data source.",
"type": "string"
},
"csvOptions": {
"$ref": "#/definitions/CsvOptions",
"description": "Additional properties to set if sourceFormat is set to CSV."
},
"decimalTargetTypes": {
"description": "[Optional] Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown. Example: Suppose the value of this field is [\"NUMERIC\", \"BIGNUMERIC\"]. If (precision,scale) is: (38,9) -> NUMERIC; (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); (76,38) -> BIGNUMERIC; (77,38) -> BIGNUMERIC (error if value exeeds supported range). This field cannot contain duplicate types. The order of the types in this field is ignored. For example, [\"BIGNUMERIC\", \"NUMERIC\"] is the same as [\"NUMERIC\", \"BIGNUMERIC\"] and NUMERIC always takes precedence over BIGNUMERIC. Defaults to [\"NUMERIC\", \"STRING\"] for ORC and [\"NUMERIC\"] for the other file formats.",
"items": {
"type": "string"
},
"type": "array"
},
"fileSetSpecType": {
"description": "[Optional] Specifies how source URIs are interpreted for constructing the file set to load. By default source URIs are expanded against the underlying storage. Other options include specifying manifest files. Only applicable to object storage systems.",
"type": "string"
},
"googleSheetsOptions": {
"$ref": "#/definitions/GoogleSheetsOptions",
"description": "[Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS."
},
"hivePartitioningOptions": {
"$ref": "#/definitions/HivePartitioningOptions",
"description": "[Optional] Options to configure hive partitioning support."
},
"ignoreUnknownValues": {
"description": "[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 Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored.",
"type": "boolean"
},
"jsonOptions": {
"$ref": "#/definitions/JsonOptions",
"description": "Additional properties to set if `sourceFormat` is set to `NEWLINE_DELIMITED_JSON`."
},
"maxBadRecords": {
"description": "[Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.",
"format": "int32",
"type": "integer"
},
"metadataCacheMode": {
"description": "[Optional] Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.",
"type": "string"
},
"objectMetadata": {
"description": "ObjectMetadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the source_uris. If ObjectMetadata is set, source_format should be omitted. Currently SIMPLE is the only supported Object Metadata type.",
"type": "string"
},
"parquetOptions": {
"$ref": "#/definitions/ParquetOptions",
"description": "Additional properties to set if sourceFormat is set to Parquet."
},
"referenceFileSchemaUri": {
"description": "[Optional] Provide a referencing file with the expected table schema. Enabled for the format: AVRO, PARQUET, ORC.",
"type": "string"
},
"schema": {
"$ref": "#/definitions/TableSchema",
"description": "[Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats."
},
"sourceFormat": {
"description": "[Required] The data format. For CSV files, specify \"CSV\". For Google sheets, specify \"GOOGLE_SHEETS\". For newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". For Avro files, specify \"AVRO\". For Google Cloud Datastore backups, specify \"DATASTORE_BACKUP\". [Beta] For Google Cloud Bigtable, specify \"BIGTABLE\".",
"type": "string"
},
"sourceUris": {
"description": "[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.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/ExternalDataConfiguration",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

GoogleSheetsOptions

{
"properties": {
"range": {
"description": "[Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20",
"type": "string"
},
"skipLeadingRows": {
"description": "[Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, 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.",
"format": "int64",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/GoogleSheetsOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

HivePartitioningOptions

{
"properties": {
"fields": {
"description": "[Output-only] For permanent external tables, this field is populated with the hive partition keys in the order they were inferred. The types of the partition keys can be deduced by checking the table schema (which will include the partition keys). Not every API will populate this field in the output. For example, Tables.Get will populate it, but Tables.List will not contain this field.",
"items": {
"type": "string"
},
"type": "array"
},
"mode": {
"description": "[Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet.",
"type": "string"
},
"requirePartitionFilter": {
"description": "[Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail.",
"type": "boolean"
},
"sourceUriPrefix": {
"description": "[Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter).",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/HivePartitioningOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

id

{
"type": "string",
"pattern": "^[a-zA-Z0-9_]{1,1024}$",
"tests": [
{
"input": "test_dataset"
},
{
"input": "a123456789a123456789a123456789a123456789a123456789a123456789a12"
},
{
"description": "invalid - cannot contain any special character",
"input": "snap_test%123",
"expected": false
},
{
"description": "invalid - empty string passed",
"input": "",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/id",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

JsonOptions

{
"properties": {
"encoding": {
"description": "[Optional] The character encoding of the data. The supported values are UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The default value is UTF-8.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/JsonOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

kmskeyname

{
"type": "string",
"tests": [
{
"description": "valid case",
"input": "projects/cse-legolas/locations/global/keyRings/test/cryptoKeys/disk/cryptoKeyVersions/1"
},
{
"description": "invalid - encryption cannot contains array",
"input": [],
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/kmskeyname",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

MaterializedViewDefinition

{
"properties": {
"allow_non_incremental_definition": {
"description": "[Optional] Allow non incremental materialized view definition. The default value is \"false\".",
"type": "boolean"
},
"enableRefresh": {
"description": "[Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is \"true\".",
"type": "boolean"
},
"lastRefreshTime": {
"description": "[Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.",
"format": "int64",
"type": "string"
},
"maxStaleness": {
"description": "[Optional] Max staleness of data that could be returned when materizlized view is queried (formatted as Google SQL Interval type).",
"format": "byte",
"type": "string"
},
"query": {
"description": "[Required] A query whose result is persisted.",
"type": "string"
},
"refreshIntervalMs": {
"description": "[Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is \"1800000\" (30 minutes).",
"format": "int64",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/MaterializedViewDefinition",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

ModelDefinition

{
"properties": {
"modelOptions": {
"description": "[Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.",
"properties": {
"labels": {
"items": {
"type": "string"
},
"type": "array"
},
"lossType": {
"type": "string"
},
"modelType": {
"type": "string"
}
},
"type": "object"
},
"trainingRuns": {
"description": "[Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.",
"items": {
"$ref": "#/definitions/BqmlTrainingRun"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/ModelDefinition",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

ParquetOptions

{
"properties": {
"enableListInference": {
"description": "[Optional] Indicates whether to use schema inference specifically for Parquet LIST logical type.",
"type": "boolean"
},
"enumAsString": {
"description": "[Optional] Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default.",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/ParquetOptions",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

RangePartitioning

{
"properties": {
"field": {
"description": "[TrustedTester] [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.",
"type": "string"
},
"range": {
"description": "[TrustedTester] [Required] Defines the ranges for range partitioning.",
"properties": {
"end": {
"description": "[TrustedTester] [Required] The end of range partitioning, exclusive.",
"format": "int64",
"type": "string"
},
"interval": {
"description": "[TrustedTester] [Required] The width of each interval.",
"format": "int64",
"type": "string"
},
"start": {
"description": "[TrustedTester] [Required] The start of range partitioning, inclusive.",
"format": "int64",
"type": "string"
}
},
"type": "object"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/RangePartitioning",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

regionName

{
"type": "string",
"enum": [
"asia-east1",
"asia-east2",
"asia-northeast1",
"asia-south1",
"asia-southeast1",
"australia-southeast1",
"europe-north1",
"europe-west2",
"northamerica-northeast1",
"southamerica-east1",
"us-east4",
"us-west2"
],
"tests": [
{
"description": "valid",
"input": "us-east4"
},
{
"description": "invalid - region",
"input": "us-eass1",
"expected": false
},
{
"description": "invalid - unsupported region",
"input": "us-west1",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/regionName",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

RoutineReference

{
"properties": {
"datasetId": {
"description": "Required. The ID of the dataset containing this routine.",
"type": "string"
},
"projectId": {
"description": "Required. The ID of the project containing this routine.",
"type": "string"
},
"routineId": {
"description": "Required. The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/RoutineReference",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

SnapshotDefinition

{
"properties": {
"baseTableReference": {
"$ref": "#/definitions/TableReference",
"description": "[Required] Reference describing the ID of the table that was snapshot."
},
"snapshotTime": {
"description": "[Required] The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format.",
"format": "date-time",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/SnapshotDefinition",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

Streamingbuffer

{
"properties": {
"estimatedBytes": {
"description": "[Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.",
"format": "uint64",
"type": "string"
},
"estimatedRows": {
"description": "[Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.",
"format": "uint64",
"type": "string"
},
"oldestEntryTime": {
"description": "[Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.",
"format": "uint64",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/Streamingbuffer",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

table

{
"type": "object",
"properties": {
"datasetId": {
"$ref": "#/definitions/id"
},
"tableId": {
"$ref": "#/definitions/id"
},
"tableReference": {
"type": "object"
},
"labels": {
"$ref": "gcp#/definitions/labels"
},
"encryptionConfiguration": {
"$ref": "#/definitions/encryptConfiguration"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/tableAka"
}
},
"tags": {
"$ref": "gcp#/definitions/labels"
},
"title": {
"$ref": "#/definitions/id"
},
"custom": {
"type": "object",
"properties": {
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"lastUsedTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"required": [
"tableReference"
],
"tests": [
{
"description": "Valid - All properties",
"input": {
"tableReference": {
"datasetId": "snap_test_123",
"tableId": "test01"
},
"labels": {
"foo": "bar",
"foo1": "bar1"
},
"turbot": {
"custom": {
"gcp": {
"projectId": "function-test-01"
},
"createTimestamp": "2019-03-04T11:44:11.089Z",
"lastUsedTimestamp": "2019-03-04T13:28:23.416Z"
},
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"title": "test01"
}
}
},
{
"description": "Invalid - Required property tableReference missing",
"input": {
"labels": {
"foo": "bar",
"foo1": "bar1"
},
"turbot": {
"custom": {
"gcp": {
"projectId": "function-test-01",
"regionName": "us-east-1"
},
"createTimestamp": "2019-03-04T11:44:11.089Z",
"lastUsedTimestamp": "2019-03-04T13:28:23.416Z"
},
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"title": "test01"
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/table",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

Table

{
"properties": {
"cloneDefinition": {
"$ref": "#/definitions/CloneDefinition",
"description": "[Output-only] Clone definition."
},
"clustering": {
"$ref": "#/definitions/Clustering",
"description": "[Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered."
},
"creationTime": {
"description": "[Output-only] The time when this table was created, in milliseconds since the epoch.",
"format": "int64",
"type": "string"
},
"defaultCollation": {
"description": "[Output-only] The default collation of the table.",
"type": "string"
},
"defaultRoundingMode": {
"description": "[Output-only] The default rounding mode of the table.",
"type": "string"
},
"description": {
"description": "[Optional] A user-friendly description of this table.",
"type": "string"
},
"encryptionConfiguration": {
"$ref": "#/definitions/EncryptionConfiguration",
"description": "Custom encryption configuration (e.g., Cloud KMS keys)."
},
"etag": {
"description": "[Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.",
"type": "string"
},
"expirationTime": {
"description": "[Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created tables.",
"format": "int64",
"type": "string"
},
"externalDataConfiguration": {
"$ref": "#/definitions/ExternalDataConfiguration",
"description": "[Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table."
},
"friendlyName": {
"description": "[Optional] A descriptive name for this table.",
"type": "string"
},
"id": {
"description": "[Output-only] An opaque ID uniquely identifying the table.",
"type": "string"
},
"kind": {
"default": "bigquery#table",
"description": "[Output-only] The type of the resource.",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "The labels associated with this table. You can use these to organize and group your tables. 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.",
"type": "object"
},
"lastModifiedTime": {
"description": "[Output-only] The time when this table was last modified, in milliseconds since the epoch.",
"format": "uint64",
"type": "string"
},
"location": {
"description": "[Output-only] The geographic location where the table resides. This value is inherited from the dataset.",
"type": "string"
},
"materializedView": {
"$ref": "#/definitions/MaterializedViewDefinition",
"description": "[Optional] Materialized view definition."
},
"maxStaleness": {
"description": "[Optional] Max staleness of data that could be returned when table or materialized view is queried (formatted as Google SQL Interval type).",
"format": "byte",
"type": "string"
},
"model": {
"$ref": "#/definitions/ModelDefinition",
"description": "[Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries."
},
"numActiveLogicalBytes": {
"description": "[Output-only] Number of logical bytes that are less than 90 days old.",
"format": "int64",
"type": "string"
},
"numActivePhysicalBytes": {
"description": "[Output-only] Number of physical bytes less than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.",
"format": "int64",
"type": "string"
},
"numBytes": {
"description": "[Output-only] The size of this table in bytes, excluding any data in the streaming buffer.",
"format": "int64",
"type": "string"
},
"numLongTermBytes": {
"description": "[Output-only] The number of bytes in the table that are considered \"long-term storage\".",
"format": "int64",
"type": "string"
},
"numLongTermLogicalBytes": {
"description": "[Output-only] Number of logical bytes that are more than 90 days old.",
"format": "int64",
"type": "string"
},
"numLongTermPhysicalBytes": {
"description": "[Output-only] Number of physical bytes more than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.",
"format": "int64",
"type": "string"
},
"numPartitions": {
"description": "[Output-only] The number of partitions present in the table or materialized view. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.",
"format": "int64",
"type": "string"
},
"numPhysicalBytes": {
"description": "[Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.",
"format": "int64",
"type": "string"
},
"numRows": {
"description": "[Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.",
"format": "uint64",
"type": "string"
},
"numTimeTravelPhysicalBytes": {
"description": "[Output-only] Number of physical bytes used by time travel storage (deleted or changed data). This data is not kept in real time, and might be delayed by a few seconds to a few minutes.",
"format": "int64",
"type": "string"
},
"numTotalLogicalBytes": {
"description": "[Output-only] Total number of logical bytes in the table or materialized view.",
"format": "int64",
"type": "string"
},
"numTotalPhysicalBytes": {
"description": "[Output-only] The physical size of this table in bytes. This also includes storage used for time travel. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.",
"format": "int64",
"type": "string"
},
"rangePartitioning": {
"$ref": "#/definitions/RangePartitioning",
"description": "[TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
},
"requirePartitionFilter": {
"default": false,
"description": "[Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.",
"type": "boolean"
},
"schema": {
"$ref": "#/definitions/TableSchema",
"description": "[Optional] Describes the schema of this table."
},
"selfLink": {
"description": "[Output-only] A URL that can be used to access this resource again.",
"type": "string"
},
"snapshotDefinition": {
"$ref": "#/definitions/SnapshotDefinition",
"description": "[Output-only] Snapshot definition."
},
"streamingBuffer": {
"$ref": "#/definitions/Streamingbuffer",
"description": "[Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer."
},
"tableConstraints": {
"$ref": "#/definitions/TableConstraints",
"description": "[Optional] The table constraints on the table."
},
"tableReference": {
"$ref": "#/definitions/TableReference",
"description": "[Required] Reference describing the ID of this table."
},
"timePartitioning": {
"$ref": "#/definitions/TimePartitioning",
"description": "Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
},
"type": {
"description": "[Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.",
"type": "string"
},
"view": {
"$ref": "#/definitions/ViewDefinition",
"description": "[Optional] The view definition."
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/Table",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

tableAka

{
"type": "string",
"pattern": "^gcp://bigquery.googleapis.com/bigquery/projects/[a-z0-9-]{5,29}[a-z0-9]{1}/datasets/[a-zA-Z0-9_]{1,1024}/tables/[a-zA-Z0-9_]{1,1024}$",
"tests": [
{
"description": "Valid - Base case",
"input": "gcp://bigquery.googleapis.com/bigquery/projects/cse-legolas-2/datasets/snap_test_123/tables/test01"
},
{
"description": "Invalid - Malformed resource collection",
"input": "gcp://bigquery.googleapis.com/bigquery/projects/cse-legolas-2/datasets/snap_test_123/table/test01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/tableAka",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

TableConstraints

{
"properties": {
"foreignKeys": {
"description": "[Optional] The foreign keys of the tables.",
"items": {
"properties": {
"columnReferences": {
"items": {
"properties": {
"referencedColumn": {
"type": "string"
},
"referencingColumn": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"referencedTable": {
"properties": {
"datasetId": {
"type": "string"
},
"projectId": {
"type": "string"
},
"tableId": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"primaryKey": {
"description": "[Optional] The primary key of the table.",
"properties": {
"columns": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/TableConstraints",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

TableFieldSchema

{
"properties": {
"categories": {
"description": "[Optional] The categories attached to this field, used for field-level access control.",
"properties": {
"names": {
"description": "A list of category resource names. For example, \"projects/1/taxonomies/2/categories/3\". At most 5 categories are allowed.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"collation": {
"description": "Optional. Collation specification of the field. It only can be set on string type field.",
"type": "string"
},
"defaultValueExpression": {
"description": "Optional. A SQL expression to specify the default value for this field. It can only be set for top level fields (columns). You can use struct or array expression to specify default value for the entire struct or array. The valid SQL expressions are: - Literals for all data types, including STRUCT and ARRAY. - Following functions: - CURRENT_TIMESTAMP - CURRENT_TIME - CURRENT_DATE - CURRENT_DATETIME - GENERATE_UUID - RAND - SESSION_USER - ST_GEOGPOINT - Struct or array composed with the above allowed functions, for example, [CURRENT_DATE(), DATE '2020-01-01']",
"type": "string"
},
"description": {
"description": "[Optional] The field description. The maximum length is 1,024 characters.",
"type": "string"
},
"fields": {
"description": "[Optional] Describes the nested schema fields if the type property is set to RECORD.",
"items": {
"$ref": "#/definitions/TableFieldSchema"
},
"type": "array"
},
"maxLength": {
"description": "[Optional] Maximum length of values of this field for STRINGS or BYTES. If max_length is not specified, no maximum length constraint is imposed on this field. If type = \"STRING\", then max_length represents the maximum UTF-8 length of strings in this field. If type = \"BYTES\", then max_length represents the maximum number of bytes in this field. It is invalid to set this field if type ≠ \"STRING\" and ≠ \"BYTES\".",
"format": "int64",
"type": "string"
},
"mode": {
"description": "[Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.",
"type": "string"
},
"name": {
"description": "[Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 300 characters.",
"type": "string"
},
"policyTags": {
"properties": {
"names": {
"description": "A list of category resource names. For example, \"projects/1/location/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is allowed.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"precision": {
"description": "[Optional] Precision (maximum number of total digits in base 10) and scale (maximum number of digits in the fractional part in base 10) constraints for values of this field for NUMERIC or BIGNUMERIC. It is invalid to set precision or scale if type ≠ \"NUMERIC\" and ≠ \"BIGNUMERIC\". If precision and scale are not specified, no value range constraint is imposed on this field insofar as values are permitted by the type. Values of this NUMERIC or BIGNUMERIC field must be in this range when: - Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] - Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): [-10P + 1, 10P - 1]. Acceptable values for precision and scale if both are specified: - If type = \"NUMERIC\": 1 ≤ precision - scale ≤ 29 and 0 ≤ scale ≤ 9. - If type = \"BIGNUMERIC\": 1 ≤ precision - scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only precision is specified but not scale (and thus scale is interpreted to be equal to zero): - If type = \"NUMERIC\": 1 ≤ precision ≤ 29. - If type = \"BIGNUMERIC\": 1 ≤ precision ≤ 38. If scale is specified but not precision, then it is invalid.",
"format": "int64",
"type": "string"
},
"roundingMode": {
"description": "Optional. Rounding Mode specification of the field. It only can be set on NUMERIC or BIGNUMERIC type fields.",
"type": "string"
},
"scale": {
"description": "[Optional] See documentation for precision.",
"format": "int64",
"type": "string"
},
"type": {
"description": "[Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), NUMERIC, BIGNUMERIC, BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, INTERVAL, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/TableFieldSchema",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

TableReference

{
"properties": {
"datasetId": {
"description": "[Required] The ID of the dataset containing this table.",
"type": "string"
},
"projectId": {
"description": "[Required] The ID of the project containing this table.",
"type": "string"
},
"tableId": {
"description": "[Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/TableReference",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

TableSchema

{
"properties": {
"fields": {
"description": "Describes the fields in a table.",
"items": {
"$ref": "#/definitions/TableFieldSchema"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/TableSchema",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

TimePartitioning

{
"properties": {
"expirationMs": {
"description": "[Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.",
"format": "int64",
"type": "string"
},
"field": {
"description": "[Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.",
"type": "string"
},
"requirePartitionFilter": {
"type": "boolean"
},
"type": {
"description": "[Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/TimePartitioning",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

UserDefinedFunctionResource

{
"description": "This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions",
"properties": {
"inlineCode": {
"description": "[Pick one] 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.",
"type": "string"
},
"resourceUri": {
"description": "[Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/UserDefinedFunctionResource",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}

ViewDefinition

{
"properties": {
"query": {
"description": "[Required] A query that BigQuery executes when the view is referenced.",
"type": "string"
},
"useExplicitColumnNames": {
"description": "True if the column names are explicitly specified. For example by using the 'CREATE VIEW v(c1, c2) AS ...' syntax. Can only be set using BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/",
"type": "boolean"
},
"useLegacySql": {
"description": "Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.",
"type": "boolean"
},
"userDefinedFunctionResources": {
"description": "Describes user-defined function resources used in the query.",
"items": {
"$ref": "#/definitions/UserDefinedFunctionResource"
},
"type": "array"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-bigquery#/definitions/ViewDefinition",
"modUri": "tmod:@turbot/gcp-bigquery"
}
}