Module bigquery

bigquery

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
class pulumi_gcp.bigquery.Dataset(resource_name, opts=None, accesses=None, dataset_id=None, default_partition_expiration_ms=None, default_table_expiration_ms=None, delete_contents_on_destroy=None, description=None, friendly_name=None, labels=None, location=None, project=None, __props__=None, __name__=None, __opts__=None)

Creates a dataset resource for Google BigQuery. For more information see the official documentation and API.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • accesses (pulumi.Input[list]) – An array of objects that define dataset access for one or more entities. Structure is documented below.
  • dataset_id (pulumi.Input[str]) – The ID of the dataset containing this table.
  • default_partition_expiration_ms (pulumi.Input[float]) – The default partition expiration for all partitioned tables in the dataset, in milliseconds.
  • default_table_expiration_ms (pulumi.Input[float]) – The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
  • delete_contents_on_destroy (pulumi.Input[bool]) – If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.
  • description (pulumi.Input[str]) – A user-friendly description of the dataset.
  • friendly_name (pulumi.Input[str]) – A descriptive name for the dataset.
  • labels (pulumi.Input[dict]) – A mapping of labels to assign to the resource.
  • location (pulumi.Input[str]) – The geographic location where the dataset should reside. See official docs.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
accesses = None

An array of objects that define dataset access for one or more entities. Structure is documented below.

creation_time = None

The time when this dataset was created, in milliseconds since the epoch.

dataset_id = None

The ID of the dataset containing this table.

default_partition_expiration_ms = None

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

default_table_expiration_ms = None

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

delete_contents_on_destroy = None

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

description = None

A user-friendly description of the dataset.

etag = None

A hash of the resource.

friendly_name = None

A descriptive name for the dataset.

labels = None

A mapping of labels to assign to the resource.

last_modified_time = None

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

location = None

The geographic location where the dataset should reside. See official docs.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

The URI of the created resource.

static get(resource_name, id, opts=None, accesses=None, creation_time=None, dataset_id=None, default_partition_expiration_ms=None, default_table_expiration_ms=None, delete_contents_on_destroy=None, description=None, etag=None, friendly_name=None, labels=None, last_modified_time=None, location=None, project=None, self_link=None)

Get an existing Dataset resource’s state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param str id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[list] accesses: An array of objects that define dataset access for

one or more entities. Structure is documented below.
Parameters:
  • creation_time (pulumi.Input[float]) – The time when this dataset was created, in milliseconds since the epoch.
  • dataset_id (pulumi.Input[str]) – The ID of the dataset containing this table.
  • default_partition_expiration_ms (pulumi.Input[float]) – The default partition expiration for all partitioned tables in the dataset, in milliseconds.
  • default_table_expiration_ms (pulumi.Input[float]) – The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
  • delete_contents_on_destroy (pulumi.Input[bool]) – If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.
  • description (pulumi.Input[str]) – A user-friendly description of the dataset.
  • etag (pulumi.Input[str]) – A hash of the resource.
  • friendly_name (pulumi.Input[str]) – A descriptive name for the dataset.
  • labels (pulumi.Input[dict]) – A mapping of labels to assign to the resource.
  • last_modified_time (pulumi.Input[float]) – The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
  • location (pulumi.Input[str]) –

    The geographic location where the dataset should reside. See official docs.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
  • self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.bigquery.Table(resource_name, opts=None, dataset_id=None, description=None, expiration_time=None, external_data_configuration=None, friendly_name=None, labels=None, project=None, schema=None, table_id=None, time_partitioning=None, view=None, __props__=None, __name__=None, __opts__=None)

