1. Packages
  2. Databricks
  3. API Docs
  4. getSchema
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

databricks.getSchema

Explore with Pulumi AI

databricks logo
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Retrieves details about databricks.Schema that was created by Pulumi or manually. A schema can be identified by its two-level (fully qualified) name (in the form of: catalog_name.schema_name) as input. This can be retrieved programmatically using databricks.getSchemas data source.

    Example Usage

    • Retrieve details of all schemas in in a sandbox databricks_catalog:
    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const all = databricks.getSchemas({
        catalogName: "sandbox",
    });
    const this = all.then(all => .reduce((__obj, [, ]) => ({ ...__obj, [__key]: databricks.getSchema({
        name: __value,
    }) })));
    
    import pulumi
    import pulumi_databricks as databricks
    
    all = databricks.get_schemas(catalog_name="sandbox")
    this = {__key: databricks.get_schema(name=__value) for __key, __value in all.ids}
    
    Coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Databricks.GetSchemas.Invoke(new()
        {
            CatalogName = "sandbox",
        });
    
        var @this = ;
    
    });
    
    Coming soon!
    
    Coming soon!
    
    • Search for a specific schema by its fully qualified name:
    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const this = databricks.getSchema({
        name: "catalog.schema",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_schema(name="catalog.schema")
    
    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 {
    		_, err := databricks.LookupSchema(ctx, &databricks.LookupSchemaArgs{
    			Name: "catalog.schema",
    		}, nil)
    		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 @this = Databricks.GetSchema.Invoke(new()
        {
            Name = "catalog.schema",
        });
    
    });
    
    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.GetSchemaArgs;
    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 this = DatabricksFunctions.getSchema(GetSchemaArgs.builder()
                .name("catalog.schema")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: databricks:getSchema
          Arguments:
            name: catalog.schema
    

    The following resources are used in the same context:

    • databricks.Schema to manage schemas within Unity Catalog.
    • databricks.Catalog to manage catalogs within Unity Catalog.

    Using getSchema

    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 getSchema(args: GetSchemaArgs, opts?: InvokeOptions): Promise<GetSchemaResult>
    function getSchemaOutput(args: GetSchemaOutputArgs, opts?: InvokeOptions): Output<GetSchemaResult>
    def get_schema(id: Optional[str] = None,
                   name: Optional[str] = None,
                   schema_info: Optional[GetSchemaSchemaInfo] = None,
                   opts: Optional[InvokeOptions] = None) -> GetSchemaResult
    def get_schema_output(id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   schema_info: Optional[pulumi.Input[GetSchemaSchemaInfoArgs]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetSchemaResult]
    func LookupSchema(ctx *Context, args *LookupSchemaArgs, opts ...InvokeOption) (*LookupSchemaResult, error)
    func LookupSchemaOutput(ctx *Context, args *LookupSchemaOutputArgs, opts ...InvokeOption) LookupSchemaResultOutput

    > Note: This function is named LookupSchema in the Go SDK.

    public static class GetSchema 
    {
        public static Task<GetSchemaResult> InvokeAsync(GetSchemaArgs args, InvokeOptions? opts = null)
        public static Output<GetSchemaResult> Invoke(GetSchemaInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSchemaResult> getSchema(GetSchemaArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: databricks:index/getSchema:getSchema
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    a fully qualified name of databricks_schema: catalog.schema
    Id string
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    SchemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    Name string
    a fully qualified name of databricks_schema: catalog.schema
    Id string
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    SchemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    name String
    a fully qualified name of databricks_schema: catalog.schema
    id String
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    schemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    name string
    a fully qualified name of databricks_schema: catalog.schema
    id string
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    schemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    name str
    a fully qualified name of databricks_schema: catalog.schema
    id str
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    schema_info GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    name String
    a fully qualified name of databricks_schema: catalog.schema
    id String
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    schemaInfo Property Map
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:

    getSchema Result

    The following output properties are available:

    Id string
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    Name string
    Name of schema, relative to parent catalog.
    SchemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    Id string
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    Name string
    Name of schema, relative to parent catalog.
    SchemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    id String
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    name String
    Name of schema, relative to parent catalog.
    schemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    id string
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    name string
    Name of schema, relative to parent catalog.
    schemaInfo GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    id str
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    name str
    Name of schema, relative to parent catalog.
    schema_info GetSchemaSchemaInfo
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:
    id String
    ID of this Unity Catalog Schema in form of <catalog>.<schema>.
    name String
    Name of schema, relative to parent catalog.
    schemaInfo Property Map
    SchemaInfo object for a Unity Catalog schema. This contains the following attributes:

    Supporting Types

    GetSchemaSchemaInfo

    BrowseOnly bool
    indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
    CatalogName string
    the name of the catalog where the schema is.
    CatalogType string
    the type of the parent catalog.
    Comment string
    the comment attached to the volume
    CreatedAt int
    time at which this schema was created, in epoch milliseconds.
    CreatedBy string
    username of schema creator.
    EffectivePredictiveOptimizationFlag GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag
    information about actual state of predictive optimization.
    EnablePredictiveOptimization string
    whether predictive optimization should be enabled for this object and objects under it.
    FullName string
    the two-level (fully qualified) name of the schema
    MetastoreId string
    the unique identifier of the metastore
    Name string
    a fully qualified name of databricks_schema: catalog.schema
    Owner string
    the identifier of the user who owns the schema
    Properties Dictionary<string, string>
    map of properties set on the schema
    SchemaId string
    the unique identifier of the volume
    StorageLocation string
    the storage location on the cloud.
    StorageRoot string
    storage root URL for managed tables within schema.
    UpdatedAt int
    the timestamp of the last time changes were made to the schema
    UpdatedBy string
    the identifier of the user who updated the schema last time
    BrowseOnly bool
    indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
    CatalogName string
    the name of the catalog where the schema is.
    CatalogType string
    the type of the parent catalog.
    Comment string
    the comment attached to the volume
    CreatedAt int
    time at which this schema was created, in epoch milliseconds.
    CreatedBy string
    username of schema creator.
    EffectivePredictiveOptimizationFlag GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag
    information about actual state of predictive optimization.
    EnablePredictiveOptimization string
    whether predictive optimization should be enabled for this object and objects under it.
    FullName string
    the two-level (fully qualified) name of the schema
    MetastoreId string
    the unique identifier of the metastore
    Name string
    a fully qualified name of databricks_schema: catalog.schema
    Owner string
    the identifier of the user who owns the schema
    Properties map[string]string
    map of properties set on the schema
    SchemaId string
    the unique identifier of the volume
    StorageLocation string
    the storage location on the cloud.
    StorageRoot string
    storage root URL for managed tables within schema.
    UpdatedAt int
    the timestamp of the last time changes were made to the schema
    UpdatedBy string
    the identifier of the user who updated the schema last time
    browseOnly Boolean
    indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
    catalogName String
    the name of the catalog where the schema is.
    catalogType String
    the type of the parent catalog.
    comment String
    the comment attached to the volume
    createdAt Integer
    time at which this schema was created, in epoch milliseconds.
    createdBy String
    username of schema creator.
    effectivePredictiveOptimizationFlag GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag
    information about actual state of predictive optimization.
    enablePredictiveOptimization String
    whether predictive optimization should be enabled for this object and objects under it.
    fullName String
    the two-level (fully qualified) name of the schema
    metastoreId String
    the unique identifier of the metastore
    name String
    a fully qualified name of databricks_schema: catalog.schema
    owner String
    the identifier of the user who owns the schema
    properties Map<String,String>
    map of properties set on the schema
    schemaId String
    the unique identifier of the volume
    storageLocation String
    the storage location on the cloud.
    storageRoot String
    storage root URL for managed tables within schema.
    updatedAt Integer
    the timestamp of the last time changes were made to the schema
    updatedBy String
    the identifier of the user who updated the schema last time
    browseOnly boolean
    indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
    catalogName string
    the name of the catalog where the schema is.
    catalogType string
    the type of the parent catalog.
    comment string
    the comment attached to the volume
    createdAt number
    time at which this schema was created, in epoch milliseconds.
    createdBy string
    username of schema creator.
    effectivePredictiveOptimizationFlag GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag
    information about actual state of predictive optimization.
    enablePredictiveOptimization string
    whether predictive optimization should be enabled for this object and objects under it.
    fullName string
    the two-level (fully qualified) name of the schema
    metastoreId string
    the unique identifier of the metastore
    name string
    a fully qualified name of databricks_schema: catalog.schema
    owner string
    the identifier of the user who owns the schema
    properties {[key: string]: string}
    map of properties set on the schema
    schemaId string
    the unique identifier of the volume
    storageLocation string
    the storage location on the cloud.
    storageRoot string
    storage root URL for managed tables within schema.
    updatedAt number
    the timestamp of the last time changes were made to the schema
    updatedBy string
    the identifier of the user who updated the schema last time
    browse_only bool
    indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
    catalog_name str
    the name of the catalog where the schema is.
    catalog_type str
    the type of the parent catalog.
    comment str
    the comment attached to the volume
    created_at int
    time at which this schema was created, in epoch milliseconds.
    created_by str
    username of schema creator.
    effective_predictive_optimization_flag GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag
    information about actual state of predictive optimization.
    enable_predictive_optimization str
    whether predictive optimization should be enabled for this object and objects under it.
    full_name str
    the two-level (fully qualified) name of the schema
    metastore_id str
    the unique identifier of the metastore
    name str
    a fully qualified name of databricks_schema: catalog.schema
    owner str
    the identifier of the user who owns the schema
    properties Mapping[str, str]
    map of properties set on the schema
    schema_id str
    the unique identifier of the volume
    storage_location str
    the storage location on the cloud.
    storage_root str
    storage root URL for managed tables within schema.
    updated_at int
    the timestamp of the last time changes were made to the schema
    updated_by str
    the identifier of the user who updated the schema last time
    browseOnly Boolean
    indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
    catalogName String
    the name of the catalog where the schema is.
    catalogType String
    the type of the parent catalog.
    comment String
    the comment attached to the volume
    createdAt Number
    time at which this schema was created, in epoch milliseconds.
    createdBy String
    username of schema creator.
    effectivePredictiveOptimizationFlag Property Map
    information about actual state of predictive optimization.
    enablePredictiveOptimization String
    whether predictive optimization should be enabled for this object and objects under it.
    fullName String
    the two-level (fully qualified) name of the schema
    metastoreId String
    the unique identifier of the metastore
    name String
    a fully qualified name of databricks_schema: catalog.schema
    owner String
    the identifier of the user who owns the schema
    properties Map<String>
    map of properties set on the schema
    schemaId String
    the unique identifier of the volume
    storageLocation String
    the storage location on the cloud.
    storageRoot String
    storage root URL for managed tables within schema.
    updatedAt Number
    the timestamp of the last time changes were made to the schema
    updatedBy String
    the identifier of the user who updated the schema last time

    GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi