Repository navigation
Fix PowerBI BigQuery native query parsing for comment-like literals - #29946
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
d5b4a76 to
dd6825d
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi Mantainers, The latest commit has been pushed and the focused PowerBI tests pass locally. The current py-tests failure appears to be from the pull_request_target label gate: the workflow stops at “Verify PR labels” because the PR does not yet have the Could a maintainer please apply Thanks |
|
Thanks for the review. The code changes and tests are ready. I do not have permission to add issue #29504 to the Shipping project, so could a maintainer please add it there or apply the skip-pr-checks label if appropriate? |
|
Thanks for opening the PR. Stepping back, I don't think this is the right way to solve the problem, and I'd suggest we close it rather than keep iterating. The goal here, "strip A bespoke comment/literal scanner like this isn't something we want to take on and maintain. The edge cases here are genuinely endless. I would lean to closure of this approach than moving forward. |
Code Review ✅ Approved 1 resolved / 1 findingsReplaces regex-based SQL comment stripping with a scanner to correctly identify comments outside of quoted literals. No issues found. ✅ 1 resolved✅ Edge Case: Backslash-escaped quotes not handled in string literal scan
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Problem
#29504
PowerBI BigQuery
Value.NativeQueryparsing stripped--sequences with a regex before SQL lineage extraction. That removed valid SQL string literal content when a query contained values such as'--',"contains -- text", or escaped quotes before comment-like text.Solution
--comments only outside quoted SQL literals.--inside string literals and escaped quotes before comment-like text.Validation
python -m pytest ingestion/tests/unit/topology/dashboard/test_powerbi.py::PowerBIUnitTest::test_parse_database_source ingestion/tests/unit/topology/dashboard/test_powerbi.py::PowerBIUnitTest::test_strip_sql_line_comments_preserves_backslash_escaped_quotes -qFixes #29504
Greptile Summary
This PR fixes PowerBI BigQuery native query parsing when SQL literals contain comment-like text. The main changes are:
--comments.--text during lineage extraction.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Reviews (5): Last reviewed commit: "Handle escaped BigQuery triple quote del..." | Re-trigger Greptile
Context used (3)