Skip to content

[ISSUE] Tables with struct subcolumns which have dot in their name are redeployed on databricks_sql_table resource #3866

@p-venclovas

Description

@p-venclovas

Configuration

resource "databricks_sql_table" "test_view" {
  provider                = databricks.workspace
  cluster_id              = data.databricks_cluster.test_cluster.id
  catalog_name            = "test"
  schema_name             = "test"
  name                    = "table_test"
  table_type              = "EXTERNAL"
  storage_credential_name = "test"
  data_source_format = "DELTA"
  storage_location = "test"

  column {
    name     = "col1"
    type     = "struct<`x.y`:double>"
    nullable = true
   }

Expected Behavior

After initial terraform apply, resource would be deployed. Running terraform plan afterwards, no changes should be detected in the resource.

Actual Behavior

After initial terraform apply, resource was deployed. Running terraform plan afterwards, changes were detected in the struct column type.

Column type that was read and returned by the provider looks like: struct<x.y:double> (backticks removed) thus changes in the column type are detected.

Steps to Reproduce

  1. terraform apply
  2. After successfully creating resource, run terraform plan

Terraform and provider versions

Terraform v1.5.7. Databricks latest release.

Would you like to implement a fix?

Yes, I would be happy to share the fix with the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions