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

[Bug] Initialize sqlparse lexer prior to using sqlparse #711

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

mikealfare
Copy link
Contributor

resolves #710

Problem

We are seeing an error when running dbt docs generate on a set of sources that uses external tables. This error is similar to what we saw here: dbt-labs/dbt-core#8217.

Solution

We need to initialize Lexer in sqlparse prior to using sqlparse, as is done in this PR: dbt-labs/dbt-core#8215

Checklist

  • I have read the contributing guide and understand what's expected of me
  • 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
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Feb 6, 2024
@mikealfare mikealfare requested a review from a team as a code owner February 6, 2024 18:31
@cla-bot cla-bot bot added the cla:yes label Feb 6, 2024
@mikealfare mikealfare changed the title Bug/710 [Bug] Initialize sqlparse lexer prior to using sqlparse Feb 6, 2024
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for doing this ❤️

@mikealfare mikealfare merged commit d9274de into main Feb 6, 2024
37 checks passed
@mikealfare mikealfare deleted the bug/710 branch February 6, 2024 19:30
github-actions bot pushed a commit that referenced this pull request Feb 6, 2024
* changelog

* initialize sqlparse Lexer prior to using sqlparse

(cherry picked from commit d9274de)
github-actions bot pushed a commit that referenced this pull request Feb 6, 2024
* changelog

* initialize sqlparse Lexer prior to using sqlparse

(cherry picked from commit d9274de)
github-actions bot pushed a commit that referenced this pull request Feb 6, 2024
* changelog

* initialize sqlparse Lexer prior to using sqlparse

(cherry picked from commit d9274de)
mikealfare added a commit that referenced this pull request Feb 6, 2024
* changelog

* initialize sqlparse Lexer prior to using sqlparse

(cherry picked from commit d9274de)

Co-authored-by: Mike Alfare <[email protected]>
mikealfare added a commit that referenced this pull request Feb 6, 2024
* changelog

* initialize sqlparse Lexer prior to using sqlparse

(cherry picked from commit d9274de)

Co-authored-by: Mike Alfare <[email protected]>
mikealfare added a commit that referenced this pull request Feb 6, 2024
* changelog

* initialize sqlparse Lexer prior to using sqlparse

(cherry picked from commit d9274de)

Co-authored-by: Mike Alfare <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Runtime Error 'Lexer' object has no attribute '_SQL_REGEX'
3 participants