<@U04S8PLJWMT> When syncing data from a Facebook M...
# ask-ai
o
@kapa.ai When syncing data from a Facebook Marketing or Google Ads source to MariaDB database using MySQL connector, it can't finish the sync because of an error that occurs every retry. According to logs, this happens during
type-and-dedupe
step.
Copy code
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?
k
The error you are encountering:
Copy code
Data 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)
o
@kapa.ai But MySQL connector should support MariaDB in 1.1.0 version
k
A message from kapa.ai
You are correct that, according to the [MySQL destination connector changelog](https://docs.airbyte.com/integrations/destinations/mysql#changelog), support for MariaDB was added in version 1.1.0: > 1.1.0 2025-03-25 add support for mariadb However, the knowledge sources do not provide further details about the extent or limitations of this support, nor do they confirm whether the specific datetime formatting issue you encountered has been resolved in this version. Previous issues and discussions highlight that datetime compatibility between Airbyte and MariaDB has been problematic, especially when using the MySQL connector, but there is no explicit confirmation in the sources that this is fully addressed in 1.1.0. If you are using version 1.1.0 or later and still encounter the same error, it may indicate that there are still edge cases or limitations with datetime handling for MariaDB, or that additional configuration is required. If you have not yet upgraded to 1.1.0, upgrading may resolve the issue, but this cannot be guaranteed based on the available documentation. In summary: - Official MariaDB support was added in MySQL connector 1.1.0. - The knowledge sources do not confirm whether your specific datetime issue is resolved in this version. - If the problem persists after upgrading, it may be necessary to open a new issue with Airbyte or check for further updates in the connector documentation or changelog. [MySQL destination changelog](https://docs.airbyte.com/integrations/destinations/mysql#changelog)