Stefano Messina
10/21/2025, 12:28 PM2025-10-21 12:50:27 destination ERROR pool-4-thread-1 i.a.c.i.d.FlushWorkers(lambda$flush$1):177 Flush Worker (58721) -- flush worker error: java.lang.RuntimeException: java.util.concurrent.CompletionException: com.clickhouse.client.ClickHouseException: Code: 62. DB::Exception: Syntax error: failed at position 76 (aa48dd29) (line 2, col 1): aa48dd29-7b03-4790-9f0a-bbe6354d8cc4,"{""LeadId"":""CC2EF715-5698-44A5-80A9-00000F258CE3"",""GuardianName"":""Joshua Emmanuel Senior"",""GuardianRelation"":""Fa... Expected one of: token, OpeningRoundBracket, FROM INFILE, SETTINGS, VALUES, FORMAT, SELECT, WITH. (SYNTAX_ERROR) (version 25.6.2.6261 (official build))
, server ClickHouseNode [uri=https://ex28ie978d.eu-west-1.vpce.aws.clickhouse.cloud:8443/raw, options={sslmode=NONE,socket_timeout=3000000}]
at io.airbyte.integrations.destination.clickhouse.ClickhouseSqlOperations.lambda$insertRecordsInternal$0(ClickhouseSqlOperations.java:94) ~[io.airbyte.airbyte-integrations.connectors-destination-clickhouse.jar:?]
at io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.execute(DefaultJdbcDatabase.java:47) ~[airbyte-cdk-core-0.22.1.jar:?]
at io.airbyte.integrations.destination.clickhouse.ClickhouseSqlOperations.insertRecordsInternal(ClickhouseSqlOperations.java:77) ~[io.airbyte.airbyte-integrations.connectors-destination-clickhouse.jar:?]
at io.airbyte.integrations.destination.clickhouse.ClickhouseSqlOperations.insertRecordsInternalV2(ClickhouseSqlOperations.java:115) ~[io.airbyte.airbyte-integrations.connectors-destination-clickhouse.jar:?]
at io.airbyte.cdk.integrations.destination.jdbc.JdbcSqlOperations.insertRecords(JdbcSqlOperations.java:206) ~[airbyte-cdk-db-destinations-0.22.1.jar:?]
at io.airbyte.cdk.integrations.destination.jdbc.JdbcBufferedConsumerFactory.lambda$recordWriterFunction$2(JdbcBufferedConsumerFactory.java:209) ~[airbyte-cdk-db-destinations-0.22.1.jar:?]
at io.airbyte.cdk.integrations.destination.jdbc.JdbcInsertFlushFunction.flush(JdbcInsertFlushFunction.java:25) ~[airbyte-cdk-db-destinations-0.22.1.jar:?]
at io.airbyte.cdk.integrations.destination_async.FlushWorkers.lambda$flush$1(FlushWorkers.java:169) ~[airbyte-cdk-core-0.22.1.jar:?]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
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) [?:?]kapa.ai
10/21/2025, 12:29 PMExpected one of: token, OpeningRoundBracket, FROM INFILE, SETTINGS, VALUES, FORMAT, SELECT, WITH. (SYNTAX_ERROR) indicates that the ClickHouse SQL statement generated by Airbyte is missing a required clause—most commonly, the FORMAT CSV at the end of the INSERT statement. This has been observed in several cases, especially when syncing certain table names or schemas, and is not specific to your data but rather to how the Airbyte ClickHouse destination connector constructs its queries in some scenarios. Relevant issues and findings: - Users have reported that for some table names (e.g., containing "FormatType"), the generated INSERT statement is missing the FORMAT CSV clause, leading to the exact syntax error you are seeing. This is not always consistent and may depend on the table name or schema, as some tables with similar names work while others do not. The error is reproducible across multiple Airbyte and ClickHouse connector versions. See the discussion and stack traces here: [Clickhouse destination to table named "InsightFormatType" leads to syntax error when loading CSV](https://github.com/airbytehq/airbyte/issues/64509). - The error is not limited to a specific source (MSSQL, Postgres, etc.) and has been observed in other syncs as well, always pointing to a missing or malformed SQL statement sent to ClickHouse, particularly lacking the FORMAT clause at the end of the INSERT statement [Clickhouse destination to table named "InsightFormatType" leads to syntax error when loading CSV](https://github.com/airbytehq/airbyte/issues/64509), [destinaation-clickhouse] postgres -> clickhouse "Something went wrong in the connector" Syntax Error](https://github.com/airbytehq/airbyte/issues/32338). What you can do: - If possible, try renaming the problematic table or stream to see if the issue persists. Some users have found that changing the table name can work around the bug. - Make sure you are using the latest version of the Airbyte ClickHouse destination connector, as some issues have been fixed in newer releases. - If the problem persists, you may need to open an issue with detailed logs and table schemas, or follow the existing issues for updates. Summary: This is a known bug in the Airbyte ClickHouse destination connector where, under certain conditions, the generated SQL is missing the FORMAT CSV clause, resulting in a syntax error. There is no user-side fix other than possible workarounds like renaming tables or upgrading the connector. The Airbyte team is aware of the issue and has been working on improvements in recent versions. If you need more specific troubleshooting, please provide the table schema and connector versions, or follow the linked issues for updates.Stefano Messina
10/21/2025, 1:03 PM025-10-21 14:44:31 destination ERROR main i.a.c.AirbyteConnectorRunnable(run):38 Failed connector operation initialization. io.airbyte.cdk.ConfigErrorException: Failed to initialize connector operation
at io.airbyte.cdk.AirbyteConnectorRunnable.run(AirbyteConnectorRunnable.kt:33) [bulk-cdk-core-base-0.1.44.jar:?]
at picocli.CommandLine.executeUserObject(CommandLine.java:2030) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine.access$1500(CommandLine.java:148) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2457) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2419) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine$RunLast.execute(CommandLine.java:2421) [picocli-4.7.6.jar:4.7.6]
at picocli.CommandLine.execute(CommandLine.java:2174) [picocli-4.7.6.jar:4.7.6]
at io.airbyte.cdk.AirbyteDestinationRunner$Companion.run(AirbyteConnectorRunner.kt:289) [bulk-cdk-core-base-0.1.44.jar:?]
at io.airbyte.cdk.AirbyteDestinationRunner$Companion.run$default(AirbyteConnectorRunner.kt:75) [bulk-cdk-core-base-0.1.44.jar:?]
at io.airbyte.integrations.destination.clickhouse.ClickhouseDestinationKt.main(ClickhouseDestination.kt:10) [io.airbyte.airbyte-integrations.connectors-destination-clickhouse.jar:?]
Caused by: io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [io.airbyte.cdk.load.orchestration.db.legacy_typing_deduping.TableCatalog]kapa.ai
10/21/2025, 1:03 PMkapa.ai
10/21/2025, 1:04 PMFailed connector operation initialization. io.airbyte.cdk.ConfigErrorException: Failed to initialize connector operation ... Caused by: io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [io.airbyte.cdk.load.orchestration.db.legacy_typing_deduping.TableCatalog] is a generic initialization failure in the ClickHouse destination connector, specifically related to the internal typing and deduplication logic. Based on the knowledge sources, this type of error can be triggered by configuration issues, schema mismatches, or bugs in the connector. What the knowledge sources say: - There are no explicit details in the provided sources about this exact stack trace or error message. - However, similar initialization and configuration errors have been reported when: - The connector configuration is invalid (e.g., wrong data types for fields like port, or missing required fields such as protocol) [Clickhouse connector V2 triggers 422 error when used by terraform](https://github.com/airbytehq/airbyte/issues/63353), [Could not connect with provided configuration. Error: "port" must be in range [1, 65535]](https://github.com/airbytehq/airbyte/issues/63293). - The connector is not compatible with the Airbyte version or is misconfigured. - There are schema or table issues in the destination database. Recommended actions: 1. Check your connector configuration: - Ensure all required fields are present and have the correct types (e.g., port should be an integer, not a string). - Make sure the protocol field is set correctly if required. - Remove any protocol prefix (like https://) from the host field and use the protocol field instead, as v2.x is stricter about this [Could not connect with provided configuration. Error: "port" must be in range [1, 65535]](https://github.com/airbytehq/airbyte/issues/63293). 2. Connector and Airbyte version compatibility: - Make sure you are using a supported version of the ClickHouse connector with your Airbyte deployment. - If you recently upgraded, try recreating the connector or updating to the latest available version, as some issues have been fixed in newer releases [Clickhouse connector V2 triggers 422 error when used by terraform](https://github.com/airbytehq/airbyte/issues/63353). 3. Schema/table issues: - If you recently changed the schema or deleted tables in ClickHouse, try recreating the connection or connector in Airbyte, as sometimes the connector does not automatically recreate tables after schema changes [Airbyte Not Recreating ClickHouse Table After Schema Changes](https://github.com/airbytehq/airbyte/issues/63696). If you have checked all of the above and the issue persists, the knowledge sources do not provide a more specific solution for this exact error. In that case, you may need to provide full logs and configuration details to the Airbyte team or open a new issue for further investigation. Summary: This error is most likely related to a configuration or schema issue. Double-check your connector settings and ensure compatibility with your Airbyte version. If the problem continues, further investigation with detailed logs will be necessary, as the knowledge sources do not contain a direct solution for this specific stack trace.