Skip to content
New issue

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

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

Already on GitHub? # to your account

[PECO-921] (Reimplemented) Fix: allow DESCRIBE TABLE EXTENDED to handle more than 2048 characters #405

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

susodapop
Copy link

@susodapop susodapop commented Aug 2, 2023

Resolves #325

Description

Follow-on work after we reverted the original fix in #404.

The behaviour is now gated behind an environment variable called DBT_DESCRIBE_TABLE_2048_CHAR_BYPASS. When that environment variable is set to true then the fix is applied. Else we do not cap the joined table names length to 2048 characters. This 2048 limit only applies to Glue Catalog users and should not be applied to all dbt runs.

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.

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop susodapop temporarily deployed to azure-prod-peco August 2, 2023 22:37 — with GitHub Actions Inactive
@susodapop susodapop temporarily deployed to azure-prod-pecou August 2, 2023 22:37 — with GitHub Actions Inactive
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop susodapop temporarily deployed to azure-prod-peco August 2, 2023 22:40 — with GitHub Actions Inactive
@susodapop susodapop temporarily deployed to azure-prod-pecou August 2, 2023 22:40 — with GitHub Actions Inactive
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop susodapop temporarily deployed to azure-prod-pecou August 2, 2023 22:58 — with GitHub Actions Inactive
@susodapop susodapop temporarily deployed to azure-prod-peco August 2, 2023 22:58 — with GitHub Actions Inactive
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop susodapop temporarily deployed to azure-prod-pecou August 2, 2023 23:12 — with GitHub Actions Inactive
@susodapop susodapop temporarily deployed to azure-prod-peco August 2, 2023 23:12 — with GitHub Actions Inactive
self.assertEqual(get_identifier_list_string(table_names), "*")

def test_describe_table_extended_may_limit(self):
"""GIVEN a list of table_names whos total character length does not 2048 characters
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we tackle improving our tests, we should discuss how we want to encode this information. I tend to favor encoding in the test name in python, but mainly because I haven't come across a test framework in python that did a great job of it.

@susodapop susodapop merged commit 25b2d80 into main Aug 3, 2023
@susodapop susodapop deleted the peco-921 branch August 3, 2023 00:23
susodapop pushed a commit that referenced this pull request Aug 29, 2023
…le more than 2048 characters (#405)

---------

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@colin-rogers-dbt
Copy link
Contributor

@benc-db / @susodapop would it be possible to create a 1.5 backport patch?

@benc-db
Copy link
Collaborator

benc-db commented Sep 28, 2023

@benc-db / @susodapop would it be possible to create a 1.5 backport patch?

What is blocking you/your customer from using 1.6.x?

@benc-db
Copy link
Collaborator

benc-db commented Sep 29, 2023

@colin-rogers-dbt Included in 1.5.6

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

Successfully merging this pull request may close these issues.

dbt docs generate (>1.3) does not work with glue catalog with large number of tables in schema
3 participants