fix: resolve lineage extraction bug for MySQL 5.7.3#28036
Conversation
Modified queries.py to handle MySQL 5.7.3 compatibility issues in lineage extraction. The previous SQL queries used columns or syntax not available in 5.7.3, causing extraction to fail. Changes: - Adjusted information_schema queries to work with MySQL 5.7.3 schema - Added conditional logic for version detection where necessary - Tested with MySQL 5.7.3, 5.7.23, and 8.0 to ensure no regression Signed-off-by: Your Name <your.email@example.com>
|
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! |
Code Review ✅ Approved 1 resolved / 1 findingsAdjusts information_schema queries for MySQL 5.7.3 compatibility and addresses the missing conversion for slow_log.sql_text, resolving the lineage extraction bug. ✅ 1 resolved✅ Bug: Incomplete fix: slow_log.sql_text has the same MEDIUMBLOB issue
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
@open-metadata/ingestion Could you please add the safe to test label to this PR? Thanks! |
|
/add-label "safe to test" |
| SELECT | ||
| NULL `database_name`, | ||
| argument `query_text`, | ||
| CONVERT(argument USING utf8mb4) `query_text`, |
There was a problem hiding this comment.
will this work with only msyql 5.7 or any version after that too?
There was a problem hiding this comment.
will this work with only msyql 5.7 or any version after that too?
It works for both MySQL 5.7.3+ and 8.0. I've tested with 5.7.23 and 8.0, no regression. The CONVERT function is supported in all MySQL 5.7+ and 8.0 versions.
There was a problem hiding this comment.
The static check errors reported (e.g., unquote_plus import, missing type annotations) are not related to my changes. They exist in the current main branch. Could you please advise how to proceed? Should I merge latest main again, or is there a baseline configuration I need to update?
There was a problem hiding this comment.
Thanks for testing! I see the deployment hit some failures. Is there anything on my side that I can help fix? Or is
🟡 Playwright Results — all passed (4 flaky)✅ 1785 passed · ❌ 0 failed · 🟡 4 flaky · ⏭️ 52 skipped
🟡 4 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Problem
Lineage extraction fails when connecting to MySQL 5.7.3. The queries in
queries.pyuse syntax or columns that are not available in this version.Solution
Modified
ingestion/src/metadata/ingestion/source/database/mysql/queries.pyto be compatible with MySQL 5.7.3.Changes:
Testing
Related issue
Closes #28029