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 for describe column types #796

Merged
merged 4 commits into from
Sep 17, 2024
Merged

Fix for describe column types #796

merged 4 commits into from
Sep 17, 2024

Conversation

benc-db
Copy link
Collaborator

@benc-db benc-db commented Sep 17, 2024

Resolves #779 (for UC)

Description

DESCRIBE EXTENDED truncates column types. For generating doc site, this is ok, but for running a dbt project, it can cause issues. Where information_schema is available, we can use it to get an un-truncated column type. Initially I was going to hide this behind a behavior flag, since both methods can have performance issues; however, during implementation I discovered that behavior flags aren't available to adapters yet, due to the current dbt-core not having flags on the RuntimeConfig object. So, plan is to use information_schema where available, as it is more correct. Once behavior flags are available, we can allow users to choose, so that if one way is less performant, they can switch.

Checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

eric-wang-1990
eric-wang-1990 previously approved these changes Sep 17, 2024
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.

Databricks truncates datatypes returned via DESCRIBE EXTENDED which is used by get_columns_in_relation()
2 participants