Oleh M
07/09/2025, 3:02 PMtype-and-dedupe step.
2025-07-08 14:51:19 destination ERROR main i.a.c.i.b.AirbyteExceptionHandler(uncaughtException):30 Something went wrong in the connector. See the logs for more details. java.lang.RuntimeException: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect datetime value: '2025-07-08T09:24:12.861+00:00'
at io.airbyte.cdk.integrations.destination.jdbc.JdbcBufferedConsumerFactory.onCloseFunction$lambda$6(JdbcBufferedConsumerFactory.kt:321) ~[airbyte-cdk-db-destinations-0.33.0.jar:?]
at io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.close(AsyncStreamConsumer.kt:175) ~[airbyte-cdk-core-0.33.0.jar:?]
at io.airbyte.cdk.integrations.base.SerializedAirbyteMessageConsumer$Companion$appendOnClose$1.close(SerializedAirbyteMessageConsumer.kt:70) ~[airbyte-cdk-core-0.33.0.jar:?]
at kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:48) ~[kotlin-stdlib-2.0.0.jar:2.0.0-release-341]
at io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:209) ~[airbyte-cdk-core-0.33.0.jar:?]
at io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:116) ~[airbyte-cdk-core-0.33.0.jar:?]
at io.airbyte.integrations.destination.mysql.MySQLDestination$Companion.main(MySQLDestination.kt:234) ~[io.airbyte.airbyte-integrations.connectors-destination-mysql.jar:?]
at io.airbyte.integrations.destination.mysql.MySQLDestination.main(MySQLDestination.kt) ~[io.airbyte.airbyte-integrations.connectors-destination-mysql.jar:?]
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect datetime value: '2025-07-08T09:24:12.861+00:00'
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) ~[HikariCP-5.1.0.jar:?]
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-5.1.0.jar:?]
at io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction$lambda$1(JdbcDatabase.kt:46) ~[airbyte-cdk-core-0.33.0.jar:?]
at io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.execute(DefaultJdbcDatabase.kt:30) ~[airbyte-cdk-core-0.33.0.jar:?]
at io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction(JdbcDatabase.kt:43) ~[airbyte-cdk-core-0.33.0.jar:?]
at io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcDestinationHandler.execute(JdbcDestinationHandler.kt:180) ~[airbyte-cdk-db-destinations-0.33.0.jar:?]
at io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction.executeTypeAndDedupe(TypeAndDedupeTransaction.kt:56) ~[airbyte-cdk-typing-deduping-0.33.0.jar:?]
at io.airbyte.integrations.base.destination.typing_deduping.DefaultTyperDeduper.typeAndDedupeTask$lambda$5(DefaultTyperDeduper.kt:343) ~[airbyte-cdk-typing-deduping-0.33.0.jar:?]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
2025-07-08 14:51:19 info failures: [ {
"failureOrigin" : "destination",
"failureType" : "system_error",
"internalMessage" : "java.lang.RuntimeException: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect datetime value: '2025-07-08T09:24:12.861+00:00'",
"externalMessage" : "Something went wrong in the connector. See the logs for more details.",
"metadata" : {
"attemptNumber" : 0,
"jobId" : 52,
"from_trace_message" : true,
"connector_command" : "write"
},
"stacktrace" : "java.lang.RuntimeException: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect datetime value: '2025-07-08T09:24:12.861+00:00'\n\tat io.airbyte.cdk.integrations.destination.jdbc.JdbcBufferedConsumerFactory.onCloseFunction$lambda$6(JdbcBufferedConsumerFactory.kt:321)\n\tat io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.close(AsyncStreamConsumer.kt:175)\n\tat io.airbyte.cdk.integrations.base.SerializedAirbyteMessageConsumer$Companion$appendOnClose$1.close(SerializedAirbyteMessageConsumer.kt:70)\n\tat kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:48)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:209)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:116)\n\tat io.airbyte.integrations.destination.mysql.MySQLDestination$Companion.main(MySQLDestination.kt:234)\n\tat io.airbyte.integrations.destination.mysql.MySQLDestination.main(MySQLDestination.kt)\nCaused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect datetime value: '2025-07-08T09:24:12.861+00:00'\n\tat com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)\n\tat com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764)\n\tat com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)\n\tat com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94)\n\tat com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)\n\tat io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction$lambda$1(JdbcDatabase.kt:46)\n\tat io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.execute(DefaultJdbcDatabase.kt:30)\n\tat io.airbyte.cdk.db.jdbc.JdbcDatabase.executeWithinTransaction(JdbcDatabase.kt:43)\n\tat io.airbyte.cdk.integrations.destination.jdbc.typing_deduping.JdbcDestinationHandler.execute(JdbcDestinationHandler.kt:180)\n\tat io.airbyte.integrations.base.destination.typing_deduping.TypeAndDedupeTransaction.executeTypeAndDedupe(TypeAndDedupeTransaction.kt:56)\n\tat io.airbyte.integrations.base.destination.typing_deduping.DefaultTyperDeduper.typeAndDedupeTask$lambda$5(DefaultTyperDeduper.kt:343)\n\tat java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n",
"timestamp" : 1751975479243
}, {
"failureOrigin" : "source",
"internalMessage" : "Source process exited with non-zero exit code 1",
"externalMessage" : "Something went wrong within the source connector",
"metadata" : {
"attemptNumber" : 0,
"jobId" : 52,
"connector_command" : "read"
},
"stacktrace" : "io.airbyte.workers.internal.exception.SourceException: Source process exited with non-zero exit code 1\n\tat io.airbyte.workers.general.BufferedReplicationWorker.readFromSource(BufferedReplicationWorker.java:365)\n\tat io.airbyte.workers.general.BufferedReplicationWorker.lambda$runAsyncWithHeartbeatCheck$3(BufferedReplicationWorker.java:223)\n\tat java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n",
"timestamp" : 1751975469508
}]
}
How to fix this error?kapa.ai
07/09/2025, 3:02 PMData truncation: Truncated incorrect datetime value: '2025-07-08T09:24:12.861+00:00' indicates that the MySQL connector (used for MariaDB) is trying to insert a datetime value in ISO 8601 format (with microseconds and timezone, e.g., 2025-07-08T092412.861+00:00) into a MariaDB column, but MariaDB does not accept this format for DATETIME fields. MariaDB expects the format to be 'YYYY-MM-DD HHMMSS[.fractional]', without the 'T' separator or timezone offset. Why does this happen? - Airbyte transforms datetime and timestamp values to ISO 8601 format with microseconds for normalization and compatibility across databases. This is standard for Airbyte, but MariaDB (and MySQL) DATETIME columns do not accept the 'T' or timezone in their native format, leading to truncation errors during the type-and-dedupe step when writing to the destination database [Source MySQL Datetime column is replicated with microseconds](https://discuss.airbyte.io/t/260). How to fix this: 1. Change the destination column type: If possible, change the destination column type from DATETIME to VARCHAR/TEXT to accept the ISO 8601 string as-is. This avoids the truncation error, but you lose native datetime operations in MariaDB. 2. Transform the datetime format: Pre-process or transform the datetime string to the MariaDB-compatible format before writing. This is not natively supported by Airbyte as of now, so you would need to use a custom normalization step or a post-processing script. 3. Custom Normalization or DBT Model: If you are using Airbyte's normalization, you may need to customize the DBT models to cast or convert the datetime string to the correct format for MariaDB. However, the knowledge sources do not provide a ready-made solution for this. 4. Use a different destination: If you require strict datetime compatibility and cannot change the column type or transform the data, consider using a destination like Postgres, which natively supports ISO 8601 datetime strings, as a workaround [Sync problem with Hubspot source](https://github.com/airbytehq/airbyte/issues/38809). Important notes: - Airbyte does not officially support MariaDB as a destination. The MySQL connector is sometimes used for MariaDB, but compatibility is fragile and prone to issues, especially with data types and normalization [Maridb connect for source and destination fails](https://discuss.airbyte.io/t/2863), [Destination MySQL: connector not working with MariaDB after bugfix](https://github.com/airbytehq/airbyte/issues/15589). - There is no built-in Airbyte setting to automatically convert ISO 8601 datetime strings to MariaDB's DATETIME format during sync. Summary: To resolve this, you must either change the destination column to a string type, preprocess the datetime values to MariaDB's expected format, or avoid using MariaDB as a destination with the MySQL connector for sources that emit ISO 8601 datetime strings. There is no out-of-the-box fix in Airbyte for this scenario. If you need further help with custom normalization or transformation, please provide more details about your setup and workflow. --- If you need more details or want to track this issue, see the related discussions and issues: - [Source MySQL Datetime column is replicated with microseconds](https://discuss.airbyte.io/t/260) - [Maridb connect for source and destination fails](https://discuss.airbyte.io/t/2863) - [Destination MySQL: connector not working with MariaDB after bugfix](https://github.com/airbytehq/airbyte/issues/15589)Oleh M
07/09/2025, 3:43 PMkapa.ai
07/09/2025, 3:43 PMkapa.ai
07/09/2025, 3:43 PM