UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

159 lines (158 loc) 6.68 kB
import * as pulumi from "@pulumi/pulumi"; /** * [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types) * * This data source can be used to fetch a data quality refresh on a Unity Catalog table. * * The caller must either: * 1. be an owner of the table's parent catalog * 2. have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema. * 3. have the following permissions: * - **USE_CATALOG** on the table's parent catalog * - **USE_SCHEMA** on the table's parent schema * - **SELECT** privilege on the table. * * > **Note** This data source can only be used with a workspace-level provider! * * ## Example Usage * * Getting a data quality refresh by Unity Catalog object type (currently supports `table`) and object id: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = databricks.getTable({ * name: "my_catalog.my_schema.my_table", * }); * const thisGetDataQualityRefresh = _this.then(_this => databricks.getDataQualityRefresh({ * objectType: "table", * objectId: _this.id, * })); * ``` */ export declare function getDataQualityRefresh(args: GetDataQualityRefreshArgs, opts?: pulumi.InvokeOptions): Promise<GetDataQualityRefreshResult>; /** * A collection of arguments for invoking getDataQualityRefresh. */ export interface GetDataQualityRefreshArgs { /** * The UUID of the request object. It is `schemaId` for `schema`, and `tableId` for `table`. * * Find the `schemaId` from either: * 1. The [schemaId](https://docs.databricks.com/api/workspace/schemas/get#schema_id) of the `Schemas` resource. * 2. In [Catalog Explorer](https://docs.databricks.com/aws/en/catalog-explorer/) > select the `schema` > go to the `Details` tab > the `Schema ID` field. * * Find the `tableId` from either: * 1. The [tableId](https://docs.databricks.com/api/workspace/tables/get#table_id) of the `Tables` resource. * 2. In [Catalog Explorer](https://docs.databricks.com/aws/en/catalog-explorer/) > select the `table` > go to the `Details` tab > the `Table ID` field */ objectId: string; /** * The type of the monitored object. Can be one of the following: `schema`or `table` */ objectType: string; /** * Unique id of the refresh operation */ refreshId: number; } /** * A collection of values returned by getDataQualityRefresh. */ export interface GetDataQualityRefreshResult { /** * (integer) - Time when the refresh ended (milliseconds since 1/1/1970 UTC) */ readonly endTimeMs: number; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * (string) - An optional message to give insight into the current state of the refresh (e.g. FAILURE messages) */ readonly message: string; /** * (string) - The UUID of the request object. It is `schemaId` for `schema`, and `tableId` for `table`. */ readonly objectId: string; /** * (string) - The type of the monitored object. Can be one of the following: `schema`or `table` */ readonly objectType: string; /** * (integer) - Unique id of the refresh operation */ readonly refreshId: number; /** * (integer) - Time when the refresh started (milliseconds since 1/1/1970 UTC) */ readonly startTimeMs: number; /** * (string) - The current state of the refresh. Possible values are: `MONITOR_REFRESH_STATE_CANCELED`, `MONITOR_REFRESH_STATE_FAILED`, `MONITOR_REFRESH_STATE_PENDING`, `MONITOR_REFRESH_STATE_RUNNING`, `MONITOR_REFRESH_STATE_SUCCESS`, `MONITOR_REFRESH_STATE_UNKNOWN` */ readonly state: string; /** * (string) - What triggered the refresh. Possible values are: `MONITOR_REFRESH_TRIGGER_DATA_CHANGE`, `MONITOR_REFRESH_TRIGGER_MANUAL`, `MONITOR_REFRESH_TRIGGER_SCHEDULE`, `MONITOR_REFRESH_TRIGGER_UNKNOWN` */ readonly trigger: string; } /** * [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types) * * This data source can be used to fetch a data quality refresh on a Unity Catalog table. * * The caller must either: * 1. be an owner of the table's parent catalog * 2. have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema. * 3. have the following permissions: * - **USE_CATALOG** on the table's parent catalog * - **USE_SCHEMA** on the table's parent schema * - **SELECT** privilege on the table. * * > **Note** This data source can only be used with a workspace-level provider! * * ## Example Usage * * Getting a data quality refresh by Unity Catalog object type (currently supports `table`) and object id: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = databricks.getTable({ * name: "my_catalog.my_schema.my_table", * }); * const thisGetDataQualityRefresh = _this.then(_this => databricks.getDataQualityRefresh({ * objectType: "table", * objectId: _this.id, * })); * ``` */ export declare function getDataQualityRefreshOutput(args: GetDataQualityRefreshOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDataQualityRefreshResult>; /** * A collection of arguments for invoking getDataQualityRefresh. */ export interface GetDataQualityRefreshOutputArgs { /** * The UUID of the request object. It is `schemaId` for `schema`, and `tableId` for `table`. * * Find the `schemaId` from either: * 1. The [schemaId](https://docs.databricks.com/api/workspace/schemas/get#schema_id) of the `Schemas` resource. * 2. In [Catalog Explorer](https://docs.databricks.com/aws/en/catalog-explorer/) > select the `schema` > go to the `Details` tab > the `Schema ID` field. * * Find the `tableId` from either: * 1. The [tableId](https://docs.databricks.com/api/workspace/tables/get#table_id) of the `Tables` resource. * 2. In [Catalog Explorer](https://docs.databricks.com/aws/en/catalog-explorer/) > select the `table` > go to the `Details` tab > the `Table ID` field */ objectId: pulumi.Input<string>; /** * The type of the monitored object. Can be one of the following: `schema`or `table` */ objectType: pulumi.Input<string>; /** * Unique id of the refresh operation */ refreshId: pulumi.Input<number>; }