Skip to content

MySQL Source : support different table structure during "DESCRIBE" query #24147

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

Merged
merged 6 commits into from
Mar 20, 2023

Conversation

VitaliiMaltsev
Copy link
Contributor

@VitaliiMaltsev VitaliiMaltsev commented Mar 16, 2023

What

DESCRIBE <table_name> query in MySQL can return a different table structure depending on the version of the database

In one case, this structure has the form
{"Field":"<column_name>","Type":"<datatype_in_db>","Null":"<nullability(YES, NO)>","Key":"","Extra":"<extra_params>"}
in other cases
{"COLUMN_NAME":"<column_name>","COLUMN_TYPE":"<datatype_in_db>","IS_NULLABLE":"<nullability(YES, NO)>","COLUMN_KEY":"","EXTRA":"<extra_params>"}

How

Support both of these query results

Monitor these logs for whether the sync was successful or not : https://github.com/airbytehq/oncall/issues/1654

@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Mar 16, 2023

/test connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/4438156377
✅ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/4438156377
No Python unittests run

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestConnection.test_check: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestDiscovery.test_discover: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestBasicRead.test_read: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestFullRefresh.test_sequential_reads: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
================= 19 passed, 6 skipped, 27 warnings in 18.40s ==================

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2023

Affected Connector Report

NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:

  • Run integration tests
  • Bump connector or module version
  • Add changelog
  • Publish the new version

✅ Sources (2)

Connector Version Changelog Publish
source-mysql 2.0.4
source-mysql-strict-encrypt 2.0.4 🔵
(ignored)
🔵
(ignored)
  • See "Actionable Items" below for how to resolve warnings and errors.

✅ Destinations (0)

Connector Version Changelog Publish
  • See "Actionable Items" below for how to resolve warnings and errors.

✅ Other Modules (0)

Actionable Items

(click to expand)

Category Status Actionable Item
Version
mismatch
The version of the connector is different from its normal variant. Please bump the version of the connector.

doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.
Changelog
doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.

changelog missing
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog.
Publish
not in seed
The connector is not in the seed file (e.g. source_definitions.yaml), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug.

diff seed version
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version.

@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Mar 20, 2023

/publish connector=connectors/source-mysql

🕑 Publishing the following connectors:
connectors/source-mysql
https://github.com/airbytehq/airbyte/actions/runs/4468786302


Connector Did it publish? Were definitions generated?
connectors/source-mysql

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Mar 20, 2023

/publish connector=connectors/source-mysql-strict-encrypt

🕑 Publishing the following connectors:
connectors/source-mysql-strict-encrypt
https://github.com/airbytehq/airbyte/actions/runs/4468788833


Connector Did it publish? Were definitions generated?
connectors/source-mysql-strict-encrypt

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@VitaliiMaltsev VitaliiMaltsev enabled auto-merge (squash) March 20, 2023 14:11
@VitaliiMaltsev VitaliiMaltsev merged commit e5f96a3 into master Mar 20, 2023
@VitaliiMaltsev VitaliiMaltsev deleted the mysql-describe-table-for-diff-versions branch March 20, 2023 14:28
@akashkulk
Copy link
Contributor

Looks good in general. Can you quickly mention which versions of MySQL correspond to which versions of the DESCRIBE query?

erohmensing pushed a commit that referenced this pull request Mar 22, 2023
…ery (#24147)

* MySQL Source : support different table structure during "DESCRIBE" query

* bump version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <[email protected]>
erohmensing pushed a commit that referenced this pull request Mar 22, 2023
…ery (#24147)

* MySQL Source : support different table structure during "DESCRIBE" query

* bump version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <[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.

4 participants