Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi
databricks.Table
Explore with Pulumi AI
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)
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=[databricks.TableColumnArgs(
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
The Table resource accepts the following input properties:
- Catalog
Name string - Columns
List<Table
Column> - Data
Source stringFormat - Schema
Name string - Table
Type string - Comment string
- Name string
- Owner string
- Properties Dictionary<string, string>
- Storage
Credential stringName - Storage
Location string - View
Definition string
- Catalog
Name string - Columns
[]Table
Column Args - Data
Source stringFormat - Schema
Name string - Table
Type string - Comment string
- Name string
- Owner string
- Properties map[string]string
- Storage
Credential stringName - Storage
Location string - View
Definition string
- catalog
Name String - columns
List<Table
Column> - data
Source StringFormat - schema
Name String - table
Type String - comment String
- name String
- owner String
- properties Map<String,String>
- storage
Credential StringName - storage
Location String - view
Definition String
- catalog
Name string - columns
Table
Column[] - data
Source stringFormat - schema
Name string - table
Type string - comment string
- name string
- owner string
- properties {[key: string]: string}
- storage
Credential stringName - storage
Location string - view
Definition string
- catalog_
name str - columns
Sequence[Table
Column Args] - data_
source_ strformat - schema_
name str - table_
type str - comment str
- name str
- owner str
- properties Mapping[str, str]
- storage_
credential_ strname - storage_
location str - view_
definition str
- catalog
Name String - columns List<Property Map>
- data
Source StringFormat - schema
Name String - table
Type String - comment String
- name String
- owner String
- properties Map<String>
- storage
Credential StringName - storage
Location String - view
Definition 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.
- Catalog
Name string - Columns
List<Table
Column> - Comment string
- Data
Source stringFormat - Name string
- Owner string
- Properties Dictionary<string, string>
- Schema
Name string - Storage
Credential stringName - Storage
Location string - Table
Type string - View
Definition string
- Catalog
Name string - Columns
[]Table
Column Args - Comment string
- Data
Source stringFormat - Name string
- Owner string
- Properties map[string]string
- Schema
Name string - Storage
Credential stringName - Storage
Location string - Table
Type string - View
Definition string
- catalog
Name String - columns
List<Table
Column> - comment String
- data
Source StringFormat - name String
- owner String
- properties Map<String,String>
- schema
Name String - storage
Credential StringName - storage
Location String - table
Type String - view
Definition String
- catalog
Name string - columns
Table
Column[] - comment string
- data
Source stringFormat - name string
- owner string
- properties {[key: string]: string}
- schema
Name string - storage
Credential stringName - storage
Location string - table
Type string - view
Definition string
- catalog_
name str - columns
Sequence[Table
Column Args] - comment str
- data_
source_ strformat - name str
- owner str
- properties Mapping[str, str]
- schema_
name str - storage_
credential_ strname - storage_
location str - table_
type str - view_
definition str
- catalog
Name String - columns List<Property Map>
- comment String
- data
Source StringFormat - name String
- owner String
- properties Map<String>
- schema
Name String - storage
Credential StringName - storage
Location String - table
Type String - view
Definition String
Supporting Types
TableColumn, TableColumnArgs
- Name string
- Position int
- Type
Name string - Type
Text string - Comment string
- Nullable bool
- Partition
Index int - Type
Interval stringType - Type
Json string - Type
Precision int - Type
Scale int
- Name string
- Position int
- Type
Name string - Type
Text string - Comment string
- Nullable bool
- Partition
Index int - Type
Interval stringType - Type
Json string - Type
Precision int - Type
Scale int
- name String
- position Integer
- type
Name String - type
Text String - comment String
- nullable Boolean
- partition
Index Integer - type
Interval StringType - type
Json String - type
Precision Integer - type
Scale Integer
- name string
- position number
- type
Name string - type
Text string - comment string
- nullable boolean
- partition
Index number - type
Interval stringType - type
Json string - type
Precision number - type
Scale number
- name str
- position int
- type_
name str - type_
text str - comment str
- nullable bool
- partition_
index int - type_
interval_ strtype - type_
json str - type_
precision int - type_
scale int
- name String
- position Number
- type
Name String - type
Text String - comment String
- nullable Boolean
- partition
Index Number - type
Interval StringType - type
Json String - type
Precision Number - type
Scale Number
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.