Repository navigation
MINOR: Add pbi debug logs while query parsing source_exp #26339
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1154,10 +1154,19 @@ def _parse_bigquery_source( | |
|
|
||
| # Check if this is a direct BigQuery connection | ||
| if "GoogleBigQuery.Database" not in source_expression: | ||
| logger.debug( | ||
| "GoogleBigQuery.Database not found in source expression " | ||
| f"for datamodel: {datamodel_entity.name.root}, table: {table.name}" | ||
| ) | ||
| return None | ||
|
|
||
| # Handle Value.NativeQuery with inline SQL | ||
| if BIGQUERY_QUERY_EXPRESSION_KW in source_expression: | ||
| logger.debug( | ||
| "Parsing BigQuery NativeQuery source expression " | ||
| f"through query parser: {source_expression}\nfor " | ||
| f"datamodel: {datamodel_entity.name.root}, table: {table.name}" | ||
| ) | ||
| return self._parse_bigquery_query_source(source_expression) | ||
|
|
||
| logger.debug(f"Found GoogleBigQuery.Database in expression") | ||
|
|
@@ -1170,7 +1179,10 @@ def _parse_bigquery_source( | |
| ) | ||
|
|
||
| if not name_matches: | ||
| logger.debug("No Name patterns found in BigQuery expression") | ||
| logger.debug( | ||
| "No Name patterns found in BigQuery expression for " | ||
| f"datamodel: {datamodel_entity.name.root}, table: {table.name}" | ||
| ) | ||
| return None | ||
|
|
||
| # BigQuery structure: project -> dataset (Schema) -> table (Table/View) | ||
|
|
@@ -1192,7 +1204,8 @@ def _parse_bigquery_source( | |
| ) | ||
| if not table_name: | ||
| logger.debug( | ||
| f"Parsing BigQuery source expression for powerbi table ({table.name}):: {source_expression}" | ||
| "Table name not found in Parsing BigQuery source expression for " | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Quality: Awkward phrasing in debug log messageThe log message at line 1207 reads "Table name not found in Parsing BigQuery source expression" — the capitalized "Parsing" and overall phrasing is grammatically awkward. Consider rewording to something like "Table name not found when parsing BigQuery source expression". Suggested fix: Was this helpful? React with 👍 / 👎 | Reply |
||
| f"datamodel: {datamodel_entity.name.root}, powerbi table ({table.name}): {source_expression}" | ||
| ) | ||
| if table_name: | ||
| return [{"database": project, "schema": dataset, "table": table_name}] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.