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

Fix sql table column type upper and lower mismatch error #3501

Conversation

case-k-git
Copy link
Contributor

@case-k-git case-k-git commented Apr 23, 2024

Changes

Terraform manage column type by lower case so if add the Upper case terraform
Terraform manages column types in lowercase, so passing them in uppercase results in a column mismatch error.Even if not changing column type

fix this error
#3490

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@case-k-git case-k-git requested review from a team as code owners April 23, 2024 14:11
@case-k-git case-k-git requested review from mgyucht and removed request for a team April 23, 2024 14:11
@tanmay-db
Copy link
Contributor

Hi @case-k-git, thanks for creating the PR, there were other issues that needed to be fixed (mapping) and I have created the PR to include this along with integration test: #3528.

Once that is merged, can you please rebase and your PR with unit test can be merged after it.

@case-k-git
Copy link
Contributor Author

Hi @tanmay-db Thank you for your comment. Sure!!

@case-k-git case-k-git force-pushed the feature/fix-sql-table-column-type-match-issue branch from c26ba60 to 9d0ef1d Compare June 3, 2024 13:38
@case-k-git
Copy link
Contributor Author

Hi @tanmay-db
Resolve the conflict. Could you please check when you have time? Thank you.

--- PASS: TestResourceSqlTableUpdateTable_ColumnsTypeUpperLowerCaseThrowsError (0.54s)
PASS
ok  	github.com/databricks/terraform-provider-databricks/catalog	(cached)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.64%. Comparing base (67ab932) to head (9d0ef1d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3501   +/-   ##
=======================================
  Coverage   81.64%   81.64%           
=======================================
  Files         193      193           
  Lines       19563    19563           
=======================================
  Hits        15973    15973           
  Misses       2637     2637           
  Partials      953      953           

@tanmay-db
Copy link
Contributor

Hi @case-k-git, thanks for the PR.

@tanmay-db tanmay-db added this pull request to the merge queue Jun 4, 2024
Merged via the queue into databricks:main with commit f5341c5 Jun 4, 2024
9 checks passed
pietern added a commit that referenced this pull request Jun 5, 2024
### New Features and Improvements

* Added `gcp_workspace_sa` computed attribute to `databricks_mws_workspaces` ([#3617](#3617)).
* Added `storage_credential_id` attribute to `databricks_storage_credential` resource ([#3636](#3636)).
* Added `full_name` attribute to `databricks_system_schema` resource ([#3634](#3634)).
* Fix SQL table column type throws error ([#3501](#3501)).
* Add `aws_unity_catalog_assume_role_policy` data source ([#3622](#3622)).
* Fix bug for job creation with `num_workers = 0` ([#3642](#3642)).

### Documentation Changes

* Document support of `requirements.txt` specification in cluster libraries ([#3637](#3637)).
* Clarify about trailing slash character in file arrival trigger URL in `databricks_job` resource ([#3635](#3635)).

Dependency updates:

 * Bump golang.org/x/mod from 0.17.0 to 0.18.0 ([#3643](#3643)).
@pietern pietern mentioned this pull request Jun 5, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jun 5, 2024
* Release v1.47.0

### New Features and Improvements

* Added `gcp_workspace_sa` computed attribute to `databricks_mws_workspaces` ([#3617](#3617)).
* Added `storage_credential_id` attribute to `databricks_storage_credential` resource ([#3636](#3636)).
* Added `full_name` attribute to `databricks_system_schema` resource ([#3634](#3634)).
* Fix SQL table column type throws error ([#3501](#3501)).
* Add `aws_unity_catalog_assume_role_policy` data source ([#3622](#3622)).
* Fix bug for job creation with `num_workers = 0` ([#3642](#3642)).

### Documentation Changes

* Document support of `requirements.txt` specification in cluster libraries ([#3637](#3637)).
* Clarify about trailing slash character in file arrival trigger URL in `databricks_job` resource ([#3635](#3635)).

Dependency updates:

 * Bump golang.org/x/mod from 0.17.0 to 0.18.0 ([#3643](#3643)).

* Update CHANGELOG.md
pietern added a commit that referenced this pull request Jun 5, 2024
* Release v1.47.0

### New Features and Improvements

* Added `gcp_workspace_sa` computed attribute to `databricks_mws_workspaces` ([#3617](#3617)).
* Added `storage_credential_id` attribute to `databricks_storage_credential` resource ([#3636](#3636)).
* Added `full_name` attribute to `databricks_system_schema` resource ([#3634](#3634)).
* Fix SQL table column type throws error ([#3501](#3501)).
* Add `aws_unity_catalog_assume_role_policy` data source ([#3622](#3622)).
* Fix bug for job creation with `num_workers = 0` ([#3642](#3642)).

### Documentation Changes

* Document support of `requirements.txt` specification in cluster libraries ([#3637](#3637)).
* Clarify about trailing slash character in file arrival trigger URL in `databricks_job` resource ([#3635](#3635)).

Dependency updates:

 * Bump golang.org/x/mod from 0.17.0 to 0.18.0 ([#3643](#3643)).

* Update CHANGELOG.md
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

Successfully merging this pull request may close these issues.

3 participants