databricks.getCurrentMetastore
Explore with Pulumi AI
Retrieves information about metastore attached to a given workspace.
Note This is the workspace-level data source.
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 to prevent authentication is not configured for provider errors.
Example Usage
MetastoreSummary response for a metastore attached to the current workspace.
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const this = databricks.getCurrentMetastore({});
export const someMetastore = _this.then(_this => _this.metastoreInfo);
import pulumi
import pulumi_databricks as databricks
this = databricks.get_current_metastore()
pulumi.export("someMetastore", this.metastore_info)
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 {
this, err := databricks.GetCurrentMetastore(ctx, &databricks.GetCurrentMetastoreArgs{}, nil)
if err != nil {
return err
}
ctx.Export("someMetastore", this.MetastoreInfo)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = Databricks.GetCurrentMetastore.Invoke();
return new Dictionary<string, object?>
{
["someMetastore"] = @this.Apply(@this => @this.Apply(getCurrentMetastoreResult => getCurrentMetastoreResult.MetastoreInfo)),
};
});
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.GetCurrentMetastoreArgs;
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.getCurrentMetastore();
ctx.export("someMetastore", this_.metastoreInfo());
}
}
variables:
this:
fn::invoke:
Function: databricks:getCurrentMetastore
Arguments: {}
outputs:
someMetastore: ${this.metastoreInfo}
Related Resources
The following resources are used in the same context:
- databricks.Metastore to get information for a metastore with a given ID.
- databricks.getMetastores to get a mapping of name to id of all metastores.
- databricks.Metastore to manage Metastores within Unity Catalog.
- databricks.Catalog to manage catalogs within Unity Catalog.
Using getCurrentMetastore
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 getCurrentMetastore(args: GetCurrentMetastoreArgs, opts?: InvokeOptions): Promise<GetCurrentMetastoreResult>
function getCurrentMetastoreOutput(args: GetCurrentMetastoreOutputArgs, opts?: InvokeOptions): Output<GetCurrentMetastoreResult>
def get_current_metastore(id: Optional[str] = None,
metastore_info: Optional[GetCurrentMetastoreMetastoreInfo] = None,
opts: Optional[InvokeOptions] = None) -> GetCurrentMetastoreResult
def get_current_metastore_output(id: Optional[pulumi.Input[str]] = None,
metastore_info: Optional[pulumi.Input[GetCurrentMetastoreMetastoreInfoArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCurrentMetastoreResult]
func GetCurrentMetastore(ctx *Context, args *GetCurrentMetastoreArgs, opts ...InvokeOption) (*GetCurrentMetastoreResult, error)
func GetCurrentMetastoreOutput(ctx *Context, args *GetCurrentMetastoreOutputArgs, opts ...InvokeOption) GetCurrentMetastoreResultOutput
> Note: This function is named GetCurrentMetastore
in the Go SDK.
public static class GetCurrentMetastore
{
public static Task<GetCurrentMetastoreResult> InvokeAsync(GetCurrentMetastoreArgs args, InvokeOptions? opts = null)
public static Output<GetCurrentMetastoreResult> Invoke(GetCurrentMetastoreInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCurrentMetastoreResult> getCurrentMetastore(GetCurrentMetastoreArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: databricks:index/getCurrentMetastore:getCurrentMetastore
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - Metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- Id string
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - Metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id String
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id string
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id str
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore_
info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id String
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore
Info Property Map - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
getCurrentMetastore Result
The following output properties are available:
- Id string
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - Metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- Id string
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - Metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id String
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id string
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore
Info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id str
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore_
info GetCurrent Metastore Metastore Info - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
- id String
- metastore ID. Will be
no_metastore
if there is no metastore assigned for the current workspace - metastore
Info Property Map - summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
Supporting Types
GetCurrentMetastoreMetastoreInfo
- Cloud string
- Created
At int - Timestamp (in milliseconds) when the current metastore was created.
- Created
By string - the ID of the identity that created the current metastore.
- Default
Data stringAccess Config Id - the ID of the default data access configuration.
- Delta
Sharing stringOrganization Name - The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
- Delta
Sharing intRecipient Token Lifetime In Seconds - the expiration duration in seconds on recipient data access tokens.
- Delta
Sharing stringScope - Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
- External
Access boolEnabled - Global
Metastore stringId - Identifier in form of
<cloud>:<region>:<metastore_id>
for use in Databricks to Databricks Delta Sharing. - Metastore
Id string - Metastore ID.
- Name string
- Name of metastore.
- Owner string
- Username/group name/sp application_id of the metastore owner.
- Privilege
Model stringVersion - the version of the privilege model used by the metastore.
- Region string
- (Mandatory for account-level) The region of the metastore.
- Storage
Root string - Path on cloud storage account, where managed
databricks.Table
are stored. - Storage
Root stringCredential Id - ID of a storage credential used for the
storage_root
. - Storage
Root stringCredential Name - Name of a storage credential used for the
storage_root
. - Updated
At int - Timestamp (in milliseconds) when the current metastore was updated.
- Updated
By string - the ID of the identity that updated the current metastore.
- Cloud string
- Created
At int - Timestamp (in milliseconds) when the current metastore was created.
- Created
By string - the ID of the identity that created the current metastore.
- Default
Data stringAccess Config Id - the ID of the default data access configuration.
- Delta
Sharing stringOrganization Name - The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
- Delta
Sharing intRecipient Token Lifetime In Seconds - the expiration duration in seconds on recipient data access tokens.
- Delta
Sharing stringScope - Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
- External
Access boolEnabled - Global
Metastore stringId - Identifier in form of
<cloud>:<region>:<metastore_id>
for use in Databricks to Databricks Delta Sharing. - Metastore
Id string - Metastore ID.
- Name string
- Name of metastore.
- Owner string
- Username/group name/sp application_id of the metastore owner.
- Privilege
Model stringVersion - the version of the privilege model used by the metastore.
- Region string
- (Mandatory for account-level) The region of the metastore.
- Storage
Root string - Path on cloud storage account, where managed
databricks.Table
are stored. - Storage
Root stringCredential Id - ID of a storage credential used for the
storage_root
. - Storage
Root stringCredential Name - Name of a storage credential used for the
storage_root
. - Updated
At int - Timestamp (in milliseconds) when the current metastore was updated.
- Updated
By string - the ID of the identity that updated the current metastore.
- cloud String
- created
At Integer - Timestamp (in milliseconds) when the current metastore was created.
- created
By String - the ID of the identity that created the current metastore.
- default
Data StringAccess Config Id - the ID of the default data access configuration.
- delta
Sharing StringOrganization Name - The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
- delta
Sharing IntegerRecipient Token Lifetime In Seconds - the expiration duration in seconds on recipient data access tokens.
- delta
Sharing StringScope - Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
- external
Access BooleanEnabled - global
Metastore StringId - Identifier in form of
<cloud>:<region>:<metastore_id>
for use in Databricks to Databricks Delta Sharing. - metastore
Id String - Metastore ID.
- name String
- Name of metastore.
- owner String
- Username/group name/sp application_id of the metastore owner.
- privilege
Model StringVersion - the version of the privilege model used by the metastore.
- region String
- (Mandatory for account-level) The region of the metastore.
- storage
Root String - Path on cloud storage account, where managed
databricks.Table
are stored. - storage
Root StringCredential Id - ID of a storage credential used for the
storage_root
. - storage
Root StringCredential Name - Name of a storage credential used for the
storage_root
. - updated
At Integer - Timestamp (in milliseconds) when the current metastore was updated.
- updated
By String - the ID of the identity that updated the current metastore.
- cloud string
- created
At number - Timestamp (in milliseconds) when the current metastore was created.
- created
By string - the ID of the identity that created the current metastore.
- default
Data stringAccess Config Id - the ID of the default data access configuration.
- delta
Sharing stringOrganization Name - The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
- delta
Sharing numberRecipient Token Lifetime In Seconds - the expiration duration in seconds on recipient data access tokens.
- delta
Sharing stringScope - Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
- external
Access booleanEnabled - global
Metastore stringId - Identifier in form of
<cloud>:<region>:<metastore_id>
for use in Databricks to Databricks Delta Sharing. - metastore
Id string - Metastore ID.
- name string
- Name of metastore.
- owner string
- Username/group name/sp application_id of the metastore owner.
- privilege
Model stringVersion - the version of the privilege model used by the metastore.
- region string
- (Mandatory for account-level) The region of the metastore.
- storage
Root string - Path on cloud storage account, where managed
databricks.Table
are stored. - storage
Root stringCredential Id - ID of a storage credential used for the
storage_root
. - storage
Root stringCredential Name - Name of a storage credential used for the
storage_root
. - updated
At number - Timestamp (in milliseconds) when the current metastore was updated.
- updated
By string - the ID of the identity that updated the current metastore.
- cloud str
- created_
at int - Timestamp (in milliseconds) when the current metastore was created.
- created_
by str - the ID of the identity that created the current metastore.
- default_
data_ straccess_ config_ id - the ID of the default data access configuration.
- delta_
sharing_ strorganization_ name - The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
- delta_
sharing_ intrecipient_ token_ lifetime_ in_ seconds - the expiration duration in seconds on recipient data access tokens.
- delta_
sharing_ strscope - Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
- external_
access_ boolenabled - global_
metastore_ strid - Identifier in form of
<cloud>:<region>:<metastore_id>
for use in Databricks to Databricks Delta Sharing. - metastore_
id str - Metastore ID.
- name str
- Name of metastore.
- owner str
- Username/group name/sp application_id of the metastore owner.
- privilege_
model_ strversion - the version of the privilege model used by the metastore.
- region str
- (Mandatory for account-level) The region of the metastore.
- storage_
root str - Path on cloud storage account, where managed
databricks.Table
are stored. - storage_
root_ strcredential_ id - ID of a storage credential used for the
storage_root
. - storage_
root_ strcredential_ name - Name of a storage credential used for the
storage_root
. - updated_
at int - Timestamp (in milliseconds) when the current metastore was updated.
- updated_
by str - the ID of the identity that updated the current metastore.
- cloud String
- created
At Number - Timestamp (in milliseconds) when the current metastore was created.
- created
By String - the ID of the identity that created the current metastore.
- default
Data StringAccess Config Id - the ID of the default data access configuration.
- delta
Sharing StringOrganization Name - The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
- delta
Sharing NumberRecipient Token Lifetime In Seconds - the expiration duration in seconds on recipient data access tokens.
- delta
Sharing StringScope - Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
- external
Access BooleanEnabled - global
Metastore StringId - Identifier in form of
<cloud>:<region>:<metastore_id>
for use in Databricks to Databricks Delta Sharing. - metastore
Id String - Metastore ID.
- name String
- Name of metastore.
- owner String
- Username/group name/sp application_id of the metastore owner.
- privilege
Model StringVersion - the version of the privilege model used by the metastore.
- region String
- (Mandatory for account-level) The region of the metastore.
- storage
Root String - Path on cloud storage account, where managed
databricks.Table
are stored. - storage
Root StringCredential Id - ID of a storage credential used for the
storage_root
. - storage
Root StringCredential Name - Name of a storage credential used for the
storage_root
. - updated
At Number - Timestamp (in milliseconds) when the current metastore was updated.
- updated
By String - the ID of the identity that updated the current metastore.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.