-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
MySql Source: Fix data processing #6093
Conversation
…nd use common type mapping.
…fix-mysql # Conflicts: # airbyte-db/lib/src/main/java/io/airbyte/db/SourceOperations.java # airbyte-db/lib/src/main/java/io/airbyte/db/jdbc/JdbcSourceOperations.java
@DoNotPanicUA I won't be able to get to this for 1 or 2 days, my apologies. Will leave a review in a couple of days |
…fix-mysql # Conflicts: # docs/integrations/sources/mysql.md
3a6bc38
to
c4c4e85
Compare
…fix-mysql # Conflicts: # docs/integrations/sources/mysql.md
…avior=convertToNull"
…fix-mysql # Conflicts: # docs/integrations/sources/mysql.md
/test connector=source-mysql
|
@@ -87,8 +87,9 @@ public JsonNode toJdbcConfig(JsonNode config) { | |||
config.get("port").asText(), | |||
config.get("database").asText())); | |||
|
|||
jdbcUrl.append("?zeroDateTimeBehavior=convertToNull"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a note in the .md
docs saying that zero date time is converted to null
...tination-mysql/src/main/java/io/airbyte/integrations/destination/mysql/MySQLDestination.java
Outdated
Show resolved
Hide resolved
@@ -175,16 +176,16 @@ protected void initTests() { | |||
TestDataHolder.builder() | |||
.sourceType("float") | |||
.airbyteType(JsonSchemaPrimitive.NUMBER) | |||
.addInsertValues("null") | |||
.addNullExpectedValue() | |||
.addInsertValues("null", "10.5") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, thanks!
…a/io/airbyte/integrations/destination/mysql/MySQLDestination.java Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
/publish connector=connectors/source-mysql
|
* move logic from static JdbcUtils to JdbcSourceOperations * format * Add methods for all types in order to have possibility rewrite them and use common type mapping. * Make BigQuery in line impl with JDBC changes * fix binary type * add database creations methods with sourceOperations input * add MySqlSourceOperations * fix processing * Fix CDC processing * format * add some tests for double and float * incr version * airbytehq#3931 airbytehq#3932 added zero-date converting to null param "zeroDateTimeBehavior=convertToNull" * remove old tests covered by data type tests + incr ver * Update airbyte-integrations/connectors/destination-mysql/src/main/java/io/airbyte/integrations/destination/mysql/MySQLDestination.java Co-authored-by: Sherif A. Nada <snadalive@gmail.com> * Update docs/integrations/sources/mysql.md Co-authored-by: Sherif A. Nada <snadalive@gmail.com> * add back comments to the data type mapping * incr config version Co-authored-by: Oleksandr Sheheda <alexandrshegeda@gmail.com> Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
What
Fix MySql source fails and wrong data type handlers.
Note that some cases are still relevant as driver restriction or another issue:
How
Implement MySql specific handlers for problem data types
Recommended reading order
MySQLConverter.java
- CDCMySqlSourceOperations.java
- Commonmysql.md
- restrictionsPre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes