terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Issue with importing sql resources
I tried importing SQL resources such as databricks_sql_query, databricks_sql_widgets, and databricks_sql_visualizations for an existing dashboard using the experimental exporter as below. Some queries and their respective visualizations weren't exported.
Configuration
export DATABRICKS_HOST=https://xxx.cloud.databricks.com/
export DATABRICKS_TOKEN=xxxxxx
./.terraform/providers/registry.terraform.io/databricks/databricks/1.1.0/darwin_amd64/terraform-provider-databricks_v1.1.0 exporter \
-skip-interactive \
-services=sql \
-listing=sql
[WARN] Error finding SQL Endpoint for data source a75be8b7-a45b-4db7-b041-cfffa9a48991
[INFO] Imported 1 of 4 SQL dashboards
[INFO] Imported 2 of 4 SQL dashboards
[INFO] Imported 3 of 4 SQL dashboards
[INFO] Imported 4 of 4 SQL dashboards
[WARN] Error finding visualization for ID 4a80036b-de57-492c-8af8-004e2ef8a245
[WARN] Error finding visualization for ID c06fca08-85d2-4db3-b179-007b04c2b048
[WARN] Error finding visualization for ID cf0b4194-80a2-4a5e-9077-b9c40dbede02
[WARN] Error finding visualization for ID 61957686-518a-4412-bb81-5a9ea8f120a1
[WARN] Error finding visualization for ID 9aa8da6f-d457-43e0-86b1-669a7deebb51
[WARN] Error finding visualization for ID a68471f1-8ace-4fc9-be12-2abfe892f1a9
[WARN] Error finding visualization for ID fdc9f7ad-4a35-49ba-9468-246bcdd82aaf
Expected Behavior
All SQL queries and their respective visualizations should have been exported.
Actual Behavior
Some SQL queries and their respective visualizations should have been exported.
Terraform and provider versions
Databricks TF provider: 1.1.0 Terraform version: v1.0.0
Important Factoids
- Export is run under the same user that created the respective SQL resources.
- One of the missing SQL visualizations could be found in the
[WARN] Error finding visualization for IDbut even with the-debugparam, the exporter doesn't provide much info about why the visualization couldn't be exported. - When querying the respective SQL query via postman(via
/api/2.0/preview/sql/queries/f337304b-3c76-4519-a00a-50efd7995a7f), I don't see any errors.
Are there any known limitations with visualizations/query exports?
Thank you for the feature request! Currently, the team operates in a limited capacity, carefully prioritizing, and we cannot provide a timeline to implement this feature. Please make a Pull Request if you'd like to see this feature sooner, and we'll guide you through the journey.
@vadivelselvaraj check the latest source code after #1788 was merged