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

databricks.Table

Explore with Pulumi AI

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

    Create Table Resource

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

    Constructor syntax

    new Table(name: string, args: TableArgs, opts?: CustomResourceOptions);
    @overload
    def Table(resource_name: str,
              args: TableArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Table(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              catalog_name: Optional[str] = None,
              columns: Optional[Sequence[TableColumnArgs]] = None,
              data_source_format: Optional[str] = None,
              schema_name: Optional[str] = None,
              table_type: Optional[str] = None,
              comment: Optional[str] = None,
              name: Optional[str] = None,
              owner: Optional[str] = None,
              properties: Optional[Mapping[str, str]] = None,
              storage_credential_name: Optional[str] = None,
              storage_location: Optional[str] = None,
              view_definition: Optional[str] = None)
    func NewTable(ctx *Context, name string, args TableArgs, opts ...ResourceOption) (*Table, error)
    public Table(string name, TableArgs args, CustomResourceOptions? opts = null)
    public Table(String name, TableArgs args)
    public Table(String name, TableArgs args, CustomResourceOptions options)
    
    type: databricks:Table
    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 TableArgs
    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 TableArgs
    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 TableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TableArgs
    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 tableResource = new Databricks.Table("tableResource", new()
    {
        CatalogName = "string",
        Columns = new[]
        {
            new Databricks.Inputs.TableColumnArgs
            {
                Name = "string",
                Position = 0,
                TypeName = "string",
                TypeText = "string",
                Comment = "string",
                Nullable = false,
                PartitionIndex = 0,
                TypeIntervalType = "string",
                TypeJson = "string",
                TypePrecision = 0,
                TypeScale = 0,
            },
        },
        DataSourceFormat = "string",
        SchemaName = "string",
        TableType = "string",
        Comment = "string",
        Name = "string",
        Owner = "string",
        Properties = 
        {
            { "string", "string" },
        },
        StorageCredentialName = "string",
        StorageLocation = "string",
        ViewDefinition = "string",
    });
    
    example, err := databricks.NewTable(ctx, "tableResource", &databricks.TableArgs{
    	CatalogName: pulumi.String("string"),
    	Columns: databricks.TableColumnArray{
    		&databricks.TableColumnArgs{
    			Name:             pulumi.String("string"),
    			Position:         pulumi.Int(0),
    			TypeName:         pulumi.String("string"),
    			TypeText:         pulumi.String("string"),
    			Comment:          pulumi.String("string"),
    			Nullable:         pulumi.Bool(false),
    			PartitionIndex:   pulumi.Int(0),
    			TypeIntervalType: pulumi.String("string"),
    			TypeJson:         pulumi.String("string"),
    			TypePrecision:    pulumi.Int(0),
    			TypeScale:        pulumi.Int(0),
    		},
    	},
    	DataSourceFormat: pulumi.String("string"),
    	SchemaName:       pulumi.String("string"),
    	TableType:        pulumi.String("string"),
    	Comment:          pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	Owner:            pulumi.String("string"),
    	Properties: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	StorageCredentialName: pulumi.String("string"),
    	StorageLocation:       pulumi.String("string"),
    	ViewDefinition:        pulumi.String("string"),
    })
    
    var tableResource = new Table("tableResource", TableArgs.builder()
        .catalogName("string")
        .columns(TableColumnArgs.builder()
            .name("string")
            .position(0)
            .typeName("string")
            .typeText("string")
            .comment("string")
            .nullable(false)
            .partitionIndex(0)
            .typeIntervalType("string")
            .typeJson("string")
            .typePrecision(0)
            .typeScale(0)
            .build())
        .dataSourceFormat("string")
        .schemaName("string")
        .tableType("string")
        .comment("string")
        .name("string")
        .owner("string")
        .properties(Map.of("string", "string"))
        .storageCredentialName("string")
        .storageLocation("string")
        .viewDefinition("string")
        .build());
    
    table_resource = databricks.Table("tableResource",
        catalog_name="string",
        columns=[{
            "name": "string",
            "position": 0,
            "type_name": "string",
            "type_text": "string",
            "comment": "string",
            "nullable": False,
            "partition_index": 0,
            "type_interval_type": "string",
            "type_json": "string",
            "type_precision": 0,
            "type_scale": 0,
        }],
        data_source_format="string",
        schema_name="string",
        table_type="string",
        comment="string",
        name="string",
        owner="string",
        properties={
            "string": "string",
        },
        storage_credential_name="string",
        storage_location="string",
        view_definition="string")
    
    const tableResource = new databricks.Table("tableResource", {
        catalogName: "string",
        columns: [{
            name: "string",
            position: 0,
            typeName: "string",
            typeText: "string",
            comment: "string",
            nullable: false,
            partitionIndex: 0,
            typeIntervalType: "string",
            typeJson: "string",
            typePrecision: 0,
            typeScale: 0,
        }],
        dataSourceFormat: "string",
        schemaName: "string",
        tableType: "string",
        comment: "string",
        name: "string",
        owner: "string",
        properties: {
            string: "string",
        },
        storageCredentialName: "string",
        storageLocation: "string",
        viewDefinition: "string",
    });
    
    type: databricks:Table
    properties:
        catalogName: string
        columns:
            - comment: string
              name: string
              nullable: false
              partitionIndex: 0
              position: 0
              typeIntervalType: string
              typeJson: string
              typeName: string
              typePrecision: 0
              typeScale: 0
              typeText: string
        comment: string
        dataSourceFormat: string
        name: string
        owner: string
        properties:
            string: string
        schemaName: string
        storageCredentialName: string
        storageLocation: string
        tableType: string
        viewDefinition: string
    

    Table Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Table resource accepts the following input properties:

    CatalogName string
    Columns List<TableColumn>
    DataSourceFormat string
    SchemaName string
    TableType string
    Comment string
    Name string
    Owner string
    Properties Dictionary<string, string>
    StorageCredentialName string
    StorageLocation string
    ViewDefinition string
    catalogName string
    columns TableColumn[]
    dataSourceFormat string
    schemaName string
    tableType string
    comment string
    name string
    owner string
    properties {[key: string]: string}
    storageCredentialName string
    storageLocation string
    viewDefinition string

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Table 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 Table Resource

    Get an existing Table 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?: TableState, opts?: CustomResourceOptions): Table
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog_name: Optional[str] = None,
            columns: Optional[Sequence[TableColumnArgs]] = None,
            comment: Optional[str] = None,
            data_source_format: Optional[str] = None,
            name: Optional[str] = None,
            owner: Optional[str] = None,
            properties: Optional[Mapping[str, str]] = None,
            schema_name: Optional[str] = None,
            storage_credential_name: Optional[str] = None,
            storage_location: Optional[str] = None,
            table_type: Optional[str] = None,
            view_definition: Optional[str] = None) -> Table
    func GetTable(ctx *Context, name string, id IDInput, state *TableState, opts ...ResourceOption) (*Table, error)
    public static Table Get(string name, Input<string> id, TableState? state, CustomResourceOptions? opts = null)
    public static Table get(String name, Output<String> id, TableState 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:
    CatalogName string
    Columns List<TableColumn>
    Comment string
    DataSourceFormat string
    Name string
    Owner string
    Properties Dictionary<string, string>
    SchemaName string
    StorageCredentialName string
    StorageLocation string
    TableType string
    ViewDefinition string
    catalogName string
    columns TableColumn[]
    comment string
    dataSourceFormat string
    name string
    owner string
    properties {[key: string]: string}
    schemaName string
    storageCredentialName string
    storageLocation string
    tableType string
    viewDefinition string

    Supporting Types

    TableColumn, TableColumnArgs

    name String
    position Integer
    typeName String
    typeText String
    comment String
    nullable Boolean
    partitionIndex Integer
    typeIntervalType String
    typeJson String
    typePrecision Integer
    typeScale Integer
    name string
    position number
    typeName string
    typeText string
    comment string
    nullable boolean
    partitionIndex number
    typeIntervalType string
    typeJson string
    typePrecision number
    typeScale number
    name String
    position Number
    typeName String
    typeText String
    comment String
    nullable Boolean
    partitionIndex Number
    typeIntervalType String
    typeJson String
    typePrecision Number
    typeScale Number

    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