databricks.getCatalog
Explore with Pulumi AI
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 depends_on attribute in order to prevent default auth: cannot configure default credentials errors.
Retrieves details of a specific catalog in Unity Catalog, that were created by Pulumi or manually. Use databricks.getCatalogs to retrieve IDs of multiple catalogs from Unity Catalog
Example Usage
Read on a specific catalog test
:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const test = databricks.getCatalog({
name: "test",
});
const things = new databricks.Grants("things", {
catalog: test.then(test => test.name),
grants: [{
principal: "sensitive",
privileges: ["USE_CATALOG"],
}],
});
import pulumi
import pulumi_databricks as databricks
test = databricks.get_catalog(name="test")
things = databricks.Grants("things",
catalog=test.name,
grants=[{
"principal": "sensitive",
"privileges": ["USE_CATALOG"],
}])
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := databricks.LookupCatalog(ctx, &databricks.LookupCatalogArgs{
Name: "test",
}, nil)
if err != nil {
return err
}
_, err = databricks.NewGrants(ctx, "things", &databricks.GrantsArgs{
Catalog: pulumi.String(test.Name),
Grants: databricks.GrantsGrantArray{
&databricks.GrantsGrantArgs{
Principal: pulumi.String("sensitive"),
Privileges: pulumi.StringArray{
pulumi.String("USE_CATALOG"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var test = Databricks.GetCatalog.Invoke(new()
{
Name = "test",
});
var things = new Databricks.Grants("things", new()
{
Catalog = test.Apply(getCatalogResult => getCatalogResult.Name),
GrantDetails = new[]
{
new Databricks.Inputs.GrantsGrantArgs
{
Principal = "sensitive",
Privileges = new[]
{
"USE_CATALOG",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetCatalogArgs;
import com.pulumi.databricks.Grants;
import com.pulumi.databricks.GrantsArgs;
import com.pulumi.databricks.inputs.GrantsGrantArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = DatabricksFunctions.getCatalog(GetCatalogArgs.builder()
.name("test")
.build());
var things = new Grants("things", GrantsArgs.builder()
.catalog(test.applyValue(getCatalogResult -> getCatalogResult.name()))
.grants(GrantsGrantArgs.builder()
.principal("sensitive")
.privileges("USE_CATALOG")
.build())
.build());
}
}
resources:
things:
type: databricks:Grants
properties:
catalog: ${test.name}
grants:
- principal: sensitive
privileges:
- USE_CATALOG
variables:
test:
fn::invoke:
Function: databricks:getCatalog
Arguments:
name: test
Related Resources
The following resources are used in the same context:
- databricks.Grant to manage grants within Unity Catalog.
- databricks.getCatalogs to list all catalogs within Unity Catalog metastore.
Using getCatalog
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCatalog(args: GetCatalogArgs, opts?: InvokeOptions): Promise<GetCatalogResult>
function getCatalogOutput(args: GetCatalogOutputArgs, opts?: InvokeOptions): Output<GetCatalogResult>
def get_catalog(catalog_info: Optional[GetCatalogCatalogInfo] = None,
id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCatalogResult
def get_catalog_output(catalog_info: Optional[pulumi.Input[GetCatalogCatalogInfoArgs]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCatalogResult]
func LookupCatalog(ctx *Context, args *LookupCatalogArgs, opts ...InvokeOption) (*LookupCatalogResult, error)
func LookupCatalogOutput(ctx *Context, args *LookupCatalogOutputArgs, opts ...InvokeOption) LookupCatalogResultOutput
> Note: This function is named LookupCatalog
in the Go SDK.
public static class GetCatalog
{
public static Task<GetCatalogResult> InvokeAsync(GetCatalogArgs args, InvokeOptions? opts = null)
public static Output<GetCatalogResult> Invoke(GetCatalogInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCatalogResult> getCatalog(GetCatalogArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: databricks:index/getCatalog:getCatalog
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- name of the catalog
- Catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- Id string
- same as the
name
- Name string
- name of the catalog
- Catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- Id string
- same as the
name
- name String
- name of the catalog
- catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id String
- same as the
name
- name string
- name of the catalog
- catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id string
- same as the
name
- name str
- name of the catalog
- catalog_
info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id str
- same as the
name
- name String
- name of the catalog
- catalog
Info Property Map - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id String
- same as the
name
getCatalog Result
The following output properties are available:
- Catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- Id string
- same as the
name
- Name string
- Name of the catalog
- Catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- Id string
- same as the
name
- Name string
- Name of the catalog
- catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id String
- same as the
name
- name String
- Name of the catalog
- catalog
Info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id string
- same as the
name
- name string
- Name of the catalog
- catalog_
info GetCatalog Catalog Info - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id str
- same as the
name
- name str
- Name of the catalog
- catalog
Info Property Map - the CatalogInfo object for a Unity Catalog catalog. This contains the following attributes (see ):
- id String
- same as the
name
- name String
- Name of the catalog
Supporting Types
GetCatalogCatalogInfo
- Browse
Only bool - Catalog
Type string - Type of the catalog, e.g.
MANAGED_CATALOG
,DELTASHARING_CATALOG
,SYSTEM_CATALOG
, - Comment string
- Free-form text description
- Connection
Name string - The name of the connection to an external data source.
- Created
At int - Time at which this catalog was created, in epoch milliseconds.
- Created
By string - Username of catalog creator.
- Effective
Predictive GetOptimization Flag Catalog Catalog Info Effective Predictive Optimization Flag - object describing applied predictive optimization flag.
- Enable
Predictive stringOptimization - Whether predictive optimization should be enabled for this object and objects under it.
- Full
Name string - The full name of the catalog. Corresponds with the name field.
- Isolation
Mode string - Whether the current securable is accessible from all workspaces or a specific set of workspaces.
- Metastore
Id string - Unique identifier of parent metastore.
- Name string
- name of the catalog
- Options Dictionary<string, string>
- A map of key-value properties attached to the securable.
- Owner string
- Current owner of the catalog
- Properties Dictionary<string, string>
- A map of key-value properties attached to the securable.
- Provider
Name string - The name of delta sharing provider.
- Provisioning
Info GetCatalog Catalog Info Provisioning Info - Securable
Kind string - Kind of catalog securable.
- Securable
Type string - Securable type.
- string
- The name of the share under the share provider.
- Storage
Location string - Storage Location URL (full path) for managed tables within catalog.
- Storage
Root string - Storage root URL for managed tables within catalog.
- Updated
At int - Time at which this catalog was last modified, in epoch milliseconds.
- Updated
By string - Username of user who last modified catalog.
- Browse
Only bool - Catalog
Type string - Type of the catalog, e.g.
MANAGED_CATALOG
,DELTASHARING_CATALOG
,SYSTEM_CATALOG
, - Comment string
- Free-form text description
- Connection
Name string - The name of the connection to an external data source.
- Created
At int - Time at which this catalog was created, in epoch milliseconds.
- Created
By string - Username of catalog creator.
- Effective
Predictive GetOptimization Flag Catalog Catalog Info Effective Predictive Optimization Flag - object describing applied predictive optimization flag.
- Enable
Predictive stringOptimization - Whether predictive optimization should be enabled for this object and objects under it.
- Full
Name string - The full name of the catalog. Corresponds with the name field.
- Isolation
Mode string - Whether the current securable is accessible from all workspaces or a specific set of workspaces.
- Metastore
Id string - Unique identifier of parent metastore.
- Name string
- name of the catalog
- Options map[string]string
- A map of key-value properties attached to the securable.
- Owner string
- Current owner of the catalog
- Properties map[string]string
- A map of key-value properties attached to the securable.
- Provider
Name string - The name of delta sharing provider.
- Provisioning
Info GetCatalog Catalog Info Provisioning Info - Securable
Kind string - Kind of catalog securable.
- Securable
Type string - Securable type.
- string
- The name of the share under the share provider.
- Storage
Location string - Storage Location URL (full path) for managed tables within catalog.
- Storage
Root string - Storage root URL for managed tables within catalog.
- Updated
At int - Time at which this catalog was last modified, in epoch milliseconds.
- Updated
By string - Username of user who last modified catalog.
- browse
Only Boolean - catalog
Type String - Type of the catalog, e.g.
MANAGED_CATALOG
,DELTASHARING_CATALOG
,SYSTEM_CATALOG
, - comment String
- Free-form text description
- connection
Name String - The name of the connection to an external data source.
- created
At Integer - Time at which this catalog was created, in epoch milliseconds.
- created
By String - Username of catalog creator.
- effective
Predictive GetOptimization Flag Catalog Catalog Info Effective Predictive Optimization Flag - object describing applied predictive optimization flag.
- enable
Predictive StringOptimization - Whether predictive optimization should be enabled for this object and objects under it.
- full
Name String - The full name of the catalog. Corresponds with the name field.
- isolation
Mode String - Whether the current securable is accessible from all workspaces or a specific set of workspaces.
- metastore
Id String - Unique identifier of parent metastore.
- name String
- name of the catalog
- options Map<String,String>
- A map of key-value properties attached to the securable.
- owner String
- Current owner of the catalog
- properties Map<String,String>
- A map of key-value properties attached to the securable.
- provider
Name String - The name of delta sharing provider.
- provisioning
Info GetCatalog Catalog Info Provisioning Info - securable
Kind String - Kind of catalog securable.
- securable
Type String - Securable type.
- String
- The name of the share under the share provider.
- storage
Location String - Storage Location URL (full path) for managed tables within catalog.
- storage
Root String - Storage root URL for managed tables within catalog.
- updated
At Integer - Time at which this catalog was last modified, in epoch milliseconds.
- updated
By String - Username of user who last modified catalog.
- browse
Only boolean - catalog
Type string - Type of the catalog, e.g.
MANAGED_CATALOG
,DELTASHARING_CATALOG
,SYSTEM_CATALOG
, - comment string
- Free-form text description
- connection
Name string - The name of the connection to an external data source.
- created
At number - Time at which this catalog was created, in epoch milliseconds.
- created
By string - Username of catalog creator.
- effective
Predictive GetOptimization Flag Catalog Catalog Info Effective Predictive Optimization Flag - object describing applied predictive optimization flag.
- enable
Predictive stringOptimization - Whether predictive optimization should be enabled for this object and objects under it.
- full
Name string - The full name of the catalog. Corresponds with the name field.
- isolation
Mode string - Whether the current securable is accessible from all workspaces or a specific set of workspaces.
- metastore
Id string - Unique identifier of parent metastore.
- name string
- name of the catalog
- options {[key: string]: string}
- A map of key-value properties attached to the securable.
- owner string
- Current owner of the catalog
- properties {[key: string]: string}
- A map of key-value properties attached to the securable.
- provider
Name string - The name of delta sharing provider.
- provisioning
Info GetCatalog Catalog Info Provisioning Info - securable
Kind string - Kind of catalog securable.
- securable
Type string - Securable type.
- string
- The name of the share under the share provider.
- storage
Location string - Storage Location URL (full path) for managed tables within catalog.
- storage
Root string - Storage root URL for managed tables within catalog.
- updated
At number - Time at which this catalog was last modified, in epoch milliseconds.
- updated
By string - Username of user who last modified catalog.
- browse_
only bool - catalog_
type str - Type of the catalog, e.g.
MANAGED_CATALOG
,DELTASHARING_CATALOG
,SYSTEM_CATALOG
, - comment str
- Free-form text description
- connection_
name str - The name of the connection to an external data source.
- created_
at int - Time at which this catalog was created, in epoch milliseconds.
- created_
by str - Username of catalog creator.
- effective_
predictive_ Getoptimization_ flag Catalog Catalog Info Effective Predictive Optimization Flag - object describing applied predictive optimization flag.
- enable_
predictive_ stroptimization - Whether predictive optimization should be enabled for this object and objects under it.
- full_
name str - The full name of the catalog. Corresponds with the name field.
- isolation_
mode str - Whether the current securable is accessible from all workspaces or a specific set of workspaces.
- metastore_
id str - Unique identifier of parent metastore.
- name str
- name of the catalog
- options Mapping[str, str]
- A map of key-value properties attached to the securable.
- owner str
- Current owner of the catalog
- properties Mapping[str, str]
- A map of key-value properties attached to the securable.
- provider_
name str - The name of delta sharing provider.
- provisioning_
info GetCatalog Catalog Info Provisioning Info - securable_
kind str - Kind of catalog securable.
- securable_
type str - Securable type.
- str
- The name of the share under the share provider.
- storage_
location str - Storage Location URL (full path) for managed tables within catalog.
- storage_
root str - Storage root URL for managed tables within catalog.
- updated_
at int - Time at which this catalog was last modified, in epoch milliseconds.
- updated_
by str - Username of user who last modified catalog.
- browse
Only Boolean - catalog
Type String - Type of the catalog, e.g.
MANAGED_CATALOG
,DELTASHARING_CATALOG
,SYSTEM_CATALOG
, - comment String
- Free-form text description
- connection
Name String - The name of the connection to an external data source.
- created
At Number - Time at which this catalog was created, in epoch milliseconds.
- created
By String - Username of catalog creator.
- effective
Predictive Property MapOptimization Flag - object describing applied predictive optimization flag.
- enable
Predictive StringOptimization - Whether predictive optimization should be enabled for this object and objects under it.
- full
Name String - The full name of the catalog. Corresponds with the name field.
- isolation
Mode String - Whether the current securable is accessible from all workspaces or a specific set of workspaces.
- metastore
Id String - Unique identifier of parent metastore.
- name String
- name of the catalog
- options Map<String>
- A map of key-value properties attached to the securable.
- owner String
- Current owner of the catalog
- properties Map<String>
- A map of key-value properties attached to the securable.
- provider
Name String - The name of delta sharing provider.
- provisioning
Info Property Map - securable
Kind String - Kind of catalog securable.
- securable
Type String - Securable type.
- String
- The name of the share under the share provider.
- storage
Location String - Storage Location URL (full path) for managed tables within catalog.
- storage
Root String - Storage root URL for managed tables within catalog.
- updated
At Number - Time at which this catalog was last modified, in epoch milliseconds.
- updated
By String - Username of user who last modified catalog.
GetCatalogCatalogInfoEffectivePredictiveOptimizationFlag
- Value string
- Inherited
From stringName - Inherited
From stringType
- Value string
- Inherited
From stringName - Inherited
From stringType
- value String
- inherited
From StringName - inherited
From StringType
- value string
- inherited
From stringName - inherited
From stringType
- value str
- inherited_
from_ strname - inherited_
from_ strtype
- value String
- inherited
From StringName - inherited
From StringType
GetCatalogCatalogInfoProvisioningInfo
- State string
- State string
- state String
- state string
- state str
- state String
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.