@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
100 lines • 3.81 kB
JavaScript
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTableOutput = exports.getTable = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > **Note** This data source can only be used with a workspace-level provider!
*
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors.
*
* Retrieves details of a specific table in Unity Catalog, that were created by Pulumi or manually. Use databricks.getTables to retrieve multiple tables in Unity Catalog
*
* ## Example Usage
*
* Read on a specific table `main.certified.fct_transactions`:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const fctTransactions = databricks.getTable({
* name: "main.certified.fct_transactions",
* });
* const things = new databricks.Grants("things", {
* table: fctTransactions.then(fctTransactions => fctTransactions.name),
* grants: [{
* principal: "sensitive",
* privileges: [
* "SELECT",
* "MODIFY",
* ],
* }],
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.Grant to manage grants within Unity Catalog.
* * databricks.getTables to list all tables within a schema in Unity Catalog.
*/
function getTable(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("databricks:index/getTable:getTable", {
"id": args.id,
"name": args.name,
"tableInfo": args.tableInfo,
}, opts);
}
exports.getTable = getTable;
/**
* > **Note** This data source can only be used with a workspace-level provider!
*
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors.
*
* Retrieves details of a specific table in Unity Catalog, that were created by Pulumi or manually. Use databricks.getTables to retrieve multiple tables in Unity Catalog
*
* ## Example Usage
*
* Read on a specific table `main.certified.fct_transactions`:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const fctTransactions = databricks.getTable({
* name: "main.certified.fct_transactions",
* });
* const things = new databricks.Grants("things", {
* table: fctTransactions.then(fctTransactions => fctTransactions.name),
* grants: [{
* principal: "sensitive",
* privileges: [
* "SELECT",
* "MODIFY",
* ],
* }],
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.Grant to manage grants within Unity Catalog.
* * databricks.getTables to list all tables within a schema in Unity Catalog.
*/
function getTableOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("databricks:index/getTable:getTable", {
"id": args.id,
"name": args.name,
"tableInfo": args.tableInfo,
}, opts);
}
exports.getTableOutput = getTableOutput;
//# sourceMappingURL=getTable.js.map
;