Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Issue with databricks_functions data source #4365

Open
thaiphv opened this issue Jan 1, 2025 · 0 comments
Open

[ISSUE] Issue with databricks_functions data source #4365

thaiphv opened this issue Jan 1, 2025 · 0 comments

Comments

@thaiphv
Copy link
Contributor

thaiphv commented Jan 1, 2025

Configuration

data "databricks_functions" "this" {
  catalog_name = "mycatalog"
  schema_name = "myschema"
}

Expected Behavior

It should fetch list of functions without any error

Actual Behavior

It failed with the error as follow when using 1.62.1.

Error: Value Conversion Error
with data.databricks_functions.this["edp.gold_prs_sit"],
on main.tf line 343, in data "databricks_functions" "this":
343: data "databricks_functions" "this" {
An unexpected error was encountered while verifying an attribute value
matched its expected type to prevent unexpected behavior or panics. This is
always an error in the provider. Please report the following to the provider
developer:
Expected framework type from provider logic:
types.ListType[types.ObjectType["browse_only":basetypes.BoolType,
"catalog_name":basetypes.StringType, "comment":basetypes.StringType,
"created_at":basetypes.Int64Type, "created_by":basetypes.StringType,
"data_type":basetypes.StringType, "external_language":basetypes.StringType,
"external_name":basetypes.StringType, "full_data_type":basetypes.StringType,
"full_name":basetypes.StringType, "function_id":basetypes.StringType,
"input_params":types.ListType[types.ObjectType["parameters":types.ListType[types.ObjectType["comment":basetypes.StringType,
"name":basetypes.StringType, "parameter_default":basetypes.StringType,
"parameter_mode":basetypes.StringType, "parameter_type":basetypes.StringType,
"position":basetypes.Int64Type, "type_interval_type":basetypes.StringType,
"type_json":basetypes.StringType, "type_name":basetypes.StringType,
"type_precision":basetypes.Int64Type, "type_scale":basetypes.Int64Type,
"type_text":basetypes.StringType]]]], "is_deterministic":basetypes.BoolType,
"is_null_call":basetypes.BoolType, "metastore_id":basetypes.StringType,
"name":basetypes.StringType, "owner":basetypes.StringType,
"parameter_style":basetypes.StringType, "properties":basetypes.StringType,
"return_params":types.ListType[types.ObjectType["parameters":types.ListType[types.ObjectType["comment":basetypes.StringType,
"name":basetypes.StringType, "parameter_default":basetypes.StringType,
"parameter_mode":basetypes.StringType, "parameter_type":basetypes.StringType,
"position":basetypes.Int64Type, "type_interval_type":basetypes.StringType,
"type_json":basetypes.StringType, "type_name":basetypes.StringType,
"type_precision":basetypes.Int64Type, "type_scale":basetypes.Int64Type,
"type_text":basetypes.StringType]]]], "routine_body":basetypes.StringType,
"routine_definition":basetypes.StringType,
"routine_dependencies":types.ListType[types.ObjectType["dependencies":types.ListType[types.ObjectType["function":types.ListType[types.ObjectType["function_full_name":basetypes.StringType]],
"table":types.ListType[types.ObjectType["table_full_name":basetypes.StringType]]]]]],
"schema_name":basetypes.StringType, "security_type":basetypes.StringType,
"specific_name":basetypes.StringType, "sql_data_access":basetypes.StringType,
"sql_path":basetypes.StringType, "updated_at":basetypes.Int64Type,
"updated_by":basetypes.StringType]] / underlying type:
tftypes.List[tftypes.Object["browse_only":tftypes.Bool,
"catalog_name":tftypes.String, "comment":tftypes.String,
"created_at":tftypes.Number, "created_by":tftypes.String,
"data_type":tftypes.String, "external_language":tftypes.String,
"external_name":tftypes.String, "full_data_type":tftypes.String,
"full_name":tftypes.String, "function_id":tftypes.String,
"input_params":tftypes.List[tftypes.Object["parameters":tftypes.List[tftypes.Object["comment":tftypes.String,
"name":tftypes.String, "parameter_default":tftypes.String,
"parameter_mode":tftypes.String, "parameter_type":tftypes.String,
"position":tftypes.Number, "type_interval_type":tftypes.String,
"type_json":tftypes.String, "type_name":tftypes.String,
"type_precision":tftypes.Number, "type_scale":tftypes.Number,
"type_text":tftypes.String]]]], "is_deterministic":tftypes.Bool,
"is_null_call":tftypes.Bool, "metastore_id":tftypes.String,
"name":tftypes.String, "owner":tftypes.String,
"parameter_style":tftypes.String, "properties":tftypes.String,
"return_params":tftypes.List[tftypes.Object["parameters":tftypes.List[tftypes.Object["comment":tftypes.String,
"name":tftypes.String, "parameter_default":tftypes.String,
"parameter_mode":tftypes.String, "parameter_type":tftypes.String,
"position":tftypes.Number, "type_interval_type":tftypes.String,
"type_json":tftypes.String, "type_name":tftypes.String,
"type_precision":tftypes.Number, "type_scale":tftypes.Number,
"type_text":tftypes.String]]]], "routine_body":tftypes.String,
"routine_definition":tftypes.String,
"routine_dependencies":tftypes.List[tftypes.Object["dependencies":tftypes.List[tftypes.Object["function":tftypes.List[tftypes.Object["function_full_name":tftypes.String]],
"table":tftypes.List[tftypes.Object["table_full_name":tftypes.String]]]]]],
"schema_name":tftypes.String, "security_type":tftypes.String,
"specific_name":tftypes.String, "sql_data_access":tftypes.String,
"sql_path":tftypes.String, "updated_at":tftypes.Number,
"updated_by":tftypes.String]]
Received framework type from provider logic:
types.ListType[types.ObjectType["browse_only":basetypes.BoolType,
"catalog_name":basetypes.StringType, "comment":basetypes.StringType,
"created_at":basetypes.Int64Type, "created_by":basetypes.StringType,
"data_type":basetypes.StringType, "external_language":basetypes.StringType,
"external_name":basetypes.StringType, "full_data_type":basetypes.StringType,
"full_name":basetypes.StringType, "function_id":basetypes.StringType,
"input_params":types.ObjectType["parameters":types.ListType[types.ObjectType["comment":basetypes.StringType,
"name":basetypes.StringType, "parameter_default":basetypes.StringType,
"parameter_mode":basetypes.StringType, "parameter_type":basetypes.StringType,
"position":basetypes.Int64Type, "type_interval_type":basetypes.StringType,
"type_json":basetypes.StringType, "type_name":basetypes.StringType,
"type_precision":basetypes.Int64Type, "type_scale":basetypes.Int64Type,
"type_text":basetypes.StringType]]], "is_deterministic":basetypes.BoolType,
"is_null_call":basetypes.BoolType, "metastore_id":basetypes.StringType,
"name":basetypes.StringType, "owner":basetypes.StringType,
"parameter_style":basetypes.StringType, "properties":basetypes.StringType,
"return_params":types.ObjectType["parameters":types.ListType[types.ObjectType["comment":basetypes.StringType,
"name":basetypes.StringType, "parameter_default":basetypes.StringType,
"parameter_mode":basetypes.StringType, "parameter_type":basetypes.StringType,
"position":basetypes.Int64Type, "type_interval_type":basetypes.StringType,
"type_json":basetypes.StringType, "type_name":basetypes.StringType,
"type_precision":basetypes.Int64Type, "type_scale":basetypes.Int64Type,
"type_text":basetypes.StringType]]], "routine_body":basetypes.StringType,
"routine_definition":basetypes.StringType,
"routine_dependencies":types.ObjectType["dependencies":types.ListType[types.ObjectType["function":types.ObjectType["function_full_name":basetypes.StringType],
"table":types.ObjectType["table_full_name":basetypes.StringType]]]],
"schema_name":basetypes.StringType, "security_type":basetypes.StringType,
"specific_name":basetypes.StringType, "sql_data_access":basetypes.StringType,
"sql_path":basetypes.StringType, "updated_at":basetypes.Int64Type,
"updated_by":basetypes.StringType]] / underlying type:
tftypes.List[tftypes.Object["browse_only":tftypes.Bool,
"catalog_name":tftypes.String, "comment":tftypes.String,
"created_at":tftypes.Number, "created_by":tftypes.String,
"data_type":tftypes.String, "external_language":tftypes.String,
"external_name":tftypes.String, "full_data_type":tftypes.String,
"full_name":tftypes.String, "function_id":tftypes.String,
"input_params":tftypes.Object["parameters":tftypes.List[tftypes.Object["comment":tftypes.String,
"name":tftypes.String, "parameter_default":tftypes.String,
"parameter_mode":tftypes.String, "parameter_type":tftypes.String,
"position":tftypes.Number, "type_interval_type":tftypes.String,
"type_json":tftypes.String, "type_name":tftypes.String,
"type_precision":tftypes.Number, "type_scale":tftypes.Number,
"type_text":tftypes.String]]], "is_deterministic":tftypes.Bool,
"is_null_call":tftypes.Bool, "metastore_id":tftypes.String,
"name":tftypes.String, "owner":tftypes.String,
"parameter_style":tftypes.String, "properties":tftypes.String,
"return_params":tftypes.Object["parameters":tftypes.List[tftypes.Object["comment":tftypes.String,
"name":tftypes.String, "parameter_default":tftypes.String,
"parameter_mode":tftypes.String, "parameter_type":tftypes.String,
"position":tftypes.Number, "type_interval_type":tftypes.String,
"type_json":tftypes.String, "type_name":tftypes.String,
"type_precision":tftypes.Number, "type_scale":tftypes.Number,
"type_text":tftypes.String]]], "routine_body":tftypes.String,
"routine_definition":tftypes.String,
"routine_dependencies":tftypes.Object["dependencies":tftypes.List[tftypes.Object["function":tftypes.Object["function_full_name":tftypes.String],
"table":tftypes.Object["table_full_name":tftypes.String]]]],
"schema_name":tftypes.String, "security_type":tftypes.String,
"specific_name":tftypes.String, "sql_data_access":tftypes.String,
"sql_path":tftypes.String, "updated_at":tftypes.Number,
"updated_by":tftypes.String]]

Steps to Reproduce

  1. terraform plan

Terraform and provider versions

  • Terraform: 1.6.6
  • Databricks provider: 1.62.1

Is it a regression?

It worked on 1.62.0 but not 1.62.1.

Debug Output

Important Factoids

Would you like to implement a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant