1. Packages
  2. Databricks
  3. API Docs
  4. DefaultNamespaceSetting
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

databricks.DefaultNamespaceSetting

Explore with Pulumi AI

databricks logo
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

    Note This resource can only be used with a workspace-level provider!

    The databricks.DefaultNamespaceSetting resource allows you to operate the setting configuration for the default namespace in the Databricks workspace. Setting the default catalog for the workspace determines the catalog that is used when queries do not reference a fully qualified 3 level name. For example, if the default catalog is set to ‘retail_prod’ then a query ‘SELECT * FROM myTable’ would reference the object ‘retail_prod.default.myTable’ (the schema ‘default’ is always assumed). This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only applies when using Unity Catalog-enabled compute.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.DefaultNamespaceSetting("this", {namespace: {
        value: "namespace_value",
    }});
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.DefaultNamespaceSetting("this", namespace={
        "value": "namespace_value",
    })
    
    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.NewDefaultNamespaceSetting(ctx, "this", &databricks.DefaultNamespaceSettingArgs{
    			Namespace: &databricks.DefaultNamespaceSettingNamespaceArgs{
    				Value: pulumi.String("namespace_value"),
    			},
    		})
    		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 = new Databricks.DefaultNamespaceSetting("this", new()
        {
            Namespace = new Databricks.Inputs.DefaultNamespaceSettingNamespaceArgs
            {
                Value = "namespace_value",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DefaultNamespaceSetting;
    import com.pulumi.databricks.DefaultNamespaceSettingArgs;
    import com.pulumi.databricks.inputs.DefaultNamespaceSettingNamespaceArgs;
    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) {
            var this_ = new DefaultNamespaceSetting("this", DefaultNamespaceSettingArgs.builder()
                .namespace(DefaultNamespaceSettingNamespaceArgs.builder()
                    .value("namespace_value")
                    .build())
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:DefaultNamespaceSetting
        properties:
          namespace:
            value: namespace_value
    

    Create DefaultNamespaceSetting Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DefaultNamespaceSetting(name: string, args: DefaultNamespaceSettingArgs, opts?: CustomResourceOptions);
    @overload
    def DefaultNamespaceSetting(resource_name: str,
                                args: DefaultNamespaceSettingArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DefaultNamespaceSetting(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                namespace: Optional[DefaultNamespaceSettingNamespaceArgs] = None,
                                etag: Optional[str] = None,
                                setting_name: Optional[str] = None)
    func NewDefaultNamespaceSetting(ctx *Context, name string, args DefaultNamespaceSettingArgs, opts ...ResourceOption) (*DefaultNamespaceSetting, error)
    public DefaultNamespaceSetting(string name, DefaultNamespaceSettingArgs args, CustomResourceOptions? opts = null)
    public DefaultNamespaceSetting(String name, DefaultNamespaceSettingArgs args)
    public DefaultNamespaceSetting(String name, DefaultNamespaceSettingArgs args, CustomResourceOptions options)
    
    type: databricks:DefaultNamespaceSetting
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DefaultNamespaceSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DefaultNamespaceSettingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DefaultNamespaceSettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DefaultNamespaceSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DefaultNamespaceSettingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var defaultNamespaceSettingResource = new Databricks.DefaultNamespaceSetting("defaultNamespaceSettingResource", new()
    {
        Namespace = new Databricks.Inputs.DefaultNamespaceSettingNamespaceArgs
        {
            Value = "string",
        },
        Etag = "string",
        SettingName = "string",
    });
    
    example, err := databricks.NewDefaultNamespaceSetting(ctx, "defaultNamespaceSettingResource", &databricks.DefaultNamespaceSettingArgs{
    	Namespace: &databricks.DefaultNamespaceSettingNamespaceArgs{
    		Value: pulumi.String("string"),
    	},
    	Etag:        pulumi.String("string"),
    	SettingName: pulumi.String("string"),
    })
    
    var defaultNamespaceSettingResource = new DefaultNamespaceSetting("defaultNamespaceSettingResource", DefaultNamespaceSettingArgs.builder()
        .namespace(DefaultNamespaceSettingNamespaceArgs.builder()
            .value("string")
            .build())
        .etag("string")
        .settingName("string")
        .build());
    
    default_namespace_setting_resource = databricks.DefaultNamespaceSetting("defaultNamespaceSettingResource",
        namespace=databricks.DefaultNamespaceSettingNamespaceArgs(
            value="string",
        ),
        etag="string",
        setting_name="string")
    
    const defaultNamespaceSettingResource = new databricks.DefaultNamespaceSetting("defaultNamespaceSettingResource", {
        namespace: {
            value: "string",
        },
        etag: "string",
        settingName: "string",
    });
    
    type: databricks:DefaultNamespaceSetting
    properties:
        etag: string
        namespace:
            value: string
        settingName: string
    

    DefaultNamespaceSetting Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DefaultNamespaceSetting resource accepts the following input properties:

    Namespace DefaultNamespaceSettingNamespace
    The configuration details.
    Etag string
    SettingName string
    Namespace DefaultNamespaceSettingNamespaceArgs
    The configuration details.
    Etag string
    SettingName string
    namespace DefaultNamespaceSettingNamespace
    The configuration details.
    etag String
    settingName String
    namespace DefaultNamespaceSettingNamespace
    The configuration details.
    etag string
    settingName string
    namespace Property Map
    The configuration details.
    etag String
    settingName String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DefaultNamespaceSetting resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DefaultNamespaceSetting Resource

    Get an existing DefaultNamespaceSetting resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DefaultNamespaceSettingState, opts?: CustomResourceOptions): DefaultNamespaceSetting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            etag: Optional[str] = None,
            namespace: Optional[DefaultNamespaceSettingNamespaceArgs] = None,
            setting_name: Optional[str] = None) -> DefaultNamespaceSetting
    func GetDefaultNamespaceSetting(ctx *Context, name string, id IDInput, state *DefaultNamespaceSettingState, opts ...ResourceOption) (*DefaultNamespaceSetting, error)
    public static DefaultNamespaceSetting Get(string name, Input<string> id, DefaultNamespaceSettingState? state, CustomResourceOptions? opts = null)
    public static DefaultNamespaceSetting get(String name, Output<String> id, DefaultNamespaceSettingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Etag string
    Namespace DefaultNamespaceSettingNamespace
    The configuration details.
    SettingName string
    Etag string
    Namespace DefaultNamespaceSettingNamespaceArgs
    The configuration details.
    SettingName string
    etag String
    namespace DefaultNamespaceSettingNamespace
    The configuration details.
    settingName String
    etag string
    namespace DefaultNamespaceSettingNamespace
    The configuration details.
    settingName string
    etag String
    namespace Property Map
    The configuration details.
    settingName String

    Supporting Types

    DefaultNamespaceSettingNamespace, DefaultNamespaceSettingNamespaceArgs

    Value string
    The value for the setting.
    Value string
    The value for the setting.
    value String
    The value for the setting.
    value string
    The value for the setting.
    value str
    The value for the setting.
    value String
    The value for the setting.

    Import

    This resource can be imported by predefined name global:

    bash

    $ pulumi import databricks:index/defaultNamespaceSetting:DefaultNamespaceSetting this global
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.50.2 published on Tuesday, Sep 24, 2024 by Pulumi