Creates a table resource in a dataset for Google BigQuery. For more information see the official documentation and API.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • dataset_id (pulumi.Input[str]) – The dataset ID to create the table in. Changing this forces a new resource to be created.
  • description (pulumi.Input[str]) – The field description.
  • expiration_time (pulumi.Input[float]) – 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.
  • external_data_configuration (pulumi.Input[dict]) – 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. Structure is documented below.
  • friendly_name (pulumi.Input[str]) – A descriptive name for the table.
  • labels (pulumi.Input[dict]) – A mapping of labels to assign to the resource.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
  • schema (pulumi.Input[str]) – A JSON schema for the table. Schema is required for CSV and JSON formats and is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats when using external tables. For more information see the BigQuery API documentation.
  • table_id (pulumi.Input[str]) – A unique ID for the resource. Changing this forces a new resource to be created.
  • time_partitioning (pulumi.Input[dict]) – If specified, configures time-based partitioning for this table. Structure is documented below.
  • view (pulumi.Input[dict]) – If specified, configures this table as a view. Structure is documented below.
creation_time = None

The time when this table was created, in milliseconds since the epoch.

dataset_id = None

The dataset ID to create the table in. Changing this forces a new resource to be created.

description = None

The field description.

etag = None

A hash of the resource.

expiration_time = None

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.

external_data_configuration = None

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. Structure is documented below.

friendly_name = None

A descriptive name for the table.

labels = None

A mapping of labels to assign to the resource.

last_modified_time = None

The time when this table was last modified, in milliseconds since the epoch.

location = None

The geographic location where the table resides. This value is inherited from the dataset.

num_bytes = None

The size of this table in bytes, excluding any data in the streaming buffer.

num_long_term_bytes = None

The number of bytes in the table that are considered “long-term storage”.

num_rows = None

The number of rows of data in this table, excluding any data in the streaming buffer.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

schema = None

A JSON schema for the table. Schema is required for CSV and JSON formats and is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats when using external tables. For more information see the BigQuery API documentation.

The URI of the created resource.

table_id = None

A unique ID for the resource. Changing this forces a new resource to be created.

time_partitioning = None

If specified, configures time-based partitioning for this table. Structure is documented below.

type = None

Describes the table type.

view = None

If specified, configures this table as a view. Structure is documented below.

static get(resource_name, id, opts=None, creation_time=None, dataset_id=None, description=None, etag=None, expiration_time=None, external_data_configuration=None, friendly_name=None, labels=None, last_modified_time=None, location=None, num_bytes=None, num_long_term_bytes=None, num_rows=None, project=None, schema=None, self_link=None, table_id=None, time_partitioning=None, type=None, view=None)

Get an existing Table resource’s state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param str id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[float] creation_time: The time when this table was created, in milliseconds since the epoch. :param pulumi.Input[str] dataset_id: The dataset ID to create the table in.

Changing this forces a new resource to be created.
Parameters:
  • description (pulumi.Input[str]) – The field description.
  • etag (pulumi.Input[str]) – A hash of the resource.
  • expiration_time (pulumi.Input[float]) – 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.
  • external_data_configuration (pulumi.Input[dict]) – 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. Structure is documented below.
  • friendly_name (pulumi.Input[str]) – A descriptive name for the table.
  • labels (pulumi.Input[dict]) – A mapping of labels to assign to the resource.
  • last_modified_time (pulumi.Input[float]) – The time when this table was last modified, in milliseconds since the epoch.
  • location (pulumi.Input[str]) – The geographic location where the table resides. This value is inherited from the dataset.
  • num_bytes (pulumi.Input[float]) – The size of this table in bytes, excluding any data in the streaming buffer.
  • num_long_term_bytes (pulumi.Input[float]) – The number of bytes in the table that are considered “long-term storage”.
  • num_rows (pulumi.Input[float]) – The number of rows of data in this table, excluding any data in the streaming buffer.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
  • schema (pulumi.Input[str]) –

    A JSON schema for the table. Schema is required for CSV and JSON formats and is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats when using external tables. For more information see the BigQuery API documentation.

  • self_link (pulumi.Input[str]) – The URI of the created resource.
  • table_id (pulumi.Input[str]) – A unique ID for the resource. Changing this forces a new resource to be created.
  • time_partitioning (pulumi.Input[dict]) – If specified, configures time-based partitioning for this table. Structure is documented below.
  • type (pulumi.Input[str]) – Describes the table type.
  • view (pulumi.Input[dict]) – If specified, configures this table as a view. Structure is documented below.
translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str