import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents a table. * * To get more information about Table, see: * * * [API documentation](https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs.databases.tables) * * How-to Guides * * [Manage open source metadata with BigLake Metastore](https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_tables) * * ## Example Usage * * ### Biglake Table * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const catalog = new gcp.biglake.Catalog("catalog", { * name: "my_catalog", * location: "US", * }); * const bucket = new gcp.storage.Bucket("bucket", { * name: "my_bucket", * location: "US", * forceDestroy: true, * uniformBucketLevelAccess: true, * }); * const metadataFolder = new gcp.storage.BucketObject("metadata_folder", { * name: "metadata/", * content: " ", * bucket: bucket.name, * }); * const dataFolder = new gcp.storage.BucketObject("data_folder", { * name: "data/", * content: " ", * bucket: bucket.name, * }); * const database = new gcp.biglake.Database("database", { * name: "my_database", * catalog: catalog.id, * type: "HIVE", * hiveOptions: { * locationUri: pulumi.interpolate`gs://${bucket.name}/${metadataFolder.name}`, * parameters: { * owner: "Alex", * }, * }, * }); * const table = new gcp.biglake.Table("table", { * name: "my_table", * database: database.id, * type: "HIVE", * hiveOptions: { * tableType: "MANAGED_TABLE", * storageDescriptor: { * locationUri: pulumi.interpolate`gs://${bucket.name}/${dataFolder.name}`, * inputFormat: "org.apache.hadoop.mapred.SequenceFileInputFormat", * outputFormat: "org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat", * }, * parameters: { * "spark.sql.create.version": "3.1.3", * "spark.sql.sources.schema.numParts": "1", * transient_lastDdlTime: "1680894197", * "spark.sql.partitionProvider": "catalog", * owner: "John Doe", * "spark.sql.sources.schema.part.0": "{\"type\":\"struct\",\"fields\":[{\"name\":\"id\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}},{\"name\":\"name\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"age\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}}]}", * "spark.sql.sources.provider": "iceberg", * provider: "iceberg", * }, * }, * }); * ``` * * ## Import * * Table can be imported using any of these accepted formats: * * * `{{database}}/tables/{{name}}` * * When using the `pulumi import` command, Table can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:biglake/table:Table default {{database}}/tables/{{name}} * ``` */ export declare class Table extends pulumi.CustomResource { /** * Get an existing Table resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TableState, opts?: pulumi.CustomResourceOptions): Table; /** * Returns true if the given object is an instance of Table. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Table; /** * Output only. The creation time of the table. A timestamp in RFC3339 UTC * "Zulu" format, with nanosecond resolution and up to nine fractional * digits. Examples: "2014-10-02T15:01:23Z" and * "2014-10-02T15:01:23.045123456Z". */ readonly createTime: pulumi.Output; /** * The id of the parent database. */ readonly database: pulumi.Output; /** * Output only. The deletion time of the table. Only set after the * table is deleted. A timestamp in RFC3339 UTC "Zulu" format, with * nanosecond resolution and up to nine fractional digits. Examples: * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ readonly deleteTime: pulumi.Output; /** * The checksum of a table object computed by the server based on the value * of other fields. It may be sent on update requests to ensure the client * has an up-to-date value before proceeding. It is only checked for update * table operations. */ readonly etag: pulumi.Output; /** * Output only. The time when this table is considered expired. Only set * after the table is deleted. A timestamp in RFC3339 UTC "Zulu" format, * with nanosecond resolution and up to nine fractional digits. Examples: * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ readonly expireTime: pulumi.Output; /** * Options of a Hive table. * Structure is documented below. */ readonly hiveOptions: pulumi.Output; /** * Output only. The name of the Table. Format: * projects/{project_id_or_number}/locations/{locationId}/catalogs/{catalogId}/databases/{databaseId}/tables/{tableId} */ readonly name: pulumi.Output; /** * The database type. * Possible values are: `HIVE`. */ readonly type: pulumi.Output; /** * Output only. The last modification time of the table. A timestamp in * RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine * fractional digits. Examples: "2014-10-02T15:01:23Z" and * "2014-10-02T15:01:23.045123456Z". */ readonly updateTime: pulumi.Output; /** * Create a Table resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: TableArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Table resources. */ export interface TableState { /** * Output only. The creation time of the table. A timestamp in RFC3339 UTC * "Zulu" format, with nanosecond resolution and up to nine fractional * digits. Examples: "2014-10-02T15:01:23Z" and * "2014-10-02T15:01:23.045123456Z". */ createTime?: pulumi.Input; /** * The id of the parent database. */ database?: pulumi.Input; /** * Output only. The deletion time of the table. Only set after the * table is deleted. A timestamp in RFC3339 UTC "Zulu" format, with * nanosecond resolution and up to nine fractional digits. Examples: * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ deleteTime?: pulumi.Input; /** * The checksum of a table object computed by the server based on the value * of other fields. It may be sent on update requests to ensure the client * has an up-to-date value before proceeding. It is only checked for update * table operations. */ etag?: pulumi.Input; /** * Output only. The time when this table is considered expired. Only set * after the table is deleted. A timestamp in RFC3339 UTC "Zulu" format, * with nanosecond resolution and up to nine fractional digits. Examples: * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ expireTime?: pulumi.Input; /** * Options of a Hive table. * Structure is documented below. */ hiveOptions?: pulumi.Input; /** * Output only. The name of the Table. Format: * projects/{project_id_or_number}/locations/{locationId}/catalogs/{catalogId}/databases/{databaseId}/tables/{tableId} */ name?: pulumi.Input; /** * The database type. * Possible values are: `HIVE`. */ type?: pulumi.Input; /** * Output only. The last modification time of the table. A timestamp in * RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine * fractional digits. Examples: "2014-10-02T15:01:23Z" and * "2014-10-02T15:01:23.045123456Z". */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Table resource. */ export interface TableArgs { /** * The id of the parent database. */ database?: pulumi.Input; /** * Options of a Hive table. * Structure is documented below. */ hiveOptions?: pulumi.Input; /** * Output only. The name of the Table. Format: * projects/{project_id_or_number}/locations/{locationId}/catalogs/{catalogId}/databases/{databaseId}/tables/{tableId} */ name?: pulumi.Input; /** * The database type. * Possible values are: `HIVE`. */ type?: pulumi.Input; }