You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"databricks_table""table" {
provider = databricks.workspace
name ="myview"
catalog_name ="team_platform"
schema_name ="test"
table_type ="VIEW"
view_definition ="create view team_platform.test.myview as select * from test.mytable"
data_source_format ="DELTA"
comment ="Managed by Terraform"column {
name ="id"
position =0
type_name ="INT"
type_text ="int"
type_json ="{\"name\":\"id\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}}"
}
}
Expected Behavior
<I tried to create a view using the documentation. It seems like there is an issue with the way we are creating views. Using the above simple TF code. I get an error trying to create a simple view.
Actual Behavior
<
When column block is missing: Terraform complains that there isn't any column block and atleast 1 is requried. As per the databricks documentation i do not see any requirement as such to specify columns when creating views.
When data_source_format is missing: I get an error "The argument "data_source_format" is required, but no definition was found". As per databricks documentation, this isn't required as well.
Steps to Reproduce
<
Create a databricks view as "select * from tablename"
@niraj8241 so there are quite a few gaps/edge cases with the tables API, hence customers should not use the API or Terraform to create/manage Unity Catalog tables & views at the moment.
To your observations:
column block is required by the API. When creating a view/table on a cluster, the cluster actually generates the relevant column block and send it to the API (hence the above statement)
data_source_format can be skipped when creating a view, but this was missing from the provider logic. We can consider fixing this, but it will be of lower priority.
Configuration
Expected Behavior
<I tried to create a view using the documentation. It seems like there is an issue with the way we are creating views. Using the above simple TF code. I get an error trying to create a simple view.
Actual Behavior
<
When column block is missing: Terraform complains that there isn't any column block and atleast 1 is requried. As per the databricks documentation i do not see any requirement as such to specify columns when creating views.
When data_source_format is missing: I get an error "The argument "data_source_format" is required, but no definition was found". As per databricks documentation, this isn't required as well.
Steps to Reproduce
<
Terraform and provider versions
<
Terraform v1.1.9
on linux_amd64
Your version of Terraform is out of date! The latest version
is 1.2.9. You can update by downloading from https://www.terraform.io/downloads.html
The text was updated successfully, but these errors were encountered: