Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants