databricks.getSchema
Explore with Pulumi AI
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
Related Resources
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>
. - Schema
Info GetSchema Schema Info 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>
. - Schema
Info GetSchema Schema Info 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>
. - schema
Info GetSchema Schema Info 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>
. - schema
Info GetSchema Schema Info 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 GetSchema Schema Info 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>
. - schema
Info 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.
- Schema
Info GetSchema Schema Info 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.
- Schema
Info GetSchema Schema Info 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.
- schema
Info GetSchema Schema Info 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.
- schema
Info GetSchema Schema Info 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 GetSchema Schema Info 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.
- schema
Info Property Map SchemaInfo
object for a Unity Catalog schema. This contains the following attributes:
Supporting Types
GetSchemaSchemaInfo
- Browse
Only bool - indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
- Catalog
Name string - the name of the catalog where the schema is.
- Catalog
Type string - the type of the parent catalog.
- Comment string
- the comment attached to the volume
- Created
At int - time at which this schema was created, in epoch milliseconds.
- Created
By string - username of schema creator.
- Effective
Predictive GetOptimization Flag Schema Schema Info Effective Predictive Optimization Flag - information about actual state of predictive optimization.
- Enable
Predictive stringOptimization - whether predictive optimization should be enabled for this object and objects under it.
- Full
Name string - the two-level (fully qualified) name of the schema
- Metastore
Id 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
- Schema
Id string - the unique identifier of the volume
- Storage
Location string - the storage location on the cloud.
- Storage
Root string - 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 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 string - the name of the catalog where the schema is.
- Catalog
Type string - the type of the parent catalog.
- Comment string
- the comment attached to the volume
- Created
At int - time at which this schema was created, in epoch milliseconds.
- Created
By string - username of schema creator.
- Effective
Predictive GetOptimization Flag Schema Schema Info Effective Predictive Optimization Flag - information about actual state of predictive optimization.
- Enable
Predictive stringOptimization - whether predictive optimization should be enabled for this object and objects under it.
- Full
Name string - the two-level (fully qualified) name of the schema
- Metastore
Id 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
- Schema
Id string - the unique identifier of the volume
- Storage
Location string - the storage location on the cloud.
- Storage
Root string - 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 string - the identifier of the user who updated the schema last time
- browse
Only Boolean - indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
- catalog
Name String - the name of the catalog where the schema is.
- catalog
Type String - the type of the parent catalog.
- comment String
- the comment attached to the volume
- created
At Integer - time at which this schema was created, in epoch milliseconds.
- created
By String - username of schema creator.
- effective
Predictive GetOptimization Flag Schema Schema Info Effective Predictive Optimization Flag - information about actual state of predictive optimization.
- enable
Predictive StringOptimization - whether predictive optimization should be enabled for this object and objects under it.
- full
Name String - the two-level (fully qualified) name of the schema
- metastore
Id 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
- schema
Id String - the unique identifier of the volume
- storage
Location String - the storage location on the cloud.
- storage
Root String - storage root URL for managed tables within schema.
- updated
At Integer - the timestamp of the last time changes were made to the schema
- updated
By String - the identifier of the user who updated the schema last time
- browse
Only boolean - indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
- catalog
Name string - the name of the catalog where the schema is.
- catalog
Type string - the type of the parent catalog.
- comment string
- the comment attached to the volume
- created
At number - time at which this schema was created, in epoch milliseconds.
- created
By string - username of schema creator.
- effective
Predictive GetOptimization Flag Schema Schema Info Effective Predictive Optimization Flag - information about actual state of predictive optimization.
- enable
Predictive stringOptimization - whether predictive optimization should be enabled for this object and objects under it.
- full
Name string - the two-level (fully qualified) name of the schema
- metastore
Id 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
- schema
Id string - the unique identifier of the volume
- storage
Location string - the storage location on the cloud.
- storage
Root string - storage root URL for managed tables within schema.
- updated
At number - the timestamp of the last time changes were made to the schema
- updated
By 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_ Getoptimization_ flag Schema Schema Info Effective Predictive Optimization Flag - information about actual state of predictive optimization.
- enable_
predictive_ stroptimization - 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
- browse
Only Boolean - indicates whether the principal is limited to retrieving metadata for the schema through the BROWSE privilege.
- catalog
Name String - the name of the catalog where the schema is.
- catalog
Type String - the type of the parent catalog.
- comment String
- the comment attached to the volume
- created
At Number - time at which this schema was created, in epoch milliseconds.
- created
By String - username of schema creator.
- effective
Predictive Property MapOptimization Flag - information about actual state of predictive optimization.
- enable
Predictive StringOptimization - whether predictive optimization should be enabled for this object and objects under it.
- full
Name String - the two-level (fully qualified) name of the schema
- metastore
Id 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
- schema
Id String - the unique identifier of the volume
- storage
Location String - the storage location on the cloud.
- storage
Root String - storage root URL for managed tables within schema.
- updated
At Number - the timestamp of the last time changes were made to the schema
- updated
By String - the identifier of the user who updated the schema last time
GetSchemaSchemaInfoEffectivePredictiveOptimizationFlag
- 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
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.