An MCP Server Card found through ai-catalog.json or the endpoint's /server-card that declares this endpoint passes. Earlier paths and mcp.json earn half credit.
No matching manifest was found at /mcp.json or /.well-known/mcp.json.
How to fix: Set the top-level tool.title to a short human-readable label (for example, "Search catalog"). Claude directory submission requires tool titles; annotations.title remains accepted only as a legacy fallback.
Add a human-readable title so users do not have to interpret the tool identifier.
Description76/100
List BigQuery dataset IDs and BigLake namespaces in a Google Cloud project.
Supports pagination. Use `page_size` to limit results and `page_token` to retrieve next page.
The description explains the capability, when to use it, and what to expect.
Inputs67/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageSize
Optional. The maximum number of results to return in a single response page. If unset, the default page size of 5000 is used.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageToken
Optional. Page token, returned by a previous call, to request the next page of results.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
projectId
Required. Project ID of the dataset request.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"type": "object",
"$defs": {
"ListFormatDataset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the dataset."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Output only. Same as type. The type of the dataset, one of: * `DEFAULT` - only accessible by owner and authorized accounts, * `PUBLIC` - accessible by everyone, * `LINKED` - linked dataset, * `EXTERNAL` - dataset with definition in external metadata catalog, * `BIGLAKE_ICEBERG` - a Biglake dataset accessible through the Iceberg API, * `BIGLAKE_HIVE` - a Biglake dataset accessible through the Hive API."
},
"location": {
"type": "string",
"description": "The geographic location where the dataset resides."
},
"friendlyName": {
"type": "string",
"description": "An alternate name for the dataset. The friendly name is purely decorative in nature. This can be useful to derive additional information about the dataset."
}
},
"description": "Represents a dataset in BigQuery."
}
},
"properties": {
"datasets": {
"type": "array",
"items": {
"$ref": "#/$defs/ListFormatDataset"
},
"description": "The datasets that matched the request."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used to request the next results page."
}
},
"description": "Response for a list of datasets."
}
Original tool metadata
{
"name": "list_dataset_ids",
"description": "List BigQuery dataset IDs and BigLake namespaces in a Google Cloud project.\nSupports pagination. Use `page_size` to limit results and `page_token` to retrieve next page.\n",
"inputSchema": {
"type": "object",
"required": [
"projectId"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int32",
"description": "Optional. The maximum number of results to return in a single response page. If unset, the default page size of 5000 is used."
},
"pageToken": {
"type": "string",
"description": "Optional. Page token, returned by a previous call, to request the next page of results."
},
"projectId": {
"type": "string",
"description": "Required. Project ID of the dataset request."
}
},
"description": "Request for a list of datasets in a project."
},
"outputSchema": {
"type": "object",
"$defs": {
"ListFormatDataset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the dataset."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Output only. Same as type. The type of the dataset, one of: * `DEFAULT` - only accessible by owner and authorized accounts, * `PUBLIC` - accessible by everyone, * `LINKED` - linked dataset, * `EXTERNAL` - dataset with definition in external metadata catalog, * `BIGLAKE_ICEBERG` - a Biglake dataset accessible through the Iceberg API, * `BIGLAKE_HIVE` - a Biglake dataset accessible through the Hive API."
},
"location": {
"type": "string",
"description": "The geographic location where the dataset resides."
},
"friendlyName": {
"type": "string",
"description": "An alternate name for the dataset. The friendly name is purely decorative in nature. This can be useful to derive additional information about the dataset."
}
},
"description": "Represents a dataset in BigQuery."
}
},
"properties": {
"datasets": {
"type": "array",
"items": {
"$ref": "#/$defs/ListFormatDataset"
},
"description": "The datasets that matched the request."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used to request the next results page."
}
},
"description": "Response for a list of datasets."
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
{
"type": "object",
"$defs": {
"Expr": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression."
},
"location": {
"type": "string",
"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file."
},
"expression": {
"type": "string",
"description": "Textual representation of an expression in Common Expression Language syntax."
},
"description": {
"type": "string",
"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI."
}
},
"description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information."
},
"Access": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "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\"."
},
"view": {
"$ref": "#/$defs/TableReference",
"description": "[Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to views/tables/routines 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."
},
"domain": {
"type": "string",
"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\"."
},
"dataset": {
"$ref": "#/$defs/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."
},
"routine": {
"$ref": "#/$defs/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."
},
"condition": {
"$ref": "#/$defs/Expr",
"description": "Optional. condition for the binding. If CEL expression in this field is true, this access binding will be considered"
},
"iamMember": {
"type": "string",
"description": "[Pick one] Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group."
},
"userByEmail": {
"type": "string",
"description": "[Pick one] An email address of a user to grant access to. For example: [email protected]. Maps to IAM policy member \"user:EMAIL\" or \"serviceAccount:EMAIL\"."
},
"groupByEmail": {
"type": "string",
"description": "[Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member \"group:GROUP\"."
},
"specialGroup": {
"type": "string",
"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."
}
},
"description": "An object that defines dataset access for an entity."
},
"GcpTag": {
"type": "object",
"properties": {
"tagKey": {
"type": "string",
"description": "Required. The namespaced friendly name of the tag key, e.g. \"12345/environment\" where 12345 is org id."
},
"tagValue": {
"type": "string",
"description": "Required. The friendly short name of the tag value, e.g. \"production\"."
}
},
"description": "A global tag managed by Resource Manager. https://cloud.google.com/iam/docs/tags-access-control#definitions"
},
"TableReference": {
"type": "object",
"properties": {
"tableId": {
"type": "string",
"description": "Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`."
},
"datasetId": {
"type": "string",
"description": "Required. The ID of the dataset containing this table."
},
"projectId": {
"type": "string",
"description": "Required. The ID of the project containing this table."
}
}
},
"DatasetReference": {
"type": "object",
"properties": {
"datasetId": {
"type": "string",
"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."
},
"projectId": {
"type": "string",
"description": "Optional. The ID of the project containing this dataset."
}
},
"description": "Identifier for a dataset."
},
"RoutineReference": {
"type": "object",
"properties": {
"datasetId": {
"type": "string",
"description": "Required. The ID of the dataset containing this routine."
},
"projectId": {
"type": "string",
"description": "Required. The ID of the project containing this routine."
},
"routineId": {
"type": "string",
"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."
}
},
"description": "Id path of a routine."
},
"RestrictionConfig": {
"type": "object",
"properties": {
"type": {
"enum": [
"RESTRICTION_TYPE_UNSPECIFIED",
"RESTRICTED_DATA_EGRESS"
],
"type": "string",
"readOnly": true,
"description": "Output only. Specifies the type of dataset/table restriction.",
"x-google-enum-descriptions": [
"Should never be used.",
"Restrict data egress. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
]
}
}
},
"DatasetAccessEntry": {
"type": "object",
"properties": {
"dataset": {
"$ref": "#/$defs/DatasetReference",
"description": "The dataset this entry applies to"
},
"targetTypes": {
"type": "array",
"items": {
"enum": [
"TARGET_TYPE_UNSPECIFIED",
"VIEWS",
"ROUTINES"
],
"type": "string",
"x-google-enum-descriptions": [
"Do not use. You must set a target type explicitly.",
"This entry applies to views in the dataset.",
"This entry applies to routines in the dataset."
]
},
"description": "Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future."
}
},
"description": "Grants all resources of particular types in a particular dataset read access to the current dataset. Similar to how individually authorized views work, updates to any resource granted through its dataset (including creation of new resources) requires read permission to referenced resources, plus write permission to the authorizing dataset."
},
"LinkedDatasetSource": {
"type": "object",
"properties": {
"sourceDataset": {
"$ref": "#/$defs/DatasetReference",
"description": "The source dataset reference contains project numbers and not project ids."
}
},
"description": "A dataset source type which refers to another BigQuery dataset."
},
"LinkedDatasetMetadata": {
"type": "object",
"properties": {
"linkState": {
"enum": [
"LINK_STATE_UNSPECIFIED",
"LINKED",
"UNLINKED"
],
"type": "string",
"readOnly": true,
"description": "Output only. Specifies whether Linked Dataset is currently in a linked state or not.",
"x-google-enum-descriptions": [
"The default value. Default to the LINKED state.",
"Normal Linked Dataset state. Data is queryable via the Linked Dataset.",
"Data publisher or owner has unlinked this Linked Dataset. It means you can no longer query or see the data in the Linked Dataset."
]
}
},
"description": "Metadata about the Linked Dataset."
},
"EncryptionConfiguration": {
"type": "object",
"properties": {
"kmsKeyName": {
"type": "string",
"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."
}
},
"description": "Configuration for Cloud KMS encryption settings."
},
"ExternalDatasetReference": {
"type": "object",
"properties": {
"connection": {
"type": "string",
"description": "Required. The connection id that is used to access the external_source. Format: projects/{project_id}/locations/{location_id}/connections/{connection_id}"
},
"externalSource": {
"type": "string",
"description": "Required. External source that backs this dataset."
}
},
"description": "Configures the access a dataset defined in an external metadata storage."
},
"ExternalCatalogDatasetOptions": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"description": "Optional. A map of key value pairs defining the parameters and properties of the open source schema. Maximum size of 2MiB.",
"additionalProperties": {
"type": "string"
}
},
"defaultStorageLocationUri": {
"type": "string",
"description": "Optional. The storage location URI for all tables in the dataset. Equivalent to hive metastore's database locationUri. Maximum length of 1024 characters."
}
},
"description": "Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema, or namespace represented by the current dataset."
}
},
"properties": {
"id": {
"type": "string",
"readOnly": true,
"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."
},
"etag": {
"type": "string",
"readOnly": true,
"description": "Output only. A hash of the resource."
},
"kind": {
"type": "string",
"default": "bigquery#dataset",
"readOnly": true,
"description": "Output only. The resource type."
},
"tags": {
"type": "array",
"items": {
"$ref": "#/$defs/GcpTag"
},
"readOnly": true,
"deprecated": true,
"description": "Output only. Tags for the dataset. To provide tags as inputs, use the `resourceTags` field."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Output only. Same as `type` in `ListFormatDataset`. The type of the dataset, one of: * DEFAULT - only accessible by owner and authorized accounts, * PUBLIC - accessible by everyone, * LINKED - linked dataset, * EXTERNAL - dataset with definition in external metadata catalog, * BIGLAKE_ICEBERG - a Biglake dataset accessible through the Iceberg API, * BIGLAKE_HIVE - a Biglake dataset accessible through the Hive API."
},
"access": {
"type": "array",
"items": {
"$ref": "#/$defs/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; If you patch a dataset, then this field is overwritten by the patched dataset's access field. To add entities, you must supply the entire existing access array in addition to any new entities that you want to add."
},
"labels": {
"type": "object",
"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](https://cloud.google.com/bigquery/docs/creating-managing-labels#creating_and_updating_dataset_labels) for more information.",
"additionalProperties": {
"type": "string"
}
},
"location": {
"type": "string",
"description": "The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations."
},
"selfLink": {
"type": "string",
"readOnly": true,
"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."
},
"description": {
"type": "string",
"description": "Optional. A user-friendly description of the dataset."
},
"creationTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The time when this dataset was created, in milliseconds since the epoch."
},
"friendlyName": {
"type": "string",
"description": "Optional. A descriptive name for the dataset."
},
"resourceTags": {
"type": "object",
"description": "Optional. The [tags](https://cloud.google.com/bigquery/docs/tags) attached to this dataset. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details.",
"additionalProperties": {
"type": "string"
}
},
"restrictions": {
"$ref": "#/$defs/RestrictionConfig",
"readOnly": true,
"description": "Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain accesses on the dataset and all its tables based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
},
"satisfiesPzi": {
"type": "boolean",
"readOnly": true,
"description": "Output only. Reserved for future use."
},
"satisfiesPzs": {
"type": "boolean",
"readOnly": true,
"description": "Output only. Reserved for future use."
},
"catalogSource": {
"type": "string",
"readOnly": true,
"description": "Output only. The origin of the dataset, one of: * (Unset) - Native BigQuery Dataset * BIGLAKE - Dataset is backed by a namespace stored natively in Biglake"
},
"datasetReference": {
"$ref": "#/$defs/DatasetReference",
"description": "Required. A reference that identifies the dataset."
},
"defaultCollation": {
"type": "string",
"description": "Optional. Defines the default collation specification of future tables created in the dataset. If a table is created in this dataset without table-level default collation, then the table inherits the dataset default collation, which is applied to the string fields that do not have explicit collation specified. A change to this field affects only tables created afterwards, and does not alter the existing tables. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"lastModifiedTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The date when this dataset was last modified, in milliseconds since the epoch."
},
"isCaseInsensitive": {
"type": "boolean",
"description": "Optional. TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By default, this is FALSE, which means the dataset and its table names are case-sensitive. This field does not affect routine references."
},
"maxTimeTravelHours": {
"type": "string",
"format": "int64",
"description": "Optional. Defines the time travel window in hours. The value can be from 48 to 168 hours (2 to 7 days). The default value is 168 hours if this is not set."
},
"defaultRoundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Defines the default rounding mode specification of new tables created within this dataset. During table creation, if this field is specified, the table within this dataset will inherit the default rounding mode of the dataset. Setting the default rounding mode on a table overrides this option. Existing tables in the dataset are unaffected. If columns are defined during that table creation, they will immediately inherit the table's default rounding mode, unless otherwise specified.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"linkedDatasetSource": {
"$ref": "#/$defs/LinkedDatasetSource",
"description": "Optional. The source dataset reference when the dataset is of type LINKED. For all other dataset types it is not set. This field cannot be updated once it is set. Any attempt to update this field using Update and Patch API Operations will be ignored."
},
"storageBillingModel": {
"enum": [
"STORAGE_BILLING_MODEL_UNSPECIFIED",
"LOGICAL",
"PHYSICAL"
],
"type": "string",
"description": "Optional. Updates storage_billing_model for the dataset.",
"x-google-enum-descriptions": [
"Value not set.",
"Billing for logical bytes.",
"Billing for physical bytes."
]
},
"linkedDatasetMetadata": {
"$ref": "#/$defs/LinkedDatasetMetadata",
"readOnly": true,
"description": "Output only. Metadata about the LinkedDataset. Filled out when the dataset type is LINKED."
},
"defaultTableExpirationMs": {
"type": "string",
"format": "int64",
"description": "Optional. The default lifetime of all tables in the dataset, in milliseconds. The minimum lifetime value is 3600000 milliseconds (one hour). To clear an existing default expiration with a PATCH request, set to 0. 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."
},
"externalDatasetReference": {
"$ref": "#/$defs/ExternalDatasetReference",
"description": "Optional. Reference to a read-only external dataset defined in data catalogs outside of BigQuery. Filled out when the dataset type is EXTERNAL."
},
"defaultPartitionExpirationMs": {
"type": "string",
"format": "int64",
"description": "This default partition expiration, expressed in milliseconds. When new time-partitioned tables are created in a dataset where this property is set, the table will inherit this value, propagated as the `TimePartitioning.expirationMs` property on the new table. If you set `TimePartitioning.expirationMs` explicitly when creating a table, the `defaultPartitionExpirationMs` of the containing dataset is ignored. When creating a partitioned table, if `defaultPartitionExpirationMs` is set, the `defaultTableExpirationMs` value is ignored and the table will not be inherit a table expiration deadline."
},
"externalCatalogDatasetOptions": {
"$ref": "#/$defs/ExternalCatalogDatasetOptions",
"description": "Optional. Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema or namespace represented by the current dataset."
},
"defaultEncryptionConfiguration": {
"$ref": "#/$defs/EncryptionConfiguration",
"description": "The default encryption key for all tables in the dataset. After this property is set, the encryption key of all newly-created tables in the dataset is set to this value unless the table creation request or query explicitly overrides the key."
}
},
"description": "Represents a BigQuery dataset."
}
Original tool metadata
{
"name": "get_dataset_info",
"description": "Get metadata information about a BigQuery dataset or BigLake namespace.",
"inputSchema": {
"type": "object",
"required": [
"projectId",
"datasetId"
],
"properties": {
"datasetId": {
"type": "string",
"description": "Required. Dataset ID of the dataset request."
},
"projectId": {
"type": "string",
"description": "Required. Project ID of the dataset request."
}
},
"description": "Request for a dataset."
},
"outputSchema": {
"type": "object",
"$defs": {
"Expr": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression."
},
"location": {
"type": "string",
"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file."
},
"expression": {
"type": "string",
"description": "Textual representation of an expression in Common Expression Language syntax."
},
"description": {
"type": "string",
"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI."
}
},
"description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information."
},
"Access": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "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\"."
},
"view": {
"$ref": "#/$defs/TableReference",
"description": "[Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to views/tables/routines 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."
},
"domain": {
"type": "string",
"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\"."
},
"dataset": {
"$ref": "#/$defs/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."
},
"routine": {
"$ref": "#/$defs/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."
},
"condition": {
"$ref": "#/$defs/Expr",
"description": "Optional. condition for the binding. If CEL expression in this field is true, this access binding will be considered"
},
"iamMember": {
"type": "string",
"description": "[Pick one] Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group."
},
"userByEmail": {
"type": "string",
"description": "[Pick one] An email address of a user to grant access to. For example: [email protected]. Maps to IAM policy member \"user:EMAIL\" or \"serviceAccount:EMAIL\"."
},
"groupByEmail": {
"type": "string",
"description": "[Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member \"group:GROUP\"."
},
"specialGroup": {
"type": "string",
"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."
}
},
"description": "An object that defines dataset access for an entity."
},
"GcpTag": {
"type": "object",
"properties": {
"tagKey": {
"type": "string",
"description": "Required. The namespaced friendly name of the tag key, e.g. \"12345/environment\" where 12345 is org id."
},
"tagValue": {
"type": "string",
"description": "Required. The friendly short name of the tag value, e.g. \"production\"."
}
},
"description": "A global tag managed by Resource Manager. https://cloud.google.com/iam/docs/tags-access-control#definitions"
},
"TableReference": {
"type": "object",
"properties": {
"tableId": {
"type": "string",
"description": "Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`."
},
"datasetId": {
"type": "string",
"description": "Required. The ID of the dataset containing this table."
},
"projectId": {
"type": "string",
"description": "Required. The ID of the project containing this table."
}
}
},
"DatasetReference": {
"type": "object",
"properties": {
"datasetId": {
"type": "string",
"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."
},
"projectId": {
"type": "string",
"description": "Optional. The ID of the project containing this dataset."
}
},
"description": "Identifier for a dataset."
},
"RoutineReference": {
"type": "object",
"properties": {
"datasetId": {
"type": "string",
"description": "Required. The ID of the dataset containing this routine."
},
"projectId": {
"type": "string",
"description": "Required. The ID of the project containing this routine."
},
"routineId": {
"type": "string",
"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."
}
},
"description": "Id path of a routine."
},
"RestrictionConfig": {
"type": "object",
"properties": {
"type": {
"enum": [
"RESTRICTION_TYPE_UNSPECIFIED",
"RESTRICTED_DATA_EGRESS"
],
"type": "string",
"readOnly": true,
"description": "Output only. Specifies the type of dataset/table restriction.",
"x-google-enum-descriptions": [
"Should never be used.",
"Restrict data egress. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
]
}
}
},
"DatasetAccessEntry": {
"type": "object",
"properties": {
"dataset": {
"$ref": "#/$defs/DatasetReference",
"description": "The dataset this entry applies to"
},
"targetTypes": {
"type": "array",
"items": {
"enum": [
"TARGET_TYPE_UNSPECIFIED",
"VIEWS",
"ROUTINES"
],
"type": "string",
"x-google-enum-descriptions": [
"Do not use. You must set a target type explicitly.",
"This entry applies to views in the dataset.",
"This entry applies to routines in the dataset."
]
},
"description": "Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future."
}
},
"description": "Grants all resources of particular types in a particular dataset read access to the current dataset. Similar to how individually authorized views work, updates to any resource granted through its dataset (including creation of new resources) requires read permission to referenced resources, plus write permission to the authorizing dataset."
},
"LinkedDatasetSource": {
"type": "object",
"properties": {
"sourceDataset": {
"$ref": "#/$defs/DatasetReference",
"description": "The source dataset reference contains project numbers and not project ids."
}
},
"description": "A dataset source type which refers to another BigQuery dataset."
},
"LinkedDatasetMetadata": {
"type": "object",
"properties": {
"linkState": {
"enum": [
"LINK_STATE_UNSPECIFIED",
"LINKED",
"UNLINKED"
],
"type": "string",
"readOnly": true,
"description": "Output only. Specifies whether Linked Dataset is currently in a linked state or not.",
"x-google-enum-descriptions": [
"The default value. Default to the LINKED state.",
"Normal Linked Dataset state. Data is queryable via the Linked Dataset.",
"Data publisher or owner has unlinked this Linked Dataset. It means you can no longer query or see the data in the Linked Dataset."
]
}
},
"description": "Metadata about the Linked Dataset."
},
"EncryptionConfiguration": {
"type": "object",
"properties": {
"kmsKeyName": {
"type": "string",
"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."
}
},
"description": "Configuration for Cloud KMS encryption settings."
},
"ExternalDatasetReference": {
"type": "object",
"properties": {
"connection": {
"type": "string",
"description": "Required. The connection id that is used to access the external_source. Format: projects/{project_id}/locations/{location_id}/connections/{connection_id}"
},
"externalSource": {
"type": "string",
"description": "Required. External source that backs this dataset."
}
},
"description": "Configures the access a dataset defined in an external metadata storage."
},
"ExternalCatalogDatasetOptions": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"description": "Optional. A map of key value pairs defining the parameters and properties of the open source schema. Maximum size of 2MiB.",
"additionalProperties": {
"type": "string"
}
},
"defaultStorageLocationUri": {
"type": "string",
"description": "Optional. The storage location URI for all tables in the dataset. Equivalent to hive metastore's database locationUri. Maximum length of 1024 characters."
}
},
"description": "Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema, or namespace represented by the current dataset."
}
},
"properties": {
"id": {
"type": "string",
"readOnly": true,
"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."
},
"etag": {
"type": "string",
"readOnly": true,
"description": "Output only. A hash of the resource."
},
"kind": {
"type": "string",
"default": "bigquery#dataset",
"readOnly": true,
"description": "Output only. The resource type."
},
"tags": {
"type": "array",
"items": {
"$ref": "#/$defs/GcpTag"
},
"readOnly": true,
"deprecated": true,
"description": "Output only. Tags for the dataset. To provide tags as inputs, use the `resourceTags` field."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Output only. Same as `type` in `ListFormatDataset`. The type of the dataset, one of: * DEFAULT - only accessible by owner and authorized accounts, * PUBLIC - accessible by everyone, * LINKED - linked dataset, * EXTERNAL - dataset with definition in external metadata catalog, * BIGLAKE_ICEBERG - a Biglake dataset accessible through the Iceberg API, * BIGLAKE_HIVE - a Biglake dataset accessible through the Hive API."
},
"access": {
"type": "array",
"items": {
"$ref": "#/$defs/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; If you patch a dataset, then this field is overwritten by the patched dataset's access field. To add entities, you must supply the entire existing access array in addition to any new entities that you want to add."
},
"labels": {
"type": "object",
"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](https://cloud.google.com/bigquery/docs/creating-managing-labels#creating_and_updating_dataset_labels) for more information.",
"additionalProperties": {
"type": "string"
}
},
"location": {
"type": "string",
"description": "The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations."
},
"selfLink": {
"type": "string",
"readOnly": true,
"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."
},
"description": {
"type": "string",
"description": "Optional. A user-friendly description of the dataset."
},
"creationTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The time when this dataset was created, in milliseconds since the epoch."
},
"friendlyName": {
"type": "string",
"description": "Optional. A descriptive name for the dataset."
},
"resourceTags": {
"type": "object",
"description": "Optional. The [tags](https://cloud.google.com/bigquery/docs/tags) attached to this dataset. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details.",
"additionalProperties": {
"type": "string"
}
},
"restrictions": {
"$ref": "#/$defs/RestrictionConfig",
"readOnly": true,
"description": "Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain accesses on the dataset and all its tables based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
},
"satisfiesPzi": {
"type": "boolean",
"readOnly": true,
"description": "Output only. Reserved for future use."
},
"satisfiesPzs": {
"type": "boolean",
"readOnly": true,
"description": "Output only. Reserved for future use."
},
"catalogSource": {
"type": "string",
"readOnly": true,
"description": "Output only. The origin of the dataset, one of: * (Unset) - Native BigQuery Dataset * BIGLAKE - Dataset is backed by a namespace stored natively in Biglake"
},
"datasetReference": {
"$ref": "#/$defs/DatasetReference",
"description": "Required. A reference that identifies the dataset."
},
"defaultCollation": {
"type": "string",
"description": "Optional. Defines the default collation specification of future tables created in the dataset. If a table is created in this dataset without table-level default collation, then the table inherits the dataset default collation, which is applied to the string fields that do not have explicit collation specified. A change to this field affects only tables created afterwards, and does not alter the existing tables. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"lastModifiedTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The date when this dataset was last modified, in milliseconds since the epoch."
},
"isCaseInsensitive": {
"type": "boolean",
"description": "Optional. TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By default, this is FALSE, which means the dataset and its table names are case-sensitive. This field does not affect routine references."
},
"maxTimeTravelHours": {
"type": "string",
"format": "int64",
"description": "Optional. Defines the time travel window in hours. The value can be from 48 to 168 hours (2 to 7 days). The default value is 168 hours if this is not set."
},
"defaultRoundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Defines the default rounding mode specification of new tables created within this dataset. During table creation, if this field is specified, the table within this dataset will inherit the default rounding mode of the dataset. Setting the default rounding mode on a table overrides this option. Existing tables in the dataset are unaffected. If columns are defined during that table creation, they will immediately inherit the table's default rounding mode, unless otherwise specified.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"linkedDatasetSource": {
"$ref": "#/$defs/LinkedDatasetSource",
"description": "Optional. The source dataset reference when the dataset is of type LINKED. For all other dataset types it is not set. This field cannot be updated once it is set. Any attempt to update this field using Update and Patch API Operations will be ignored."
},
"storageBillingModel": {
"enum": [
"STORAGE_BILLING_MODEL_UNSPECIFIED",
"LOGICAL",
"PHYSICAL"
],
"type": "string",
"description": "Optional. Updates storage_billing_model for the dataset.",
"x-google-enum-descriptions": [
"Value not set.",
"Billing for logical bytes.",
"Billing for physical bytes."
]
},
"linkedDatasetMetadata": {
"$ref": "#/$defs/LinkedDatasetMetadata",
"readOnly": true,
"description": "Output only. Metadata about the LinkedDataset. Filled out when the dataset type is LINKED."
},
"defaultTableExpirationMs": {
"type": "string",
"format": "int64",
"description": "Optional. The default lifetime of all tables in the dataset, in milliseconds. The minimum lifetime value is 3600000 milliseconds (one hour). To clear an existing default expiration with a PATCH request, set to 0. 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."
},
"externalDatasetReference": {
"$ref": "#/$defs/ExternalDatasetReference",
"description": "Optional. Reference to a read-only external dataset defined in data catalogs outside of BigQuery. Filled out when the dataset type is EXTERNAL."
},
"defaultPartitionExpirationMs": {
"type": "string",
"format": "int64",
"description": "This default partition expiration, expressed in milliseconds. When new time-partitioned tables are created in a dataset where this property is set, the table will inherit this value, propagated as the `TimePartitioning.expirationMs` property on the new table. If you set `TimePartitioning.expirationMs` explicitly when creating a table, the `defaultPartitionExpirationMs` of the containing dataset is ignored. When creating a partitioned table, if `defaultPartitionExpirationMs` is set, the `defaultTableExpirationMs` value is ignored and the table will not be inherit a table expiration deadline."
},
"externalCatalogDatasetOptions": {
"$ref": "#/$defs/ExternalCatalogDatasetOptions",
"description": "Optional. Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema or namespace represented by the current dataset."
},
"defaultEncryptionConfiguration": {
"$ref": "#/$defs/EncryptionConfiguration",
"description": "The default encryption key for all tables in the dataset. After this property is set, the encryption key of all newly-created tables in the dataset is set to this value unless the table creation request or query explicitly overrides the key."
}
},
"description": "Represents a BigQuery dataset."
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description73/100
List table ids in a BigQuery dataset or BigLake namespace.
Supports pagination. Use `page_size` to limit results and `page_token` to retrieve next page.
The description explains the capability, when to use it, and what to expect.
Inputs81/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
datasetId
Required. Dataset ID of the table request.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageSize
Optional. The maximum number of results to return in a single response page. If unset, the default page size of 5000 is used.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageToken
Optional. Page token, returned by a previous call, to request the next page of results.
Clear enough to supply this argument.
projectId
Required. Project ID of the table request.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
{
"type": "object",
"$defs": {
"ListFormatTable": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the table."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Output only. The type of table (e.g. TABLE, VIEW, EXTERNAL, MATERIALIZED_VIEW, SNAPSHOT)."
}
},
"description": "Represents a table in BigQuery."
}
},
"properties": {
"tables": {
"type": "array",
"items": {
"$ref": "#/$defs/ListFormatTable"
},
"description": "The tables that matched the request."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used to request the next results page."
}
},
"description": "Response for a list of tables."
}
Original tool metadata
{
"name": "list_table_ids",
"description": "List table ids in a BigQuery dataset or BigLake namespace.\nSupports pagination. Use `page_size` to limit results and `page_token` to retrieve next page.\n",
"inputSchema": {
"type": "object",
"required": [
"projectId",
"datasetId"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int32",
"description": "Optional. The maximum number of results to return in a single response page. If unset, the default page size of 5000 is used."
},
"datasetId": {
"type": "string",
"description": "Required. Dataset ID of the table request."
},
"pageToken": {
"type": "string",
"description": "Optional. Page token, returned by a previous call, to request the next page of results."
},
"projectId": {
"type": "string",
"description": "Required. Project ID of the table request."
}
},
"description": "Request for a list of tables in a dataset."
},
"outputSchema": {
"type": "object",
"$defs": {
"ListFormatTable": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the table."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Output only. The type of table (e.g. TABLE, VIEW, EXTERNAL, MATERIALIZED_VIEW, SNAPSHOT)."
}
},
"description": "Represents a table in BigQuery."
}
},
"properties": {
"tables": {
"type": "array",
"items": {
"$ref": "#/$defs/ListFormatTable"
},
"description": "The tables that matched the request."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used to request the next results page."
}
},
"description": "Response for a list of tables."
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
{
"type": "object",
"$defs": {
"Range": {
"type": "object",
"properties": {
"end": {
"type": "string",
"description": "Required. The end of range partitioning, exclusive. This field is an INT64 value represented as a string."
},
"start": {
"type": "string",
"description": "Required. The start of range partitioning, inclusive. This field is an INT64 value represented as a string."
},
"interval": {
"type": "string",
"description": "Required. The width of each interval. This field is an INT64 value represented as a string."
}
},
"description": "Defines the ranges for range partitioning."
},
"SerDeInfo": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Optional. Name of the SerDe. The maximum length is 256 characters."
},
"parameters": {
"type": "object",
"description": "Optional. Key-value pairs that define the initialization parameters for the serialization library. Maximum size 10 Kib.",
"additionalProperties": {
"type": "string"
}
},
"serializationLibrary": {
"type": "string",
"description": "Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters."
}
},
"description": "Serializer and deserializer information."
},
"Clustering": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. The ordering of the clustering fields should be prioritized from most to least important for filtering purposes. For additional information, see [Introduction to clustered tables](https://cloud.google.com/bigquery/docs/clustered-tables#limitations)."
}
},
"description": "Configures table clustering."
},
"CsvOptions": {
"type": "object",
"properties": {
"quote": {
"type": "string",
"default": "\"",
"pattern": ".?",
"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. To include the specific quote character within a quoted value, precede it with an additional matching quote character. For example, if you want to escape the default character ' \" ', use ' \"\" '."
},
"encoding": {
"type": "string",
"description": "Optional. The character encoding of the data. The supported values are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. 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."
},
"nullMarker": {
"type": "string",
"description": "Optional. Specifies a string that represents a null value in a CSV file. For example, if you specify \"\\N\", BigQuery interprets \"\\N\" as a null value when querying 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."
},
"nullMarkers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. A list of strings represented as SQL NULL value in a CSV file. null_marker and null_markers can't be set at the same time. If null_marker is set, null_markers has to be not set. If null_markers is set, null_marker has to be not set. If both null_marker and null_markers are set at the same time, a user error would be thrown. Any strings listed in null_markers, including empty string would be interpreted as SQL NULL. This applies to all column types."
},
"fieldDelimiter": {
"type": "string",
"description": "Optional. The separator character for fields in a CSV file. The separator is interpreted as a single byte. For files encoded in ISO-8859-1, any single character can be used as a separator. For files encoded in UTF-8, characters represented in decimal range 1-127 (U+0001-U+007F) can be used without any modification. UTF-8 characters encoded with multiple bytes (i.e. U+0080 and above) will have only the first byte used for separating fields. The remaining bytes will be treated as a part of the field. BigQuery also supports the escape sequence \"\\t\" (U+0009) to specify a tab separator. The default value is comma (\",\", U+002C)."
},
"allowJaggedRows": {
"type": "boolean",
"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."
},
"skipLeadingRows": {
"type": "string",
"format": "int64",
"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."
},
"sourceColumnMatch": {
"type": "string",
"description": "Optional. Controls the strategy used to match loaded columns to the schema. If not set, a sensible default is chosen based on how the schema is provided. If autodetect is used, then columns are matched by name. Otherwise, columns are matched by position. This is done to keep the behavior backward-compatible. Acceptable values are: POSITION - matches by position. This assumes that the columns are ordered the same way as the schema. NAME - matches by name. This reads the header row as column names and reorders columns to match the field names in the schema."
},
"allowQuotedNewlines": {
"type": "boolean",
"description": "Optional. Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false."
},
"preserveAsciiControlCharacters": {
"type": "boolean",
"description": "Optional. Indicates if the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\\x00' to '\\x1F') are preserved."
}
},
"description": "Information related to a CSV data source."
},
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"ForeignKey": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Optional. Set only if the foreign key constraint is named."
},
"referencedTable": {
"$ref": "#/$defs/TableReference",
"description": "Required. The table that holds the primary key and is referenced by this foreign key."
},
"columnReferences": {
"type": "array",
"items": {
"$ref": "#/$defs/ColumnReference"
},
"description": "Required. The columns that compose the foreign key."
}
},
"description": "Represents a foreign key constraint on a table's columns."
},
"PrimaryKey": {
"type": "object",
"properties": {
"columns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required. The columns that are composed of the primary key constraint."
}
},
"description": "Represents the primary key constraint on a table's columns."
},
"AvroOptions": {
"type": "object",
"properties": {
"useAvroLogicalTypes": {
"type": "boolean",
"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)."
}
},
"description": "Options for external data sources."
},
"JsonOptions": {
"type": "object",
"properties": {
"encoding": {
"type": "string",
"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."
}
},
"description": "Json Options for load and make external tables."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"PrivacyPolicy": {
"type": "object",
"properties": {
"joinRestrictionPolicy": {
"$ref": "#/$defs/JoinRestrictionPolicy",
"description": "Optional. Join restriction policy is outside of the one of policies, since this policy can be set along with other policies. This policy gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view."
},
"differentialPrivacyPolicy": {
"$ref": "#/$defs/DifferentialPrivacyPolicy",
"description": "Optional. Policy used for differential privacy."
},
"aggregationThresholdPolicy": {
"$ref": "#/$defs/AggregationThresholdPolicy",
"description": "Optional. Policy used for aggregation thresholds."
}
},
"description": "Represents privacy policy that contains the privacy requirements specified by the data owner. Currently, this is only supported on views."
},
"BigtableColumn": {
"type": "object",
"properties": {
"type": {
"type": "string",
"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 * JSON 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."
},
"encoding": {
"type": "string",
"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. PROTO_BINARY - indicates values are encoded using serialized proto messages. This can only be used in combination with JSON type. '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."
},
"fieldName": {
"type": "string",
"description": "Optional. If the qualifier is not a valid BigQuery field identifier i.e. does not match a-zA-Z*, a valid identifier must be provided as the column field name and is used as field name in queries."
},
"protoConfig": {
"$ref": "#/$defs/BigtableProtoConfig",
"description": "Optional. Protobuf-specific configurations, only takes effect when the encoding is PROTO_BINARY."
},
"onlyReadLatest": {
"type": "boolean",
"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."
},
"qualifierString": {
"type": "string",
"description": "Qualifier string."
},
"qualifierEncoded": {
"type": "string",
"format": "byte",
"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 valid identifier must be provided as field_name."
}
},
"description": "Information related to a Bigtable column."
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ParquetOptions": {
"type": "object",
"properties": {
"enumAsString": {
"type": "boolean",
"description": "Optional. Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default."
},
"mapTargetType": {
"enum": [
"MAP_TARGET_TYPE_UNSPECIFIED",
"ARRAY_OF_STRUCT"
],
"type": "string",
"description": "Optional. Indicates how to represent a Parquet map if present.",
"x-google-enum-descriptions": [
"In this mode, the map will have the following schema: struct map_field_name { repeated struct key_value { key value } }.",
"In this mode, the map will have the following schema: repeated struct map_field_name { key value }."
]
},
"enableListInference": {
"type": "boolean",
"description": "Optional. Indicates whether to use schema inference specifically for Parquet LIST logical type."
}
},
"description": "Parquet Options for load and make external tables."
},
"TableReference": {
"type": "object",
"properties": {
"tableId": {
"type": "string",
"description": "Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`."
},
"datasetId": {
"type": "string",
"description": "Required. The ID of the dataset containing this table."
},
"projectId": {
"type": "string",
"description": "Required. The ID of the project containing this table."
}
}
},
"ViewDefinition": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. A query that BigQuery executes when the view is referenced."
},
"useLegacySql": {
"type": "boolean",
"description": "Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view uses BigQuery's [GoogleSQL](https://docs.cloud.google.com/bigquery/docs/introduction-sql). Queries and views that reference this view must use the same flag value. A wrapper is used here because the default value is True."
},
"privacyPolicy": {
"$ref": "#/$defs/PrivacyPolicy",
"description": "Optional. Specifies the privacy policy for the view."
},
"foreignDefinitions": {
"type": "array",
"items": {
"$ref": "#/$defs/ForeignViewDefinition"
},
"description": "Optional. Foreign view representations."
},
"useExplicitColumnNames": {
"type": "boolean",
"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 for GoogleSQL views."
},
"userDefinedFunctionResources": {
"type": "array",
"items": {
"$ref": "#/$defs/UserDefinedFunctionResource"
},
"description": "Describes user-defined function resources used in the query."
}
},
"description": "Describes the definition of a logical view."
},
"BigtableOptions": {
"type": "object",
"properties": {
"columnFamilies": {
"type": "array",
"items": {
"$ref": "#/$defs/BigtableColumnFamily"
},
"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."
},
"readRowkeyAsString": {
"type": "boolean",
"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."
},
"outputColumnFamiliesAsJson": {
"type": "boolean",
"description": "Optional. If field is true, then each column family will be read as a single JSON column. Otherwise they are read as a repeated cell structure containing timestamp/value tuples. The default value is false."
},
"ignoreUnspecifiedColumnFamilies": {
"type": "boolean",
"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."
}
},
"description": "Options specific to Google Cloud Bigtable data sources."
},
"CloneDefinition": {
"type": "object",
"properties": {
"cloneTime": {
"type": "string",
"format": "date-time",
"description": "Required. The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format."
},
"baseTableReference": {
"$ref": "#/$defs/TableReference",
"description": "Required. Reference describing the ID of the table that was cloned."
}
},
"description": "Information about base table and clone time of a table clone."
},
"ColumnReference": {
"type": "object",
"properties": {
"referencedColumn": {
"type": "string",
"description": "Required. The column in the primary key that are referenced by the referencing_column."
},
"referencingColumn": {
"type": "string",
"description": "Required. The column that composes the foreign key."
}
},
"description": "The pair of the foreign key column and primary key column."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"Streamingbuffer": {
"type": "object",
"properties": {
"estimatedRows": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. A lower-bound estimate of the number of rows currently in the streaming buffer."
},
"estimatedBytes": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. A lower-bound estimate of the number of bytes currently in the streaming buffer."
},
"oldestEntryTime": {
"type": "string",
"format": "uint64",
"readOnly": true,
"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."
}
}
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableConstraints": {
"type": "object",
"properties": {
"primaryKey": {
"$ref": "#/$defs/PrimaryKey",
"description": "Optional. Represents a primary key constraint on a table's columns. Present only if the table has a primary key. The primary key is not enforced."
},
"foreignKeys": {
"type": "array",
"items": {
"$ref": "#/$defs/ForeignKey"
},
"description": "Optional. Present only if the table has a foreign key. The foreign key is not enforced."
}
},
"description": "The TableConstraints defines the primary key and foreign key."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"TimePartitioning": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively."
},
"field": {
"type": "string",
"description": "Optional. 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."
},
"expirationMs": {
"type": "string",
"format": "int64",
"description": "Optional. Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value."
},
"requirePartitionFilter": {
"type": "boolean",
"default": "false",
"deprecated": true,
"description": "If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. This field is deprecated; please set the field with the same name on the table itself instead. This field needs a wrapper because we want to output the default value, false, if the user explicitly set it."
}
}
},
"PartitionedColumn": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Required. The name of the partition column."
}
},
"description": "The partitioning column information."
},
"RangePartitioning": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Required. The name of the column to partition the table on. It must be a top-level, INT64 column whose mode is NULLABLE or REQUIRED."
},
"range": {
"$ref": "#/$defs/Range",
"description": "Defines the ranges for range partitioning."
}
}
},
"RestrictionConfig": {
"type": "object",
"properties": {
"type": {
"enum": [
"RESTRICTION_TYPE_UNSPECIFIED",
"RESTRICTED_DATA_EGRESS"
],
"type": "string",
"readOnly": true,
"description": "Output only. Specifies the type of dataset/table restriction.",
"x-google-enum-descriptions": [
"Should never be used.",
"Restrict data egress. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
]
}
}
},
"StorageDescriptor": {
"type": "object",
"properties": {
"serdeInfo": {
"$ref": "#/$defs/SerDeInfo",
"description": "Optional. Serializer and deserializer information."
},
"inputFormat": {
"type": "string",
"description": "Optional. Specifies the fully qualified class name of the InputFormat (e.g. \"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"). The maximum length is 128 characters."
},
"locationUri": {
"type": "string",
"description": "Optional. The physical location of the table (e.g. `gs://spark-dataproc-data/pangea-data/case_sensitive/` or `gs://spark-dataproc-data/pangea-data/*`). The maximum length is 2056 bytes."
},
"outputFormat": {
"type": "string",
"description": "Optional. Specifies the fully qualified class name of the OutputFormat (e.g. \"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"). The maximum length is 128 characters."
}
},
"description": "Contains information about how a table's data is stored and accessed by open source query engines."
},
"SnapshotDefinition": {
"type": "object",
"properties": {
"snapshotTime": {
"type": "string",
"format": "date-time",
"description": "Required. The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format."
},
"baseTableReference": {
"$ref": "#/$defs/TableReference",
"description": "Required. Reference describing the ID of the table that was snapshot."
}
},
"description": "Information about base table and snapshot time of the snapshot."
},
"BigtableProtoConfig": {
"type": "object",
"properties": {
"schemaBundleId": {
"type": "string",
"description": "Optional. The ID of the Bigtable SchemaBundle resource associated with this protobuf. The ID should be referred to within the parent table, e.g., `foo` rather than `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/foo`. See [more details on Bigtable SchemaBundles](https://docs.cloud.google.com/bigtable/docs/create-manage-protobuf-schemas)."
},
"protoMessageName": {
"type": "string",
"description": "Optional. The fully qualified proto message name of the protobuf. In the format of \"foo.bar.Message\"."
}
},
"description": "Information related to a Bigtable protobuf column."
},
"GoogleSheetsOptions": {
"type": "object",
"properties": {
"range": {
"type": "string",
"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"
},
"skipLeadingRows": {
"type": "string",
"format": "int64",
"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, 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."
}
},
"description": "Options specific to Google Sheets data sources."
},
"BigLakeConfiguration": {
"type": "object",
"properties": {
"fileFormat": {
"enum": [
"FILE_FORMAT_UNSPECIFIED",
"PARQUET"
],
"type": "string",
"description": "Optional. The file format the table data is stored in.",
"x-google-enum-descriptions": [
"Default Value.",
"Apache Parquet format."
]
},
"storageUri": {
"type": "string",
"description": "Optional. The fully qualified location prefix of the external folder where table data is stored. The '*' wildcard character is not allowed. The URI should be in the format `gs://bucket/path_to_table/`"
},
"tableFormat": {
"enum": [
"TABLE_FORMAT_UNSPECIFIED",
"ICEBERG"
],
"type": "string",
"description": "Optional. The table format the metadata only snapshots are stored in.",
"x-google-enum-descriptions": [
"Default Value.",
"Apache Iceberg format."
]
},
"connectionId": {
"type": "string",
"description": "Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection_id can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}\"."
}
},
"description": "Configuration for BigQuery tables for Apache Iceberg (formerly BigLake managed tables.)"
},
"BigtableColumnFamily": {
"type": "object",
"properties": {
"type": {
"type": "string",
"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 * JSON Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it."
},
"columns": {
"type": "array",
"items": {
"$ref": "#/$defs/BigtableColumn"
},
"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 the `.Column` field."
},
"encoding": {
"type": "string",
"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. PROTO_BINARY - indicates values are encoded using serialized proto messages. This can only be used in combination with JSON type. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it."
},
"familyId": {
"type": "string",
"description": "Identifier of the column family."
},
"protoConfig": {
"$ref": "#/$defs/BigtableProtoConfig",
"description": "Optional. Protobuf-specific configurations, only takes effect when the encoding is PROTO_BINARY."
},
"onlyReadLatest": {
"type": "boolean",
"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."
}
},
"description": "Information related to a Bigtable column family."
},
"TableReplicationInfo": {
"type": "object",
"properties": {
"sourceTable": {
"$ref": "#/$defs/TableReference",
"description": "Required. Source table reference that is replicated."
},
"replicationError": {
"$ref": "#/$defs/ErrorProto",
"readOnly": true,
"description": "Optional. Output only. Replication error that will permanently stopped table replication."
},
"replicationStatus": {
"enum": [
"REPLICATION_STATUS_UNSPECIFIED",
"ACTIVE",
"SOURCE_DELETED",
"PERMISSION_DENIED",
"UNSUPPORTED_CONFIGURATION"
],
"type": "string",
"readOnly": true,
"description": "Optional. Output only. Replication status of configured replication.",
"x-google-enum-descriptions": [
"Default value.",
"Replication is Active with no errors.",
"Source object is deleted.",
"Source revoked replication permissions.",
"Source configuration doesn't allow replication."
]
},
"replicationIntervalMs": {
"type": "string",
"format": "int64",
"description": "Optional. Specifies the interval at which the source table is polled for updates. It's Optional. If not specified, default replication interval would be applied."
},
"replicatedSourceLastRefreshTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Optional. Output only. If source is a materialized view, this field signifies the last refresh time of the source."
}
},
"description": "Replication info of a table created using `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`"
},
"ForeignViewDefinition": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. The query that defines the view."
},
"dialect": {
"type": "string",
"description": "Optional. Represents the dialect of the query."
}
},
"description": "A view can be represented in multiple ways. Each representation has its own dialect. This message stores the metadata required for these representations."
},
"JoinRestrictionPolicy": {
"type": "object",
"properties": {
"joinCondition": {
"enum": [
"JOIN_CONDITION_UNSPECIFIED",
"JOIN_ANY",
"JOIN_ALL",
"JOIN_NOT_REQUIRED",
"JOIN_BLOCKED"
],
"type": "string",
"description": "Optional. Specifies if a join is required or not on queries for the view. Default is JOIN_CONDITION_UNSPECIFIED.",
"x-google-enum-descriptions": [
"A join is neither required nor restricted on any column. Default value.",
"A join is required on at least one of the specified columns.",
"A join is required on all specified columns.",
"A join is not required, but if present it is only permitted on 'join_allowed_columns'",
"Joins are blocked for all queries."
]
},
"joinAllowedColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The only columns that joins are allowed on. This field is must be specified for join_conditions JOIN_ANY and JOIN_ALL and it cannot be set for JOIN_BLOCKED."
}
},
"description": "Represents privacy policy associated with \"join restrictions\". Join restriction gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view."
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"MaterializedViewStatus": {
"type": "object",
"properties": {
"refreshWatermark": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "Output only. Refresh watermark of materialized view. The base tables' data were collected into the materialized view cache until this time."
},
"lastRefreshStatus": {
"$ref": "#/$defs/ErrorProto",
"readOnly": true,
"description": "Output only. Error result of the last automatic refresh. If present, indicates that the last automatic refresh was unsuccessful."
}
},
"description": "Status of a materialized view. The last refresh timestamp status is omitted here, but is present in the MaterializedViewDefinition message."
},
"PartitioningDefinition": {
"type": "object",
"properties": {
"partitionedColumn": {
"type": "array",
"items": {
"$ref": "#/$defs/PartitionedColumn"
},
"description": "Optional. Details about each partitioning column. This field is output only for all partitioning types other than metastore partitioned tables. BigQuery native tables only support 1 partitioning column. Other table types may support 0, 1 or more partitioning columns. For metastore partitioned tables, the order must match the definition order in the Hive Metastore, where it must match the physical layout of the table. For example, CREATE TABLE a_table(id BIGINT, name STRING) PARTITIONED BY (city STRING, state STRING). In this case the values must be ['city', 'state'] in that order."
}
},
"description": "The partitioning information, which includes managed table, external table and metastore partitioned table partition information."
},
"EncryptionConfiguration": {
"type": "object",
"properties": {
"kmsKeyName": {
"type": "string",
"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."
}
},
"description": "Configuration for Cloud KMS encryption settings."
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
},
"HivePartitioningOptions": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. When set, what mode of hive partitioning to use when reading data. The following modes are supported: * AUTO: automatically infer partition key name(s) and type(s). * STRINGS: automatically infer partition key name(s). All types are strings. * 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 formats are: JSON, CSV, ORC, Avro and Parquet."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"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."
},
"sourceUriPrefix": {
"type": "string",
"description": "Optional. When hive partition detection is requested, a common prefix for all source uris must be required. 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-06-01/country=USA/id=7/file.avro gs://bucket/path_to_table/dt=2019-05-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/. CUSTOM detection requires encoding the partitioning schema immediately after the common prefix. For CUSTOM, any of * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING} would all be valid source URI prefixes."
},
"requirePartitionFilter": {
"type": "boolean",
"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. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with require_partition_filter explicitly set to true will fail."
}
},
"description": "Options for configuring hive partitioning detect."
},
"DifferentialPrivacyPolicy": {
"type": "object",
"properties": {
"deltaBudget": {
"type": "number",
"format": "double",
"description": "Optional. The total delta budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of delta that is pre-defined by the contributor through the privacy policy delta_per_query field. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget."
},
"deltaPerQuery": {
"type": "number",
"format": "double",
"description": "Optional. The delta value that is used per query. Delta represents the probability that any row will fail to be epsilon differentially private. Indicates the risk associated with exposing aggregate rows in the result of a query."
},
"epsilonBudget": {
"type": "number",
"format": "double",
"description": "Optional. The total epsilon budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of epsilon they request in their query. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget."
},
"privacyUnitColumn": {
"type": "string",
"description": "Optional. The privacy unit column associated with this policy. Differential privacy policies can only have one privacy unit column per data source object (table, view)."
},
"maxEpsilonPerQuery": {
"type": "number",
"format": "double",
"description": "Optional. The maximum epsilon value that a query can consume. If the subscriber specifies epsilon as a parameter in a SELECT query, it must be less than or equal to this value. The epsilon parameter controls the amount of noise that is added to the groups — a higher epsilon means less noise."
},
"deltaBudgetRemaining": {
"type": "number",
"format": "double",
"readOnly": true,
"description": "Output only. The delta budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase."
},
"maxGroupsContributed": {
"type": "string",
"format": "int64",
"description": "Optional. The maximum groups contributed value that is used per query. Represents the maximum number of groups to which each protected entity can contribute. Changing this value does not improve or worsen privacy. The best value for accuracy and utility depends on the query and data."
},
"epsilonBudgetRemaining": {
"type": "number",
"format": "double",
"readOnly": true,
"description": "Output only. The epsilon budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase."
}
},
"description": "Represents privacy policy associated with \"differential privacy\" method."
},
"ExternalDataConfiguration": {
"type": "object",
"properties": {
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "Optional. The schema for the data. Schema is required for CSV and JSON formats if autodetect is not on. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, Avro, ORC and Parquet formats."
},
"timeZone": {
"type": "string",
"description": "Optional. Time zone used when parsing timestamp values that do not have specific time zone information (e.g. 2024-04-20 12:34:56). The expected format is a IANA timezone string (e.g. America/Los_Angeles)."
},
"autodetect": {
"type": "boolean",
"description": "Try to detect schema and format options automatically. Any option specified explicitly will be honored."
},
"csvOptions": {
"$ref": "#/$defs/CsvOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to CSV."
},
"dateFormat": {
"type": "string",
"description": "Optional. Format used to parse DATE values. Supports C-style and SQL-style values."
},
"sourceUris": {
"type": "array",
"items": {
"type": "string"
},
"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."
},
"timeFormat": {
"type": "string",
"description": "Optional. Format used to parse TIME values. Supports C-style and SQL-style values."
},
"avroOptions": {
"$ref": "#/$defs/AvroOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to AVRO."
},
"compression": {
"type": "string",
"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, Avro, ORC and Parquet formats. An empty string is an invalid value."
},
"jsonOptions": {
"$ref": "#/$defs/JsonOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to JSON."
},
"connectionId": {
"type": "string",
"description": "Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection_id can have the form `{project_id}.{location_id};{connection_id}` or `projects/{project_id}/locations/{location_id}/connections/{connection_id}`."
},
"sourceFormat": {
"type": "string",
"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\". For Apache Iceberg tables, specify \"ICEBERG\". For ORC files, specify \"ORC\". For Parquet files, specify \"PARQUET\". [Beta] For Google Cloud Bigtable, specify \"BIGTABLE\"."
},
"jsonExtension": {
"enum": [
"JSON_EXTENSION_UNSPECIFIED",
"GEOJSON"
],
"type": "string",
"description": "Optional. Load option to be used together with source_format newline-delimited JSON to indicate that a variant of JSON is being loaded. To load newline-delimited GeoJSON, specify GEOJSON (and source_format must be set to NEWLINE_DELIMITED_JSON).",
"x-google-enum-descriptions": [
"The default if provided value is not one included in the enum, or the value is not specified. The source format is parsed without any modification.",
"Use GeoJSON variant of JSON. See https://tools.ietf.org/html/rfc7946."
]
},
"maxBadRecords": {
"type": "integer",
"format": "int32",
"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. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC and Parquet formats."
},
"datetimeFormat": {
"type": "string",
"description": "Optional. Format used to parse DATETIME values. Supports C-style and SQL-style values."
},
"objectMetadata": {
"enum": [
"OBJECT_METADATA_UNSPECIFIED",
"DIRECTORY",
"SIMPLE"
],
"type": "string",
"description": "Optional. 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.",
"x-google-enum-descriptions": [
"Unspecified by default.",
"A synonym for `SIMPLE`.",
"Directory listing of objects."
]
},
"parquetOptions": {
"$ref": "#/$defs/ParquetOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to PARQUET."
},
"bigtableOptions": {
"$ref": "#/$defs/BigtableOptions",
"description": "Optional. Additional options if sourceFormat is set to BIGTABLE."
},
"fileSetSpecType": {
"enum": [
"FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH",
"FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST"
],
"type": "string",
"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.",
"x-google-enum-descriptions": [
"This option expands source URIs by listing files from the object store. It is the default behavior if FileSetSpecType is not set.",
"This option indicates that the provided URIs are newline-delimited manifest files, with one URI per line. Wildcard URIs are not supported."
]
},
"timestampFormat": {
"type": "string",
"description": "Optional. Format used to parse TIMESTAMP values. Supports C-style and SQL-style values."
},
"metadataCacheMode": {
"enum": [
"METADATA_CACHE_MODE_UNSPECIFIED",
"AUTOMATIC",
"MANUAL"
],
"type": "string",
"description": "Optional. Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.",
"x-google-enum-descriptions": [
"Unspecified metadata cache mode.",
"Set this mode to trigger automatic background refresh of metadata cache from the external source. Queries will use the latest available cache version within the table's maxStaleness interval.",
"Set this mode to enable triggering manual refresh of the metadata cache from external source. Queries will use the latest manually triggered cache version within the table's maxStaleness interval."
]
},
"decimalTargetTypes": {
"type": "array",
"items": {
"enum": [
"DECIMAL_TARGET_TYPE_UNSPECIFIED",
"NUMERIC",
"BIGNUMERIC",
"STRING"
],
"type": "string",
"x-google-enum-descriptions": [
"Invalid type.",
"Decimal values could be converted to NUMERIC type.",
"Decimal values could be converted to BIGNUMERIC type.",
"Decimal values could be converted to STRING type."
]
},
"description": "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 exceeds 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."
},
"googleSheetsOptions": {
"$ref": "#/$defs/GoogleSheetsOptions",
"description": "Optional. Additional options if sourceFormat is set to GOOGLE_SHEETS."
},
"ignoreUnknownValues": {
"type": "boolean",
"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. ORC: This setting is ignored. Parquet: This setting is ignored."
},
"referenceFileSchemaUri": {
"type": "string",
"description": "Optional. When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC."
},
"hivePartitioningOptions": {
"$ref": "#/$defs/HivePartitioningOptions",
"description": "Optional. When set, configures hive partitioning support. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error, as will providing an invalid specification."
},
"timestampTargetPrecision": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Precisions (maximum number of total digits in base 10) for seconds of TIMESTAMP types that are allowed to the destination table for autodetection mode. Available for the formats: CSV, PARQUET, AVRO, and Iceberg External Table. Possible values include: Not Specified, [], or [6]: timestamp(6) for all auto detected TIMESTAMP columns [6, 12]: timestamp(6) for all auto detected TIMESTAMP columns that have less than 6 digits of subseconds. timestamp(12) for all auto detected TIMESTAMP columns that have more than 6 digits of subseconds. [12]: timestamp(12) for all auto detected TIMESTAMP columns. The order of the elements in this array is ignored. Inputs that have higher precision than the highest target precision in this array will be truncated."
}
}
},
"AggregationThresholdPolicy": {
"type": "object",
"properties": {
"threshold": {
"type": "string",
"format": "int64",
"description": "Optional. The threshold for the \"aggregation threshold\" policy."
},
"privacyUnitColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The privacy unit column(s) associated with this policy. For now, only one column per data source object (table, view) is allowed as a privacy unit column. Representing as a repeated field in metadata for extensibility to multiple columns in future. Duplicates and Repeated struct fields are not allowed. For nested fields, use dot notation (\"outer.inner\")"
}
},
"description": "Represents privacy policy associated with \"aggregation threshold\" method."
},
"MaterializedViewDefinition": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. A query whose results are persisted."
},
"enableRefresh": {
"type": "boolean",
"description": "Optional. Enable automatic refresh of the materialized view when the base table is updated. The default value is \"true\"."
},
"lastRefreshTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The time when this materialized view was last refreshed, in milliseconds since the epoch."
},
"refreshIntervalMs": {
"type": "string",
"format": "uint64",
"description": "Optional. The maximum frequency at which this materialized view will be refreshed. The default value is \"1800000\" (30 minutes)."
},
"allowNonIncrementalDefinition": {
"type": "boolean",
"description": "Optional. This option declares the intention to construct a materialized view that isn't refreshed incrementally. Non-incremental materialized views support an expanded range of SQL queries. The `allow_non_incremental_definition` option can't be changed after the materialized view is created."
}
},
"description": "Definition and configuration of a materialized view."
},
"ExternalCatalogTableOptions": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"description": "Optional. A map of the key-value pairs defining the parameters and properties of the open source table. Corresponds with Hive metastore table parameters. Maximum size of 4MiB.",
"additionalProperties": {
"type": "string"
}
},
"connectionId": {
"type": "string",
"description": "Optional. A connection ID that specifies the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or Amazon S3. This connection is needed to read the open source table from BigQuery. The connection_id format must be either `..` or `projects//locations//connections/`."
},
"storageDescriptor": {
"$ref": "#/$defs/StorageDescriptor",
"description": "Optional. A storage descriptor containing information about the physical storage of this table."
}
},
"description": "Metadata about open source compatible table. The fields contained in these options correspond to Hive metastore's table-level properties."
},
"UserDefinedFunctionResource": {
"type": "object",
"properties": {
"inlineCode": {
"type": "string",
"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."
},
"resourceUri": {
"type": "string",
"description": "[Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path)."
}
},
"description": " This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of GoogleSQL 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": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. An opaque ID uniquely identifying the table."
},
"etag": {
"type": "string",
"readOnly": true,
"description": "Output only. A hash of this resource."
},
"kind": {
"type": "string",
"default": "bigquery#table",
"description": "The type of resource ID."
},
"type": {
"type": "string",
"readOnly": true,
"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. * `EXTERNAL`: A table that references data stored in an external storage system, such as Google Cloud Storage. * `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on [table snapshots](https://cloud.google.com/bigquery/docs/table-snapshots-intro). The default value is `TABLE`."
},
"view": {
"$ref": "#/$defs/ViewDefinition",
"description": "Optional. The view definition."
},
"labels": {
"type": "object",
"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.",
"additionalProperties": {
"type": "string"
}
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "Optional. Describes the schema of this table."
},
"numRows": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. The number of rows of data in this table, excluding any data in the streaming buffer."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location where the table resides. This value is inherited from the dataset."
},
"numBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The size of this table in logical bytes, excluding any data in the streaming buffer."
},
"replicas": {
"type": "array",
"items": {
"$ref": "#/$defs/TableReference"
},
"readOnly": true,
"description": "Optional. Output only. Table references of all replicas currently active on the table."
},
"selfLink": {
"type": "string",
"readOnly": true,
"description": "Output only. A URL that can be used to access this resource again."
},
"clustering": {
"$ref": "#/$defs/Clustering",
"description": "Clustering specification for the table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered."
},
"description": {
"type": "string",
"description": "Optional. A user-friendly description of this table."
},
"creationTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The time when this table was created, in milliseconds since the epoch."
},
"friendlyName": {
"type": "string",
"description": "Optional. A descriptive name for this table."
},
"maxStaleness": {
"type": "string",
"description": "Optional. The maximum staleness of data that could be returned when the table (or stale MV) is queried. Staleness encoded as a string encoding of sql IntervalValue type."
},
"resourceTags": {
"type": "object",
"description": "Optional. The [tags](https://cloud.google.com/bigquery/docs/tags) attached to this table. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details.",
"additionalProperties": {
"type": "string"
}
},
"restrictions": {
"$ref": "#/$defs/RestrictionConfig",
"readOnly": true,
"description": "Optional. Output only. Restriction config for table. If set, restrict certain accesses on the table based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
},
"numPartitions": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"expirationTime": {
"type": "string",
"format": "int64",
"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."
},
"tableReference": {
"$ref": "#/$defs/TableReference",
"description": "Required. Reference describing the ID of this table."
},
"cloneDefinition": {
"$ref": "#/$defs/CloneDefinition",
"readOnly": true,
"description": "Output only. Contains information about the clone. This value is set via the clone operation."
},
"streamingBuffer": {
"$ref": "#/$defs/Streamingbuffer",
"readOnly": true,
"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."
},
"defaultCollation": {
"type": "string",
"description": "Optional. Defines the default collation specification of new STRING fields in the table. During table creation or update, if a STRING field is added to this table without explicit collation specified, then the table inherits the table default collation. A change to this field affects only fields added afterwards, and does not alter the existing fields. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"lastModifiedTime": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. The time when this table was last modified, in milliseconds since the epoch."
},
"managedTableType": {
"enum": [
"MANAGED_TABLE_TYPE_UNSPECIFIED",
"NATIVE",
"BIGLAKE"
],
"type": "string",
"description": "Optional. If set, overrides the default managed table type configured in the dataset.",
"x-google-enum-descriptions": [
"No managed table type specified.",
"The managed table is a native BigQuery table.",
"The managed table is a BigLake table for Apache Iceberg in BigQuery."
]
},
"materializedView": {
"$ref": "#/$defs/MaterializedViewDefinition",
"description": "Optional. The materialized view definition."
},
"numLongTermBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of logical bytes in the table that are considered \"long-term storage\"."
},
"numPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The physical size of this table in bytes. This includes storage used for time travel."
},
"tableConstraints": {
"$ref": "#/$defs/TableConstraints",
"description": "Optional. Tables Primary Key and Foreign Key information"
},
"timePartitioning": {
"$ref": "#/$defs/TimePartitioning",
"description": "If specified, configures time-based partitioning for this table."
},
"rangePartitioning": {
"$ref": "#/$defs/RangePartitioning",
"description": "If specified, configures range partitioning for this table."
},
"snapshotDefinition": {
"$ref": "#/$defs/SnapshotDefinition",
"readOnly": true,
"description": "Output only. Contains information about the snapshot. This value is set via snapshot creation."
},
"defaultRoundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Defines the default rounding mode specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. During table creation or update, if a decimal field is added to this table without an explicit rounding mode specified, then the field inherits the table default rounding mode. Changing this field doesn't affect existing fields.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"partitionDefinition": {
"$ref": "#/$defs/PartitioningDefinition",
"description": "Optional. The partition information for all table formats, including managed partitioned tables, hive partitioned tables, iceberg partitioned, and metastore partitioned tables. This field is only populated for metastore partitioned tables. For other table formats, this is an output only field."
},
"biglakeConfiguration": {
"$ref": "#/$defs/BigLakeConfiguration",
"description": "Optional. Specifies the configuration of a BigQuery table for Apache Iceberg."
},
"numTotalLogicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Total number of logical bytes in the table or materialized view."
},
"tableReplicationInfo": {
"$ref": "#/$defs/TableReplicationInfo",
"description": "Optional. Table replication info for table created `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`"
},
"numActiveLogicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of logical bytes that are less than 90 days old."
},
"numTotalPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"materializedViewStatus": {
"$ref": "#/$defs/MaterializedViewStatus",
"readOnly": true,
"description": "Output only. The materialized view status."
},
"numActivePhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"requirePartitionFilter": {
"type": "boolean",
"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."
},
"encryptionConfiguration": {
"$ref": "#/$defs/EncryptionConfiguration",
"description": "Custom encryption configuration (e.g., Cloud KMS keys)."
},
"numCurrentPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes."
},
"numLongTermLogicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of logical bytes that are more than 90 days old."
},
"numLongTermPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"externalDataConfiguration": {
"$ref": "#/$defs/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."
},
"numTimeTravelPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"externalCatalogTableOptions": {
"$ref": "#/$defs/ExternalCatalogTableOptions",
"description": "Optional. Options defining open source compatible table."
}
}
}
Original tool metadata
{
"name": "get_table_info",
"description": "Get metadata information about a BigQuery table or BigLake table.",
"inputSchema": {
"type": "object",
"required": [
"projectId",
"datasetId",
"tableId"
],
"properties": {
"tableId": {
"type": "string",
"description": "Required. Table ID of the table request."
},
"datasetId": {
"type": "string",
"description": "Required. Dataset ID of the table request."
},
"projectId": {
"type": "string",
"description": "Required. Project ID of the table request."
}
},
"description": "Request for a table."
},
"outputSchema": {
"type": "object",
"$defs": {
"Range": {
"type": "object",
"properties": {
"end": {
"type": "string",
"description": "Required. The end of range partitioning, exclusive. This field is an INT64 value represented as a string."
},
"start": {
"type": "string",
"description": "Required. The start of range partitioning, inclusive. This field is an INT64 value represented as a string."
},
"interval": {
"type": "string",
"description": "Required. The width of each interval. This field is an INT64 value represented as a string."
}
},
"description": "Defines the ranges for range partitioning."
},
"SerDeInfo": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Optional. Name of the SerDe. The maximum length is 256 characters."
},
"parameters": {
"type": "object",
"description": "Optional. Key-value pairs that define the initialization parameters for the serialization library. Maximum size 10 Kib.",
"additionalProperties": {
"type": "string"
}
},
"serializationLibrary": {
"type": "string",
"description": "Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters."
}
},
"description": "Serializer and deserializer information."
},
"Clustering": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. The ordering of the clustering fields should be prioritized from most to least important for filtering purposes. For additional information, see [Introduction to clustered tables](https://cloud.google.com/bigquery/docs/clustered-tables#limitations)."
}
},
"description": "Configures table clustering."
},
"CsvOptions": {
"type": "object",
"properties": {
"quote": {
"type": "string",
"default": "\"",
"pattern": ".?",
"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. To include the specific quote character within a quoted value, precede it with an additional matching quote character. For example, if you want to escape the default character ' \" ', use ' \"\" '."
},
"encoding": {
"type": "string",
"description": "Optional. The character encoding of the data. The supported values are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. 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."
},
"nullMarker": {
"type": "string",
"description": "Optional. Specifies a string that represents a null value in a CSV file. For example, if you specify \"\\N\", BigQuery interprets \"\\N\" as a null value when querying 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."
},
"nullMarkers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. A list of strings represented as SQL NULL value in a CSV file. null_marker and null_markers can't be set at the same time. If null_marker is set, null_markers has to be not set. If null_markers is set, null_marker has to be not set. If both null_marker and null_markers are set at the same time, a user error would be thrown. Any strings listed in null_markers, including empty string would be interpreted as SQL NULL. This applies to all column types."
},
"fieldDelimiter": {
"type": "string",
"description": "Optional. The separator character for fields in a CSV file. The separator is interpreted as a single byte. For files encoded in ISO-8859-1, any single character can be used as a separator. For files encoded in UTF-8, characters represented in decimal range 1-127 (U+0001-U+007F) can be used without any modification. UTF-8 characters encoded with multiple bytes (i.e. U+0080 and above) will have only the first byte used for separating fields. The remaining bytes will be treated as a part of the field. BigQuery also supports the escape sequence \"\\t\" (U+0009) to specify a tab separator. The default value is comma (\",\", U+002C)."
},
"allowJaggedRows": {
"type": "boolean",
"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."
},
"skipLeadingRows": {
"type": "string",
"format": "int64",
"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."
},
"sourceColumnMatch": {
"type": "string",
"description": "Optional. Controls the strategy used to match loaded columns to the schema. If not set, a sensible default is chosen based on how the schema is provided. If autodetect is used, then columns are matched by name. Otherwise, columns are matched by position. This is done to keep the behavior backward-compatible. Acceptable values are: POSITION - matches by position. This assumes that the columns are ordered the same way as the schema. NAME - matches by name. This reads the header row as column names and reorders columns to match the field names in the schema."
},
"allowQuotedNewlines": {
"type": "boolean",
"description": "Optional. Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false."
},
"preserveAsciiControlCharacters": {
"type": "boolean",
"description": "Optional. Indicates if the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\\x00' to '\\x1F') are preserved."
}
},
"description": "Information related to a CSV data source."
},
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"ForeignKey": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Optional. Set only if the foreign key constraint is named."
},
"referencedTable": {
"$ref": "#/$defs/TableReference",
"description": "Required. The table that holds the primary key and is referenced by this foreign key."
},
"columnReferences": {
"type": "array",
"items": {
"$ref": "#/$defs/ColumnReference"
},
"description": "Required. The columns that compose the foreign key."
}
},
"description": "Represents a foreign key constraint on a table's columns."
},
"PrimaryKey": {
"type": "object",
"properties": {
"columns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required. The columns that are composed of the primary key constraint."
}
},
"description": "Represents the primary key constraint on a table's columns."
},
"AvroOptions": {
"type": "object",
"properties": {
"useAvroLogicalTypes": {
"type": "boolean",
"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)."
}
},
"description": "Options for external data sources."
},
"JsonOptions": {
"type": "object",
"properties": {
"encoding": {
"type": "string",
"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."
}
},
"description": "Json Options for load and make external tables."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"PrivacyPolicy": {
"type": "object",
"properties": {
"joinRestrictionPolicy": {
"$ref": "#/$defs/JoinRestrictionPolicy",
"description": "Optional. Join restriction policy is outside of the one of policies, since this policy can be set along with other policies. This policy gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view."
},
"differentialPrivacyPolicy": {
"$ref": "#/$defs/DifferentialPrivacyPolicy",
"description": "Optional. Policy used for differential privacy."
},
"aggregationThresholdPolicy": {
"$ref": "#/$defs/AggregationThresholdPolicy",
"description": "Optional. Policy used for aggregation thresholds."
}
},
"description": "Represents privacy policy that contains the privacy requirements specified by the data owner. Currently, this is only supported on views."
},
"BigtableColumn": {
"type": "object",
"properties": {
"type": {
"type": "string",
"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 * JSON 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."
},
"encoding": {
"type": "string",
"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. PROTO_BINARY - indicates values are encoded using serialized proto messages. This can only be used in combination with JSON type. '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."
},
"fieldName": {
"type": "string",
"description": "Optional. If the qualifier is not a valid BigQuery field identifier i.e. does not match a-zA-Z*, a valid identifier must be provided as the column field name and is used as field name in queries."
},
"protoConfig": {
"$ref": "#/$defs/BigtableProtoConfig",
"description": "Optional. Protobuf-specific configurations, only takes effect when the encoding is PROTO_BINARY."
},
"onlyReadLatest": {
"type": "boolean",
"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."
},
"qualifierString": {
"type": "string",
"description": "Qualifier string."
},
"qualifierEncoded": {
"type": "string",
"format": "byte",
"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 valid identifier must be provided as field_name."
}
},
"description": "Information related to a Bigtable column."
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ParquetOptions": {
"type": "object",
"properties": {
"enumAsString": {
"type": "boolean",
"description": "Optional. Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default."
},
"mapTargetType": {
"enum": [
"MAP_TARGET_TYPE_UNSPECIFIED",
"ARRAY_OF_STRUCT"
],
"type": "string",
"description": "Optional. Indicates how to represent a Parquet map if present.",
"x-google-enum-descriptions": [
"In this mode, the map will have the following schema: struct map_field_name { repeated struct key_value { key value } }.",
"In this mode, the map will have the following schema: repeated struct map_field_name { key value }."
]
},
"enableListInference": {
"type": "boolean",
"description": "Optional. Indicates whether to use schema inference specifically for Parquet LIST logical type."
}
},
"description": "Parquet Options for load and make external tables."
},
"TableReference": {
"type": "object",
"properties": {
"tableId": {
"type": "string",
"description": "Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`."
},
"datasetId": {
"type": "string",
"description": "Required. The ID of the dataset containing this table."
},
"projectId": {
"type": "string",
"description": "Required. The ID of the project containing this table."
}
}
},
"ViewDefinition": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. A query that BigQuery executes when the view is referenced."
},
"useLegacySql": {
"type": "boolean",
"description": "Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view uses BigQuery's [GoogleSQL](https://docs.cloud.google.com/bigquery/docs/introduction-sql). Queries and views that reference this view must use the same flag value. A wrapper is used here because the default value is True."
},
"privacyPolicy": {
"$ref": "#/$defs/PrivacyPolicy",
"description": "Optional. Specifies the privacy policy for the view."
},
"foreignDefinitions": {
"type": "array",
"items": {
"$ref": "#/$defs/ForeignViewDefinition"
},
"description": "Optional. Foreign view representations."
},
"useExplicitColumnNames": {
"type": "boolean",
"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 for GoogleSQL views."
},
"userDefinedFunctionResources": {
"type": "array",
"items": {
"$ref": "#/$defs/UserDefinedFunctionResource"
},
"description": "Describes user-defined function resources used in the query."
}
},
"description": "Describes the definition of a logical view."
},
"BigtableOptions": {
"type": "object",
"properties": {
"columnFamilies": {
"type": "array",
"items": {
"$ref": "#/$defs/BigtableColumnFamily"
},
"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."
},
"readRowkeyAsString": {
"type": "boolean",
"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."
},
"outputColumnFamiliesAsJson": {
"type": "boolean",
"description": "Optional. If field is true, then each column family will be read as a single JSON column. Otherwise they are read as a repeated cell structure containing timestamp/value tuples. The default value is false."
},
"ignoreUnspecifiedColumnFamilies": {
"type": "boolean",
"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."
}
},
"description": "Options specific to Google Cloud Bigtable data sources."
},
"CloneDefinition": {
"type": "object",
"properties": {
"cloneTime": {
"type": "string",
"format": "date-time",
"description": "Required. The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format."
},
"baseTableReference": {
"$ref": "#/$defs/TableReference",
"description": "Required. Reference describing the ID of the table that was cloned."
}
},
"description": "Information about base table and clone time of a table clone."
},
"ColumnReference": {
"type": "object",
"properties": {
"referencedColumn": {
"type": "string",
"description": "Required. The column in the primary key that are referenced by the referencing_column."
},
"referencingColumn": {
"type": "string",
"description": "Required. The column that composes the foreign key."
}
},
"description": "The pair of the foreign key column and primary key column."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"Streamingbuffer": {
"type": "object",
"properties": {
"estimatedRows": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. A lower-bound estimate of the number of rows currently in the streaming buffer."
},
"estimatedBytes": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. A lower-bound estimate of the number of bytes currently in the streaming buffer."
},
"oldestEntryTime": {
"type": "string",
"format": "uint64",
"readOnly": true,
"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."
}
}
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableConstraints": {
"type": "object",
"properties": {
"primaryKey": {
"$ref": "#/$defs/PrimaryKey",
"description": "Optional. Represents a primary key constraint on a table's columns. Present only if the table has a primary key. The primary key is not enforced."
},
"foreignKeys": {
"type": "array",
"items": {
"$ref": "#/$defs/ForeignKey"
},
"description": "Optional. Present only if the table has a foreign key. The foreign key is not enforced."
}
},
"description": "The TableConstraints defines the primary key and foreign key."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"TimePartitioning": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively."
},
"field": {
"type": "string",
"description": "Optional. 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."
},
"expirationMs": {
"type": "string",
"format": "int64",
"description": "Optional. Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value."
},
"requirePartitionFilter": {
"type": "boolean",
"default": "false",
"deprecated": true,
"description": "If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. This field is deprecated; please set the field with the same name on the table itself instead. This field needs a wrapper because we want to output the default value, false, if the user explicitly set it."
}
}
},
"PartitionedColumn": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Required. The name of the partition column."
}
},
"description": "The partitioning column information."
},
"RangePartitioning": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Required. The name of the column to partition the table on. It must be a top-level, INT64 column whose mode is NULLABLE or REQUIRED."
},
"range": {
"$ref": "#/$defs/Range",
"description": "Defines the ranges for range partitioning."
}
}
},
"RestrictionConfig": {
"type": "object",
"properties": {
"type": {
"enum": [
"RESTRICTION_TYPE_UNSPECIFIED",
"RESTRICTED_DATA_EGRESS"
],
"type": "string",
"readOnly": true,
"description": "Output only. Specifies the type of dataset/table restriction.",
"x-google-enum-descriptions": [
"Should never be used.",
"Restrict data egress. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
]
}
}
},
"StorageDescriptor": {
"type": "object",
"properties": {
"serdeInfo": {
"$ref": "#/$defs/SerDeInfo",
"description": "Optional. Serializer and deserializer information."
},
"inputFormat": {
"type": "string",
"description": "Optional. Specifies the fully qualified class name of the InputFormat (e.g. \"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"). The maximum length is 128 characters."
},
"locationUri": {
"type": "string",
"description": "Optional. The physical location of the table (e.g. `gs://spark-dataproc-data/pangea-data/case_sensitive/` or `gs://spark-dataproc-data/pangea-data/*`). The maximum length is 2056 bytes."
},
"outputFormat": {
"type": "string",
"description": "Optional. Specifies the fully qualified class name of the OutputFormat (e.g. \"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"). The maximum length is 128 characters."
}
},
"description": "Contains information about how a table's data is stored and accessed by open source query engines."
},
"SnapshotDefinition": {
"type": "object",
"properties": {
"snapshotTime": {
"type": "string",
"format": "date-time",
"description": "Required. The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format."
},
"baseTableReference": {
"$ref": "#/$defs/TableReference",
"description": "Required. Reference describing the ID of the table that was snapshot."
}
},
"description": "Information about base table and snapshot time of the snapshot."
},
"BigtableProtoConfig": {
"type": "object",
"properties": {
"schemaBundleId": {
"type": "string",
"description": "Optional. The ID of the Bigtable SchemaBundle resource associated with this protobuf. The ID should be referred to within the parent table, e.g., `foo` rather than `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/foo`. See [more details on Bigtable SchemaBundles](https://docs.cloud.google.com/bigtable/docs/create-manage-protobuf-schemas)."
},
"protoMessageName": {
"type": "string",
"description": "Optional. The fully qualified proto message name of the protobuf. In the format of \"foo.bar.Message\"."
}
},
"description": "Information related to a Bigtable protobuf column."
},
"GoogleSheetsOptions": {
"type": "object",
"properties": {
"range": {
"type": "string",
"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"
},
"skipLeadingRows": {
"type": "string",
"format": "int64",
"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, 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."
}
},
"description": "Options specific to Google Sheets data sources."
},
"BigLakeConfiguration": {
"type": "object",
"properties": {
"fileFormat": {
"enum": [
"FILE_FORMAT_UNSPECIFIED",
"PARQUET"
],
"type": "string",
"description": "Optional. The file format the table data is stored in.",
"x-google-enum-descriptions": [
"Default Value.",
"Apache Parquet format."
]
},
"storageUri": {
"type": "string",
"description": "Optional. The fully qualified location prefix of the external folder where table data is stored. The '*' wildcard character is not allowed. The URI should be in the format `gs://bucket/path_to_table/`"
},
"tableFormat": {
"enum": [
"TABLE_FORMAT_UNSPECIFIED",
"ICEBERG"
],
"type": "string",
"description": "Optional. The table format the metadata only snapshots are stored in.",
"x-google-enum-descriptions": [
"Default Value.",
"Apache Iceberg format."
]
},
"connectionId": {
"type": "string",
"description": "Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection_id can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}\"."
}
},
"description": "Configuration for BigQuery tables for Apache Iceberg (formerly BigLake managed tables.)"
},
"BigtableColumnFamily": {
"type": "object",
"properties": {
"type": {
"type": "string",
"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 * JSON Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it."
},
"columns": {
"type": "array",
"items": {
"$ref": "#/$defs/BigtableColumn"
},
"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 the `.Column` field."
},
"encoding": {
"type": "string",
"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. PROTO_BINARY - indicates values are encoded using serialized proto messages. This can only be used in combination with JSON type. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it."
},
"familyId": {
"type": "string",
"description": "Identifier of the column family."
},
"protoConfig": {
"$ref": "#/$defs/BigtableProtoConfig",
"description": "Optional. Protobuf-specific configurations, only takes effect when the encoding is PROTO_BINARY."
},
"onlyReadLatest": {
"type": "boolean",
"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."
}
},
"description": "Information related to a Bigtable column family."
},
"TableReplicationInfo": {
"type": "object",
"properties": {
"sourceTable": {
"$ref": "#/$defs/TableReference",
"description": "Required. Source table reference that is replicated."
},
"replicationError": {
"$ref": "#/$defs/ErrorProto",
"readOnly": true,
"description": "Optional. Output only. Replication error that will permanently stopped table replication."
},
"replicationStatus": {
"enum": [
"REPLICATION_STATUS_UNSPECIFIED",
"ACTIVE",
"SOURCE_DELETED",
"PERMISSION_DENIED",
"UNSUPPORTED_CONFIGURATION"
],
"type": "string",
"readOnly": true,
"description": "Optional. Output only. Replication status of configured replication.",
"x-google-enum-descriptions": [
"Default value.",
"Replication is Active with no errors.",
"Source object is deleted.",
"Source revoked replication permissions.",
"Source configuration doesn't allow replication."
]
},
"replicationIntervalMs": {
"type": "string",
"format": "int64",
"description": "Optional. Specifies the interval at which the source table is polled for updates. It's Optional. If not specified, default replication interval would be applied."
},
"replicatedSourceLastRefreshTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Optional. Output only. If source is a materialized view, this field signifies the last refresh time of the source."
}
},
"description": "Replication info of a table created using `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`"
},
"ForeignViewDefinition": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. The query that defines the view."
},
"dialect": {
"type": "string",
"description": "Optional. Represents the dialect of the query."
}
},
"description": "A view can be represented in multiple ways. Each representation has its own dialect. This message stores the metadata required for these representations."
},
"JoinRestrictionPolicy": {
"type": "object",
"properties": {
"joinCondition": {
"enum": [
"JOIN_CONDITION_UNSPECIFIED",
"JOIN_ANY",
"JOIN_ALL",
"JOIN_NOT_REQUIRED",
"JOIN_BLOCKED"
],
"type": "string",
"description": "Optional. Specifies if a join is required or not on queries for the view. Default is JOIN_CONDITION_UNSPECIFIED.",
"x-google-enum-descriptions": [
"A join is neither required nor restricted on any column. Default value.",
"A join is required on at least one of the specified columns.",
"A join is required on all specified columns.",
"A join is not required, but if present it is only permitted on 'join_allowed_columns'",
"Joins are blocked for all queries."
]
},
"joinAllowedColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The only columns that joins are allowed on. This field is must be specified for join_conditions JOIN_ANY and JOIN_ALL and it cannot be set for JOIN_BLOCKED."
}
},
"description": "Represents privacy policy associated with \"join restrictions\". Join restriction gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view."
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"MaterializedViewStatus": {
"type": "object",
"properties": {
"refreshWatermark": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "Output only. Refresh watermark of materialized view. The base tables' data were collected into the materialized view cache until this time."
},
"lastRefreshStatus": {
"$ref": "#/$defs/ErrorProto",
"readOnly": true,
"description": "Output only. Error result of the last automatic refresh. If present, indicates that the last automatic refresh was unsuccessful."
}
},
"description": "Status of a materialized view. The last refresh timestamp status is omitted here, but is present in the MaterializedViewDefinition message."
},
"PartitioningDefinition": {
"type": "object",
"properties": {
"partitionedColumn": {
"type": "array",
"items": {
"$ref": "#/$defs/PartitionedColumn"
},
"description": "Optional. Details about each partitioning column. This field is output only for all partitioning types other than metastore partitioned tables. BigQuery native tables only support 1 partitioning column. Other table types may support 0, 1 or more partitioning columns. For metastore partitioned tables, the order must match the definition order in the Hive Metastore, where it must match the physical layout of the table. For example, CREATE TABLE a_table(id BIGINT, name STRING) PARTITIONED BY (city STRING, state STRING). In this case the values must be ['city', 'state'] in that order."
}
},
"description": "The partitioning information, which includes managed table, external table and metastore partitioned table partition information."
},
"EncryptionConfiguration": {
"type": "object",
"properties": {
"kmsKeyName": {
"type": "string",
"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."
}
},
"description": "Configuration for Cloud KMS encryption settings."
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
},
"HivePartitioningOptions": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. When set, what mode of hive partitioning to use when reading data. The following modes are supported: * AUTO: automatically infer partition key name(s) and type(s). * STRINGS: automatically infer partition key name(s). All types are strings. * 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 formats are: JSON, CSV, ORC, Avro and Parquet."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"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."
},
"sourceUriPrefix": {
"type": "string",
"description": "Optional. When hive partition detection is requested, a common prefix for all source uris must be required. 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-06-01/country=USA/id=7/file.avro gs://bucket/path_to_table/dt=2019-05-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/. CUSTOM detection requires encoding the partitioning schema immediately after the common prefix. For CUSTOM, any of * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING} would all be valid source URI prefixes."
},
"requirePartitionFilter": {
"type": "boolean",
"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. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with require_partition_filter explicitly set to true will fail."
}
},
"description": "Options for configuring hive partitioning detect."
},
"DifferentialPrivacyPolicy": {
"type": "object",
"properties": {
"deltaBudget": {
"type": "number",
"format": "double",
"description": "Optional. The total delta budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of delta that is pre-defined by the contributor through the privacy policy delta_per_query field. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget."
},
"deltaPerQuery": {
"type": "number",
"format": "double",
"description": "Optional. The delta value that is used per query. Delta represents the probability that any row will fail to be epsilon differentially private. Indicates the risk associated with exposing aggregate rows in the result of a query."
},
"epsilonBudget": {
"type": "number",
"format": "double",
"description": "Optional. The total epsilon budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of epsilon they request in their query. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget."
},
"privacyUnitColumn": {
"type": "string",
"description": "Optional. The privacy unit column associated with this policy. Differential privacy policies can only have one privacy unit column per data source object (table, view)."
},
"maxEpsilonPerQuery": {
"type": "number",
"format": "double",
"description": "Optional. The maximum epsilon value that a query can consume. If the subscriber specifies epsilon as a parameter in a SELECT query, it must be less than or equal to this value. The epsilon parameter controls the amount of noise that is added to the groups — a higher epsilon means less noise."
},
"deltaBudgetRemaining": {
"type": "number",
"format": "double",
"readOnly": true,
"description": "Output only. The delta budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase."
},
"maxGroupsContributed": {
"type": "string",
"format": "int64",
"description": "Optional. The maximum groups contributed value that is used per query. Represents the maximum number of groups to which each protected entity can contribute. Changing this value does not improve or worsen privacy. The best value for accuracy and utility depends on the query and data."
},
"epsilonBudgetRemaining": {
"type": "number",
"format": "double",
"readOnly": true,
"description": "Output only. The epsilon budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase."
}
},
"description": "Represents privacy policy associated with \"differential privacy\" method."
},
"ExternalDataConfiguration": {
"type": "object",
"properties": {
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "Optional. The schema for the data. Schema is required for CSV and JSON formats if autodetect is not on. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, Avro, ORC and Parquet formats."
},
"timeZone": {
"type": "string",
"description": "Optional. Time zone used when parsing timestamp values that do not have specific time zone information (e.g. 2024-04-20 12:34:56). The expected format is a IANA timezone string (e.g. America/Los_Angeles)."
},
"autodetect": {
"type": "boolean",
"description": "Try to detect schema and format options automatically. Any option specified explicitly will be honored."
},
"csvOptions": {
"$ref": "#/$defs/CsvOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to CSV."
},
"dateFormat": {
"type": "string",
"description": "Optional. Format used to parse DATE values. Supports C-style and SQL-style values."
},
"sourceUris": {
"type": "array",
"items": {
"type": "string"
},
"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."
},
"timeFormat": {
"type": "string",
"description": "Optional. Format used to parse TIME values. Supports C-style and SQL-style values."
},
"avroOptions": {
"$ref": "#/$defs/AvroOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to AVRO."
},
"compression": {
"type": "string",
"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, Avro, ORC and Parquet formats. An empty string is an invalid value."
},
"jsonOptions": {
"$ref": "#/$defs/JsonOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to JSON."
},
"connectionId": {
"type": "string",
"description": "Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection_id can have the form `{project_id}.{location_id};{connection_id}` or `projects/{project_id}/locations/{location_id}/connections/{connection_id}`."
},
"sourceFormat": {
"type": "string",
"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\". For Apache Iceberg tables, specify \"ICEBERG\". For ORC files, specify \"ORC\". For Parquet files, specify \"PARQUET\". [Beta] For Google Cloud Bigtable, specify \"BIGTABLE\"."
},
"jsonExtension": {
"enum": [
"JSON_EXTENSION_UNSPECIFIED",
"GEOJSON"
],
"type": "string",
"description": "Optional. Load option to be used together with source_format newline-delimited JSON to indicate that a variant of JSON is being loaded. To load newline-delimited GeoJSON, specify GEOJSON (and source_format must be set to NEWLINE_DELIMITED_JSON).",
"x-google-enum-descriptions": [
"The default if provided value is not one included in the enum, or the value is not specified. The source format is parsed without any modification.",
"Use GeoJSON variant of JSON. See https://tools.ietf.org/html/rfc7946."
]
},
"maxBadRecords": {
"type": "integer",
"format": "int32",
"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. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC and Parquet formats."
},
"datetimeFormat": {
"type": "string",
"description": "Optional. Format used to parse DATETIME values. Supports C-style and SQL-style values."
},
"objectMetadata": {
"enum": [
"OBJECT_METADATA_UNSPECIFIED",
"DIRECTORY",
"SIMPLE"
],
"type": "string",
"description": "Optional. 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.",
"x-google-enum-descriptions": [
"Unspecified by default.",
"A synonym for `SIMPLE`.",
"Directory listing of objects."
]
},
"parquetOptions": {
"$ref": "#/$defs/ParquetOptions",
"description": "Optional. Additional properties to set if sourceFormat is set to PARQUET."
},
"bigtableOptions": {
"$ref": "#/$defs/BigtableOptions",
"description": "Optional. Additional options if sourceFormat is set to BIGTABLE."
},
"fileSetSpecType": {
"enum": [
"FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH",
"FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST"
],
"type": "string",
"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.",
"x-google-enum-descriptions": [
"This option expands source URIs by listing files from the object store. It is the default behavior if FileSetSpecType is not set.",
"This option indicates that the provided URIs are newline-delimited manifest files, with one URI per line. Wildcard URIs are not supported."
]
},
"timestampFormat": {
"type": "string",
"description": "Optional. Format used to parse TIMESTAMP values. Supports C-style and SQL-style values."
},
"metadataCacheMode": {
"enum": [
"METADATA_CACHE_MODE_UNSPECIFIED",
"AUTOMATIC",
"MANUAL"
],
"type": "string",
"description": "Optional. Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.",
"x-google-enum-descriptions": [
"Unspecified metadata cache mode.",
"Set this mode to trigger automatic background refresh of metadata cache from the external source. Queries will use the latest available cache version within the table's maxStaleness interval.",
"Set this mode to enable triggering manual refresh of the metadata cache from external source. Queries will use the latest manually triggered cache version within the table's maxStaleness interval."
]
},
"decimalTargetTypes": {
"type": "array",
"items": {
"enum": [
"DECIMAL_TARGET_TYPE_UNSPECIFIED",
"NUMERIC",
"BIGNUMERIC",
"STRING"
],
"type": "string",
"x-google-enum-descriptions": [
"Invalid type.",
"Decimal values could be converted to NUMERIC type.",
"Decimal values could be converted to BIGNUMERIC type.",
"Decimal values could be converted to STRING type."
]
},
"description": "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 exceeds 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."
},
"googleSheetsOptions": {
"$ref": "#/$defs/GoogleSheetsOptions",
"description": "Optional. Additional options if sourceFormat is set to GOOGLE_SHEETS."
},
"ignoreUnknownValues": {
"type": "boolean",
"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. ORC: This setting is ignored. Parquet: This setting is ignored."
},
"referenceFileSchemaUri": {
"type": "string",
"description": "Optional. When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC."
},
"hivePartitioningOptions": {
"$ref": "#/$defs/HivePartitioningOptions",
"description": "Optional. When set, configures hive partitioning support. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error, as will providing an invalid specification."
},
"timestampTargetPrecision": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Precisions (maximum number of total digits in base 10) for seconds of TIMESTAMP types that are allowed to the destination table for autodetection mode. Available for the formats: CSV, PARQUET, AVRO, and Iceberg External Table. Possible values include: Not Specified, [], or [6]: timestamp(6) for all auto detected TIMESTAMP columns [6, 12]: timestamp(6) for all auto detected TIMESTAMP columns that have less than 6 digits of subseconds. timestamp(12) for all auto detected TIMESTAMP columns that have more than 6 digits of subseconds. [12]: timestamp(12) for all auto detected TIMESTAMP columns. The order of the elements in this array is ignored. Inputs that have higher precision than the highest target precision in this array will be truncated."
}
}
},
"AggregationThresholdPolicy": {
"type": "object",
"properties": {
"threshold": {
"type": "string",
"format": "int64",
"description": "Optional. The threshold for the \"aggregation threshold\" policy."
},
"privacyUnitColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The privacy unit column(s) associated with this policy. For now, only one column per data source object (table, view) is allowed as a privacy unit column. Representing as a repeated field in metadata for extensibility to multiple columns in future. Duplicates and Repeated struct fields are not allowed. For nested fields, use dot notation (\"outer.inner\")"
}
},
"description": "Represents privacy policy associated with \"aggregation threshold\" method."
},
"MaterializedViewDefinition": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. A query whose results are persisted."
},
"enableRefresh": {
"type": "boolean",
"description": "Optional. Enable automatic refresh of the materialized view when the base table is updated. The default value is \"true\"."
},
"lastRefreshTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The time when this materialized view was last refreshed, in milliseconds since the epoch."
},
"refreshIntervalMs": {
"type": "string",
"format": "uint64",
"description": "Optional. The maximum frequency at which this materialized view will be refreshed. The default value is \"1800000\" (30 minutes)."
},
"allowNonIncrementalDefinition": {
"type": "boolean",
"description": "Optional. This option declares the intention to construct a materialized view that isn't refreshed incrementally. Non-incremental materialized views support an expanded range of SQL queries. The `allow_non_incremental_definition` option can't be changed after the materialized view is created."
}
},
"description": "Definition and configuration of a materialized view."
},
"ExternalCatalogTableOptions": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"description": "Optional. A map of the key-value pairs defining the parameters and properties of the open source table. Corresponds with Hive metastore table parameters. Maximum size of 4MiB.",
"additionalProperties": {
"type": "string"
}
},
"connectionId": {
"type": "string",
"description": "Optional. A connection ID that specifies the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or Amazon S3. This connection is needed to read the open source table from BigQuery. The connection_id format must be either `..` or `projects//locations//connections/`."
},
"storageDescriptor": {
"$ref": "#/$defs/StorageDescriptor",
"description": "Optional. A storage descriptor containing information about the physical storage of this table."
}
},
"description": "Metadata about open source compatible table. The fields contained in these options correspond to Hive metastore's table-level properties."
},
"UserDefinedFunctionResource": {
"type": "object",
"properties": {
"inlineCode": {
"type": "string",
"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."
},
"resourceUri": {
"type": "string",
"description": "[Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path)."
}
},
"description": " This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of GoogleSQL 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": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. An opaque ID uniquely identifying the table."
},
"etag": {
"type": "string",
"readOnly": true,
"description": "Output only. A hash of this resource."
},
"kind": {
"type": "string",
"default": "bigquery#table",
"description": "The type of resource ID."
},
"type": {
"type": "string",
"readOnly": true,
"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. * `EXTERNAL`: A table that references data stored in an external storage system, such as Google Cloud Storage. * `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on [table snapshots](https://cloud.google.com/bigquery/docs/table-snapshots-intro). The default value is `TABLE`."
},
"view": {
"$ref": "#/$defs/ViewDefinition",
"description": "Optional. The view definition."
},
"labels": {
"type": "object",
"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.",
"additionalProperties": {
"type": "string"
}
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "Optional. Describes the schema of this table."
},
"numRows": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. The number of rows of data in this table, excluding any data in the streaming buffer."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location where the table resides. This value is inherited from the dataset."
},
"numBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The size of this table in logical bytes, excluding any data in the streaming buffer."
},
"replicas": {
"type": "array",
"items": {
"$ref": "#/$defs/TableReference"
},
"readOnly": true,
"description": "Optional. Output only. Table references of all replicas currently active on the table."
},
"selfLink": {
"type": "string",
"readOnly": true,
"description": "Output only. A URL that can be used to access this resource again."
},
"clustering": {
"$ref": "#/$defs/Clustering",
"description": "Clustering specification for the table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered."
},
"description": {
"type": "string",
"description": "Optional. A user-friendly description of this table."
},
"creationTime": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The time when this table was created, in milliseconds since the epoch."
},
"friendlyName": {
"type": "string",
"description": "Optional. A descriptive name for this table."
},
"maxStaleness": {
"type": "string",
"description": "Optional. The maximum staleness of data that could be returned when the table (or stale MV) is queried. Staleness encoded as a string encoding of sql IntervalValue type."
},
"resourceTags": {
"type": "object",
"description": "Optional. The [tags](https://cloud.google.com/bigquery/docs/tags) attached to this table. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details.",
"additionalProperties": {
"type": "string"
}
},
"restrictions": {
"$ref": "#/$defs/RestrictionConfig",
"readOnly": true,
"description": "Optional. Output only. Restriction config for table. If set, restrict certain accesses on the table based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details."
},
"numPartitions": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"expirationTime": {
"type": "string",
"format": "int64",
"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."
},
"tableReference": {
"$ref": "#/$defs/TableReference",
"description": "Required. Reference describing the ID of this table."
},
"cloneDefinition": {
"$ref": "#/$defs/CloneDefinition",
"readOnly": true,
"description": "Output only. Contains information about the clone. This value is set via the clone operation."
},
"streamingBuffer": {
"$ref": "#/$defs/Streamingbuffer",
"readOnly": true,
"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."
},
"defaultCollation": {
"type": "string",
"description": "Optional. Defines the default collation specification of new STRING fields in the table. During table creation or update, if a STRING field is added to this table without explicit collation specified, then the table inherits the table default collation. A change to this field affects only fields added afterwards, and does not alter the existing fields. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"lastModifiedTime": {
"type": "string",
"format": "uint64",
"readOnly": true,
"description": "Output only. The time when this table was last modified, in milliseconds since the epoch."
},
"managedTableType": {
"enum": [
"MANAGED_TABLE_TYPE_UNSPECIFIED",
"NATIVE",
"BIGLAKE"
],
"type": "string",
"description": "Optional. If set, overrides the default managed table type configured in the dataset.",
"x-google-enum-descriptions": [
"No managed table type specified.",
"The managed table is a native BigQuery table.",
"The managed table is a BigLake table for Apache Iceberg in BigQuery."
]
},
"materializedView": {
"$ref": "#/$defs/MaterializedViewDefinition",
"description": "Optional. The materialized view definition."
},
"numLongTermBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of logical bytes in the table that are considered \"long-term storage\"."
},
"numPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The physical size of this table in bytes. This includes storage used for time travel."
},
"tableConstraints": {
"$ref": "#/$defs/TableConstraints",
"description": "Optional. Tables Primary Key and Foreign Key information"
},
"timePartitioning": {
"$ref": "#/$defs/TimePartitioning",
"description": "If specified, configures time-based partitioning for this table."
},
"rangePartitioning": {
"$ref": "#/$defs/RangePartitioning",
"description": "If specified, configures range partitioning for this table."
},
"snapshotDefinition": {
"$ref": "#/$defs/SnapshotDefinition",
"readOnly": true,
"description": "Output only. Contains information about the snapshot. This value is set via snapshot creation."
},
"defaultRoundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Defines the default rounding mode specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. During table creation or update, if a decimal field is added to this table without an explicit rounding mode specified, then the field inherits the table default rounding mode. Changing this field doesn't affect existing fields.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"partitionDefinition": {
"$ref": "#/$defs/PartitioningDefinition",
"description": "Optional. The partition information for all table formats, including managed partitioned tables, hive partitioned tables, iceberg partitioned, and metastore partitioned tables. This field is only populated for metastore partitioned tables. For other table formats, this is an output only field."
},
"biglakeConfiguration": {
"$ref": "#/$defs/BigLakeConfiguration",
"description": "Optional. Specifies the configuration of a BigQuery table for Apache Iceberg."
},
"numTotalLogicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Total number of logical bytes in the table or materialized view."
},
"tableReplicationInfo": {
"$ref": "#/$defs/TableReplicationInfo",
"description": "Optional. Table replication info for table created `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`"
},
"numActiveLogicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of logical bytes that are less than 90 days old."
},
"numTotalPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"materializedViewStatus": {
"$ref": "#/$defs/MaterializedViewStatus",
"readOnly": true,
"description": "Output only. The materialized view status."
},
"numActivePhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"requirePartitionFilter": {
"type": "boolean",
"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."
},
"encryptionConfiguration": {
"$ref": "#/$defs/EncryptionConfiguration",
"description": "Custom encryption configuration (e.g., Cloud KMS keys)."
},
"numCurrentPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes."
},
"numLongTermLogicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of logical bytes that are more than 90 days old."
},
"numLongTermPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"externalDataConfiguration": {
"$ref": "#/$defs/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."
},
"numTimeTravelPhysicalBytes": {
"type": "string",
"format": "int64",
"readOnly": true,
"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."
},
"externalCatalogTableOptions": {
"$ref": "#/$defs/ExternalCatalogTableOptions",
"description": "Optional. Options defining open source compatible table."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
Add a human-readable title so users do not have to interpret the tool identifier.
Description96/100
Run a read-only SQL query in the project and return the result. Prefer this tool over
`execute_sql` if possible.
This tool is restricted to only `SELECT` statements. `INSERT`, `UPDATE`, and `DELETE`
statements and stored procedures aren't allowed. If the query doesn't include a `SELECT`
statement, an error is returned. For information on creating queries, see the [GoogleSQL
documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax).
IMPORTANT: For predictive and analytical tasks (forecasting, anomaly detection,
key driver / root cause analysis, classification, churn prediction, or text generation),
ALWAYS execute computation in-warehouse using BigQuery native AI/ML functions
(`AI.FORECAST`, `AI.DETECT_ANOMALIES`, `AI.KEY_DRIVERS`, `AI.CLASSIFY`, `AI.GENERATE`)
rather than exporting raw rows to a local Python sandbox. In-warehouse execution
scales to billions of rows, preserves governance, and eliminates data egress latency.
Example Queries:
```sql
-- Count the number of penguins in each island.
SELECT island, COUNT(*) AS population
FROM bigquery-public-data.ml_datasets.penguins GROUP BY island
-- Forecast data using AI.FORECAST
SELECT *
FROM AI.FORECAST(TABLE `project.dataset.my_table`, data_col => 'num_trips',
timestamp_col => 'date', id_cols => ['usertype'], horizon => 30)
-- Detect anomalies in time series data using AI.DETECT_ANOMALIES
SELECT *
FROM AI.DETECT_ANOMALIES(
TABLE `project.dataset.historical_metrics`,
TABLE `project.dataset.recent_metrics`,
data_col => 'num_requests',
timestamp_col => 'timestamp'
)
-- Identify key drivers of metric changes using AI.KEY_DRIVERS
SELECT *
FROM AI.KEY_DRIVERS(
TABLE `project.dataset.sales_summary`,
metric_col => 'total_revenue',
dimension_cols => ['region', 'product_category'],
interest_label_col => 'is_current_quarter'
)
-- Classify text into categories using AI.CLASSIFY
SELECT
ticket_id,
AI.CLASSIFY(ticket_text, ['Billing', 'Technical Support', 'Feature Request']) AS category
FROM `project.dataset.support_tickets`
-- Generate text or summaries using AI.GENERATE
SELECT
review_id,
AI.GENERATE(CONCAT('Summarize this customer review: ', review_text)).result AS summary
FROM `project.dataset.reviews`
```
Queries executed using the `execute_sql_readonly` tool will always have the job label
`goog-mcp-server: true` automatically set in addition to any custom `labels` provided in
the request. Queries are charged to the project specified in the `project_id` field.
Query Execution Behavior:
* If the query completes within the synchronous timeout (default 20 seconds or custom `timeout_ms`),
the tool returns `job_complete: true` and the result rows directly. For fast queries, `job_id` may
be omitted as no persistent background job is created; no further action or polling is needed.
* If the query takes longer than `timeout_ms`, the tool returns `job_complete: false` and a `job_id` and `location`.
In this case, use the `get_query_results` tool with `job_id` and `location` to poll until `job_complete: true`,
or use `cancel_job` to abort the running query.
* You can optionally specify `timeout_ms` to configure the maximum synchronous wait time in milliseconds
(defaults to 20,000 ms), and `job_timeout_ms` to enforce a hard server-side timeout after which
BigQuery automatically terminates the job.
The description explains the capability, when to use it, and what to expect.
Inputs79/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
dryRun
Optional. If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.
Clear enough to supply this argument.
jobTimeoutMs
Optional. Optional: Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop the query job.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
labels
Optional. The labels associated with this query. Labels can be used to organize and group query 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 keys must start with a letter and each label in the map must have a different key.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
projectId
Required. Project that will be used for query execution and billing.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
query
Required. The query to execute in the form of a GoogleSQL query.
Clear enough to supply this argument.
timeoutMs
Optional. Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 20 seconds (20,000 milliseconds).
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
{
"type": "object",
"$defs": {
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
}
},
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"description": "Properties of the object."
}
},
"description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above."
},
"jobId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`."
},
"errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorProto"
},
"readOnly": true,
"description": "Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages)."
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "The schema of the results. Present only when the query completes successfully."
},
"queryId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the query."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this location with `get_query_results`, `cancel_job`, or `get_job`."
},
"jobComplete": {
"type": "boolean",
"description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
},
"totalSlotMs": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of slot ms the user is actually billed for."
},
"totalBytesBilled": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing."
},
"numDmlAffectedRows": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of rows affected by a DML statement."
},
"totalBytesProcessed": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes processed for this query."
}
},
"description": "Response for a BigQuery SQL query."
}
Original tool metadata
{
"name": "execute_sql_readonly",
"description": "Run a read-only SQL query in the project and return the result. Prefer this tool over\n`execute_sql` if possible.\n\nThis tool is restricted to only `SELECT` statements. `INSERT`, `UPDATE`, and `DELETE`\nstatements and stored procedures aren't allowed. If the query doesn't include a `SELECT`\nstatement, an error is returned. For information on creating queries, see the [GoogleSQL\ndocumentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax).\n\nIMPORTANT: For predictive and analytical tasks (forecasting, anomaly detection,\nkey driver / root cause analysis, classification, churn prediction, or text generation),\nALWAYS execute computation in-warehouse using BigQuery native AI/ML functions\n(`AI.FORECAST`, `AI.DETECT_ANOMALIES`, `AI.KEY_DRIVERS`, `AI.CLASSIFY`, `AI.GENERATE`)\nrather than exporting raw rows to a local Python sandbox. In-warehouse execution\nscales to billions of rows, preserves governance, and eliminates data egress latency.\n\n\nExample Queries:\n\n```sql\n-- Count the number of penguins in each island.\nSELECT island, COUNT(*) AS population\nFROM bigquery-public-data.ml_datasets.penguins GROUP BY island\n\n-- Forecast data using AI.FORECAST\nSELECT *\nFROM AI.FORECAST(TABLE `project.dataset.my_table`, data_col => 'num_trips',\n timestamp_col => 'date', id_cols => ['usertype'], horizon => 30)\n\n-- Detect anomalies in time series data using AI.DETECT_ANOMALIES\nSELECT *\nFROM AI.DETECT_ANOMALIES(\n TABLE `project.dataset.historical_metrics`,\n TABLE `project.dataset.recent_metrics`,\n data_col => 'num_requests',\n timestamp_col => 'timestamp'\n)\n\n-- Identify key drivers of metric changes using AI.KEY_DRIVERS\nSELECT *\nFROM AI.KEY_DRIVERS(\n TABLE `project.dataset.sales_summary`,\n metric_col => 'total_revenue',\n dimension_cols => ['region', 'product_category'],\n interest_label_col => 'is_current_quarter'\n)\n\n-- Classify text into categories using AI.CLASSIFY\nSELECT\n ticket_id,\n AI.CLASSIFY(ticket_text, ['Billing', 'Technical Support', 'Feature Request']) AS category\nFROM `project.dataset.support_tickets`\n\n-- Generate text or summaries using AI.GENERATE\nSELECT\n review_id,\n AI.GENERATE(CONCAT('Summarize this customer review: ', review_text)).result AS summary\nFROM `project.dataset.reviews`\n```\n\nQueries executed using the `execute_sql_readonly` tool will always have the job label\n`goog-mcp-server: true` automatically set in addition to any custom `labels` provided in\nthe request. Queries are charged to the project specified in the `project_id` field.\n\nQuery Execution Behavior:\n* If the query completes within the synchronous timeout (default 20 seconds or custom `timeout_ms`),\n the tool returns `job_complete: true` and the result rows directly. For fast queries, `job_id` may\n be omitted as no persistent background job is created; no further action or polling is needed.\n* If the query takes longer than `timeout_ms`, the tool returns `job_complete: false` and a `job_id` and `location`.\n In this case, use the `get_query_results` tool with `job_id` and `location` to poll until `job_complete: true`,\n or use `cancel_job` to abort the running query.\n* You can optionally specify `timeout_ms` to configure the maximum synchronous wait time in milliseconds\n (defaults to 20,000 ms), and `job_timeout_ms` to enforce a hard server-side timeout after which\n BigQuery automatically terminates the job.\n",
"inputSchema": {
"type": "object",
"required": [
"projectId",
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Required. The query to execute in the form of a GoogleSQL query."
},
"dryRun": {
"type": "boolean",
"description": "Optional. If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false."
},
"labels": {
"type": "object",
"description": "Optional. The labels associated with this query. Labels can be used to organize and group query 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 keys must start with a letter and each label in the map must have a different key.",
"additionalProperties": {
"type": "string"
}
},
"projectId": {
"type": "string",
"description": "Required. Project that will be used for query execution and billing."
},
"timeoutMs": {
"type": "integer",
"format": "int64",
"maximum": 4294967295,
"minimum": 0,
"description": "Optional. Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 20 seconds (20,000 milliseconds)."
},
"jobTimeoutMs": {
"type": "string",
"format": "int64",
"description": "Optional. Optional: Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop the query job."
}
},
"description": "Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout."
},
"outputSchema": {
"type": "object",
"$defs": {
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
}
},
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"description": "Properties of the object."
}
},
"description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above."
},
"jobId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`."
},
"errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorProto"
},
"readOnly": true,
"description": "Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages)."
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "The schema of the results. Present only when the query completes successfully."
},
"queryId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the query."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this location with `get_query_results`, `cancel_job`, or `get_job`."
},
"jobComplete": {
"type": "boolean",
"description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
},
"totalSlotMs": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of slot ms the user is actually billed for."
},
"totalBytesBilled": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing."
},
"numDmlAffectedRows": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of rows affected by a DML statement."
},
"totalBytesProcessed": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes processed for this query."
}
},
"description": "Response for a BigQuery SQL query."
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
Add a human-readable title so users do not have to interpret the tool identifier.
Description94/100
Run a SQL query in the project and return the result. Prefer the `execute_sql_readonly`
tool if possible.
This tool can execute any query that bigquery supports including:
* SQL Queries (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, etc.)
* AI/ML functions like `AI.FORECAST`, `AI.KEY_DRIVERS`, `ML.EVALUATE`, `ML.PREDICT`
* Any other query that bigquery supports.
Example Queries:
```sql
-- Insert data into a table.
INSERT INTO `my_project.my_dataset`.my_table (name, age)
VALUES ('Alice', 30);
-- Create a table.
CREATE TABLE `my_project.my_dataset`.my_table (
name STRING,
age INT64);
-- DELETE data from a table.
DELETE FROM `my_project.my_dataset`.my_table WHERE name = 'Alice';
-- Create Dataset
CREATE SCHEMA `my_project.my_dataset` OPTIONS (location = 'US');
-- Drop table
DROP TABLE `my_project.my_dataset`.my_table;
-- Drop dataset
DROP SCHEMA `my_project.my_dataset`;
-- Create Model
CREATE OR REPLACE MODEL `my_project.my_dataset.my_model`
OPTIONS (
model_type = 'LINEAR_REG'
LS_INIT_LEARN_RATE=0.15,
L1_REG=1,
MAX_ITERATIONS=5,
DATA_SPLIT_METHOD='SEQ',
DATA_SPLIT_EVAL_FRACTION=0.3,
DATA_SPLIT_COL='timestamp') AS
SELECT col1, col2, timestamp, label FROM `my_project.my_dataset.my_table`;
```
Queries executed using the `execute_sql` tool will always have the default job label
`goog-mcp-server: true` automatically set in addition to any custom `labels` provided in the
request. Queries are charged to the project specified in the `project_id` field.
Query Execution Behavior:
* If the query completes within the synchronous timeout (default 20 seconds or custom `timeout_ms`),
the tool returns `job_complete: true` and the initial result rows directly. For fast queries, `job_id` may
be omitted as no persistent background job is created; no further action or polling is needed.
* If the query takes longer than `timeout_ms`, the tool returns `job_complete: false` and a `job_id` and `location`.
In this case, use the `get_query_results` tool with `job_id` and `location` to poll until `job_complete: true`,
or use `cancel_job` to abort the running query.
* You can optionally specify `timeout_ms` to configure the maximum synchronous wait time in milliseconds
(defaults to 20,000 ms), and `job_timeout_ms` to enforce a hard server-side timeout after which
BigQuery automatically terminates the job.
The description explains the capability, when to use it, and what to expect.
Inputs83/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
dryRun
Optional. If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.
Clear enough to supply this argument.
jobTimeoutMs
Optional. Optional: Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop the query job.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
labels
Optional. The labels associated with this query. Labels can be used to organize and group query 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 keys must start with a letter and each label in the map must have a different key.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
projectId
Required. Project that will be used for query execution and billing.
Clear enough to supply this argument.
query
Required. The query to execute in the form of a GoogleSQL query.
Clear enough to supply this argument.
timeoutMs
Optional. Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 20 seconds (20,000 milliseconds).
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
{
"type": "object",
"$defs": {
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
}
},
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"description": "Properties of the object."
}
},
"description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above."
},
"jobId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`."
},
"errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorProto"
},
"readOnly": true,
"description": "Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages)."
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "The schema of the results. Present only when the query completes successfully."
},
"queryId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the query."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this location with `get_query_results`, `cancel_job`, or `get_job`."
},
"jobComplete": {
"type": "boolean",
"description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
},
"totalSlotMs": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of slot ms the user is actually billed for."
},
"totalBytesBilled": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing."
},
"numDmlAffectedRows": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of rows affected by a DML statement."
},
"totalBytesProcessed": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes processed for this query."
}
},
"description": "Response for a BigQuery SQL query."
}
Original tool metadata
{
"name": "execute_sql",
"description": "Run a SQL query in the project and return the result. Prefer the `execute_sql_readonly`\ntool if possible.\n\nThis tool can execute any query that bigquery supports including:\n\n* SQL Queries (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, etc.)\n* AI/ML functions like `AI.FORECAST`, `AI.KEY_DRIVERS`, `ML.EVALUATE`, `ML.PREDICT`\n* Any other query that bigquery supports.\n\nExample Queries:\n\n```sql\n-- Insert data into a table.\nINSERT INTO `my_project.my_dataset`.my_table (name, age)\nVALUES ('Alice', 30);\n\n-- Create a table.\nCREATE TABLE `my_project.my_dataset`.my_table (\n name STRING,\n age INT64);\n\n-- DELETE data from a table.\nDELETE FROM `my_project.my_dataset`.my_table WHERE name = 'Alice';\n\n-- Create Dataset\nCREATE SCHEMA `my_project.my_dataset` OPTIONS (location = 'US');\n\n-- Drop table\nDROP TABLE `my_project.my_dataset`.my_table;\n\n-- Drop dataset\nDROP SCHEMA `my_project.my_dataset`;\n\n-- Create Model\nCREATE OR REPLACE MODEL `my_project.my_dataset.my_model`\nOPTIONS (\n model_type = 'LINEAR_REG'\n LS_INIT_LEARN_RATE=0.15,\n L1_REG=1,\n MAX_ITERATIONS=5,\n DATA_SPLIT_METHOD='SEQ',\n DATA_SPLIT_EVAL_FRACTION=0.3,\n DATA_SPLIT_COL='timestamp') AS\nSELECT col1, col2, timestamp, label FROM `my_project.my_dataset.my_table`;\n```\n\nQueries executed using the `execute_sql` tool will always have the default job label\n`goog-mcp-server: true` automatically set in addition to any custom `labels` provided in the\nrequest. Queries are charged to the project specified in the `project_id` field.\n\nQuery Execution Behavior:\n* If the query completes within the synchronous timeout (default 20 seconds or custom `timeout_ms`),\n the tool returns `job_complete: true` and the initial result rows directly. For fast queries, `job_id` may\n be omitted as no persistent background job is created; no further action or polling is needed.\n* If the query takes longer than `timeout_ms`, the tool returns `job_complete: false` and a `job_id` and `location`.\n In this case, use the `get_query_results` tool with `job_id` and `location` to poll until `job_complete: true`,\n or use `cancel_job` to abort the running query.\n* You can optionally specify `timeout_ms` to configure the maximum synchronous wait time in milliseconds\n (defaults to 20,000 ms), and `job_timeout_ms` to enforce a hard server-side timeout after which\n BigQuery automatically terminates the job.\n",
"inputSchema": {
"type": "object",
"required": [
"projectId",
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Required. The query to execute in the form of a GoogleSQL query."
},
"dryRun": {
"type": "boolean",
"description": "Optional. If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false."
},
"labels": {
"type": "object",
"description": "Optional. The labels associated with this query. Labels can be used to organize and group query 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 keys must start with a letter and each label in the map must have a different key.",
"additionalProperties": {
"type": "string"
}
},
"projectId": {
"type": "string",
"description": "Required. Project that will be used for query execution and billing."
},
"timeoutMs": {
"type": "integer",
"format": "int64",
"maximum": 4294967295,
"minimum": 0,
"description": "Optional. Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 20 seconds (20,000 milliseconds)."
},
"jobTimeoutMs": {
"type": "string",
"format": "int64",
"description": "Optional. Optional: Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop the query job."
}
},
"description": "Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout."
},
"outputSchema": {
"type": "object",
"$defs": {
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
}
},
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"description": "Properties of the object."
}
},
"description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above."
},
"jobId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`."
},
"errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorProto"
},
"readOnly": true,
"description": "Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages)."
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "The schema of the results. Present only when the query completes successfully."
},
"queryId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the query."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this location with `get_query_results`, `cancel_job`, or `get_job`."
},
"jobComplete": {
"type": "boolean",
"description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
},
"totalSlotMs": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of slot ms the user is actually billed for."
},
"totalBytesBilled": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing."
},
"numDmlAffectedRows": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of rows affected by a DML statement."
},
"totalBytesProcessed": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes processed for this query."
}
},
"description": "Response for a BigQuery SQL query."
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}
Add a human-readable title so users do not have to interpret the tool identifier.
Description87/100
Get the results of a BigQuery SQL query job.
Use this tool ONLY when:
1. A previous `execute_sql` or `execute_sql_readonly` call returned `job_complete: false` with a `job_id`
(poll with this tool until `job_complete: true`), OR
2. You need to paginate through additional rows using `page_token` or `start_index` for a previously completed job.
Do NOT call this tool if the query already returned `job_complete: true` with all rows.
Supports pagination. Use `max_results` to limit results and `page_token` to retrieve the next page of results.
The description explains the capability, when to use it, and what to expect.
Inputs75/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
jobId
Required. Job ID of the query job.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
location
Required. The geographic location of the job.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
maxResults
Optional. Maximum number of results to read.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageToken
Optional. Page token, returned by a previous call, to request the next page of results.
Clear enough to supply this argument.
projectId
Required. Project ID of the query job.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
startIndex
Optional. Zero-based index of the starting row.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
timeoutMs
Optional. Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
{
"type": "object",
"$defs": {
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
}
},
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"description": "Properties of the object."
}
},
"description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above."
},
"jobId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`."
},
"errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorProto"
},
"readOnly": true,
"description": "Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages)."
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "The schema of the results. Present only when the query completes successfully."
},
"queryId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the query."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this location with `get_query_results`, `cancel_job`, or `get_job`."
},
"jobComplete": {
"type": "boolean",
"description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
},
"totalSlotMs": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of slot ms the user is actually billed for."
},
"totalBytesBilled": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing."
},
"numDmlAffectedRows": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of rows affected by a DML statement."
},
"totalBytesProcessed": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes processed for this query."
}
},
"description": "Response for a BigQuery SQL query."
}
Original tool metadata
{
"name": "get_query_results",
"description": "Get the results of a BigQuery SQL query job.\n\nUse this tool ONLY when:\n1. A previous `execute_sql` or `execute_sql_readonly` call returned `job_complete: false` with a `job_id`\n (poll with this tool until `job_complete: true`), OR\n2. You need to paginate through additional rows using `page_token` or `start_index` for a previously completed job.\n\nDo NOT call this tool if the query already returned `job_complete: true` with all rows.\n\nSupports pagination. Use `max_results` to limit results and `page_token` to retrieve the next page of results.\n",
"inputSchema": {
"type": "object",
"required": [
"projectId",
"jobId",
"location"
],
"properties": {
"jobId": {
"type": "string",
"description": "Required. Job ID of the query job."
},
"location": {
"type": "string",
"description": "Required. The geographic location of the job."
},
"pageToken": {
"type": "string",
"description": "Optional. Page token, returned by a previous call, to request the next page of results."
},
"projectId": {
"type": "string",
"description": "Required. Project ID of the query job."
},
"timeoutMs": {
"type": "integer",
"format": "int64",
"maximum": 4294967295,
"minimum": 0,
"description": "Optional. Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete."
},
"maxResults": {
"type": "integer",
"format": "int64",
"maximum": 4294967295,
"minimum": 0,
"description": "Optional. Maximum number of results to read."
},
"startIndex": {
"type": "string",
"format": "uint64",
"description": "Optional. Zero-based index of the starting row."
}
},
"description": "Request for getting query results of a job."
},
"outputSchema": {
"type": "object",
"$defs": {
"ErrorProto": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A short error code that summarizes the error."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
},
"location": {
"type": "string",
"description": "Specifies where the error occurred, if present."
},
"debugInfo": {
"type": "string",
"description": "Debugging information. This property is internal to Google and should not be used."
}
},
"description": "Error details."
},
"TableSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Describes the fields in a table."
},
"foreignTypeInfo": {
"$ref": "#/$defs/ForeignTypeInfo",
"description": "Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition)."
}
},
"description": "Schema of a table"
},
"PolicyTagList": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of policy tag resource names. For example, \"projects/1/locations/eu/taxonomies/2/policyTags/3\". At most 1 policy tag is currently allowed."
}
}
},
"DataPolicyList": {
"type": "object",
"properties": {
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Contains a list of data policy options. At most 9 data policies are allowed per field."
}
},
"description": "A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"ForeignTypeInfo": {
"type": "object",
"properties": {
"typeSystem": {
"enum": [
"TYPE_SYSTEM_UNSPECIFIED",
"HIVE"
],
"type": "string",
"description": "Required. Specifies the system which defines the foreign data type.",
"x-google-enum-descriptions": [
"TypeSystem not specified.",
"Represents Hive data types."
]
}
},
"description": "Metadata about the foreign data type definition such as the system in which the type is defined."
},
"GeneratedColumn": {
"type": "object",
"properties": {
"generatedMode": {
"enum": [
"GENERATED_MODE_UNSPECIFIED",
"GENERATED_ALWAYS",
"GENERATED_BY_DEFAULT"
],
"type": "string",
"description": "Optional. Dictates when system generated values are used to populate the field.",
"x-google-enum-descriptions": [
"Unspecified GeneratedMode will default to GENERATED_ALWAYS.",
"Field can only have system generated values. Users cannot manually insert values into the field.",
"Use system generated values only if the user does not explicitly provide a value."
]
},
"generatedExpressionInfo": {
"$ref": "#/$defs/GeneratedExpressionInfo",
"description": "Definition of the expression used to generate the field."
}
},
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"DataPolicyOption": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id."
}
},
"description": "Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column)."
},
"FieldElementType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Required. The type of a field element. For more information, see TableFieldSchema.type."
}
},
"description": "Represents the type of a field element."
},
"TableFieldSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
},
"name": {
"type": "string",
"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": {
"type": "string",
"description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema."
},
"scale": {
"type": "string",
"format": "int64",
"description": "Optional. See documentation for precision."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/TableFieldSchema"
},
"description": "Optional. Describes the nested schema fields if the type property is set to RECORD."
},
"collation": {
"type": "string",
"description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior."
},
"maxLength": {
"type": "string",
"format": "int64",
"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\"."
},
"precision": {
"type": "string",
"format": "int64",
"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."
},
"policyTags": {
"$ref": "#/$defs/PolicyTagList",
"description": "Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags."
},
"description": {
"type": "string",
"description": "Optional. The field description. The maximum length is 1,024 characters."
},
"dataPolicies": {
"type": "array",
"items": {
"$ref": "#/$defs/DataPolicyOption"
},
"description": "Optional. Data policies attached to this field, used for field-level access control."
},
"roundingMode": {
"enum": [
"ROUNDING_MODE_UNSPECIFIED",
"ROUND_HALF_AWAY_FROM_ZERO",
"ROUND_HALF_EVEN"
],
"type": "string",
"description": "Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.",
"x-google-enum-descriptions": [
"Unspecified will default to using ROUND_HALF_AWAY_FROM_ZERO.",
"ROUND_HALF_AWAY_FROM_ZERO rounds half values away from zero when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1.9 => 2",
"ROUND_HALF_EVEN rounds half values to the nearest even value when applying precision and scale upon writing of NUMERIC and BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1.8, 1.9 => 2 2.5 => 2"
]
},
"dataPolicyList": {
"$ref": "#/$defs/DataPolicyList",
"description": "Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information."
},
"generatedColumn": {
"$ref": "#/$defs/GeneratedColumn",
"description": "Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields)."
},
"rangeElementType": {
"$ref": "#/$defs/FieldElementType",
"description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Values for the field element type can be the following: * DATE * DATETIME * TIMESTAMP"
},
"timestampPrecision": {
"type": "string",
"format": "int64",
"default": "6",
"description": "Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)"
},
"foreignTypeDefinition": {
"type": "string",
"description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required."
},
"dataGovernanceTagsInfo": {
"$ref": "#/$defs/DataGovernanceTagsInfo",
"description": "Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: * **Precedence**: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. * **Patching behavior**: Describes how this field behaves during a `Table.patch` schema update: * **Unset**: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. * **Empty Field**: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This removes all tags from the column. * **Updating tags**: To replace an existing tag, send the field with the new tag."
},
"defaultValueExpression": {
"type": "string",
"description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field."
}
},
"description": "A field in TableSchema"
},
"DataGovernanceTagsInfo": {
"type": "object",
"properties": {
"dataGovernanceTags": {
"type": "object",
"description": "Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"parent-id/pii\" where parent-id is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"sensitive\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: \"parent-id/pii\": \"sensitive\", \"myProject/cost_center\": \"sales\"",
"additionalProperties": {
"type": "string"
}
}
}
},
"GeneratedExpressionInfo": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"description": "Optional. Whether the generated column is stored in the table."
},
"asynchronous": {
"type": "boolean",
"description": "Optional. Whether the column generation is done asynchronously."
},
"generationExpression": {
"type": "string",
"description": "Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field."
}
},
"description": "Definition of the expression used to generate the field."
}
},
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"description": "Properties of the object."
}
},
"description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above."
},
"jobId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this ID with `get_query_results`, `cancel_job`, or `get_job`."
},
"errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorProto"
},
"readOnly": true,
"description": "Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages)."
},
"schema": {
"$ref": "#/$defs/TableSchema",
"description": "The schema of the results. Present only when the query completes successfully."
},
"queryId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the query."
},
"location": {
"type": "string",
"readOnly": true,
"description": "Output only. The geographic location of the BigQuery job created for this query, if any. Present when a query job is created (e.g. for long-running operations, DML, scripts). Use this location with `get_query_results`, `cancel_job`, or `get_job`."
},
"jobComplete": {
"type": "boolean",
"description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
},
"totalSlotMs": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. Number of slot ms the user is actually billed for."
},
"totalBytesBilled": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes billed for the query. Only applies if the project is configured to use on-demand pricing."
},
"numDmlAffectedRows": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The number of rows affected by a DML statement."
},
"totalBytesProcessed": {
"type": "string",
"format": "int64",
"readOnly": true,
"description": "Output only. The total number of bytes processed for this query."
}
},
"description": "Response for a BigQuery SQL query."
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
StatelessServer setup, tools, quality score, publishing readiness, and alternatives.
How do I add StatelessServer to Claude, ChatGPT, or Cursor?
Add StatelessServer to Claude, ChatGPT, or Cursor by connecting its remote MCP URL in each client's MCP settings. In Claude, add a custom connector. In ChatGPT, add an MCP app. In Cursor, add an MCP server under Settings. The MCP URL is https://bigquery.googleapis.com/mcp.
Is StatelessServer MCP ready for ChatGPT and Claude?
As of October 24, 2026, StatelessServer scores 90/100 on Manufact's MCP publishing checklist. The scan meets ChatGPT publishing checks and does not yet meet Claude publishing checks. Passing these checks does not guarantee marketplace approval.
How clear is StatelessServer's MCP tool documentation?
As of October 24, 2026, StatelessServer scores 54/100 in Manufact's review of tool titles, descriptions, input and output schemas, and behavior annotations. The review covers 9 of 9 discovered tools. The quality score measures documentation clarity; runtime behavior and marketplace readiness require separate checks.
What are the best alternatives to StatelessServer?
As of December 4, 2026, alternatives to StatelessServer in data-analytics on the Manufact MCP leaderboard include Neon, HYPD AI for Google Analytics, ClickHouse Cloud MCP Server, Polygraph, and athletedata.
How can StatelessServer improve its MCP documentation?
get_dataset_info is the lowest-scoring reviewed tool at 62/100. Add a human-readable title so users do not have to interpret the tool identifier. Open its review for feedback and a copyable fix prompt, then rerun the documentation review after updating your tool metadata.
Not your MCP?
Review any public or OAuth MCP server for protocol compatibility, tool documentation, and ChatGPT and Claude publishing readiness. No account required.