Hey! We're having an issue with the Incremental Ap...
# ask-ai
m
Hey! We're having an issue with the Incremental Append + Deduped sync mode and column name sanitation with version 2.0.3(Airbyte version 1.6.1 and ClickHouse version 25.6.3.116). On our MSSQL source we have column names with spaces, for example "Line No". When Airbyte does an initial load of the data into Clickhouse, the column gets renamed to "Line_No". On the second load we get a destination error "Warning from destination: Code: 497. DB:Exception username: Not enough privileges. To execute this query, it's necessary to have the grant ALTER ADD COLUMN(
Line No
)". It seems like there is a discrepancy because the connector cannot figure out that the "Line_No" and "Line No" columns are the same. Is this a schema‑diff bug in the V2 connector, or can we disable the sanitiser? Thanks!
k
Thank you for the detailed description of your issue. Based on the knowledge sources provided: - Airbyte does perform column name sanitization to ensure compatibility with SQL destinations. For example, spaces in column names like "Line No" are converted to "line_no" (lowercased and spaces replaced with underscores) when syncing to destinations such as ClickHouse. This is a standard behavior to ensure SQL-compliance and is not specific to ClickHouse alone. The sanitization process is described for other connectors (e.g., Google Sheets), but the general approach applies across Airbyte destinations: all converted column names are lowercased, spaces and special characters are replaced or removed, and only single underscores are used to separate tokens. The result is always SQL-friendly and readable. There is no mention of a global option to disable this sanitizer in the knowledge sources provided, and it is generally required for compatibility with SQL databases [Google Sheets Connector Column Name Conversion](https://docs.airbyte.com/integrations/sources/google-sheets#google-sheets-connector-column-name-conversion). - Regarding your specific error: On the second sync, Airbyte attempts to add a column with the original name ("Line No") instead of the sanitized name ("line_no" or "Line_No"), which leads to a schema diff mismatch and a ClickHouse privilege error. This suggests that the connector is not consistently mapping the sanitized column name between syncs, which could be a bug in the schema diff logic of the V2 connector. - The documentation for ClickHouse destination confirms that Airbyte creates tables and columns using unquoted identifiers when possible, falling back to quoted identifiers if special characters are present. This means that if the column name is sanitized to "line_no", it should remain consistent unless the schema diff logic is not correctly mapping the sanitized names [Naming Conventions](https://docs.airbyte.com/integrations/destinations/clickhouse-deprecated#naming-conventions). - There is no documented way to disable the column name sanitizer in Airbyte for ClickHouse or other SQL destinations. The sanitizer is necessary to ensure compatibility with SQL identifier rules. Conclusion: This appears to be a schema-diff bug in the V2 connector, where the mapping between the original and sanitized column names is not handled consistently between syncs. There is no supported way to disable the sanitizer. You may want to report this as a bug to the Airbyte team, referencing your connector and Airbyte versions, and include details about the column name transformation and the resulting error. If you need a workaround, you could try to ensure that your source column names are already SQL-compliant (no spaces or special characters), but this may not be feasible in all cases. If you need further assistance, I recommend opening an issue with the Airbyte team or joining their Slack for direct support, as requested in the [MSSQL V2 beta feedback thread](https://github.com/airbytehq/airbyte/discussions/53618).
m
@kapa.ai this seems to have been fixed with version 2.0.6
k
A message from kapa.ai
Yes, you are correct—this issue with column name discrepancies during Incremental Append + Deduped sync mode in the ClickHouse destination connector was fixed in version 2.0.6. The problem was that columns with spaces (e.g., "Line No") were being sanitized to "Line_No" on initial load, but the schema diff logic did not consistently recognize them as the same column on subsequent syncs, leading to errors like the one you described. According to the official response in the Airbyte issue tracker, this bug has been addressed as of version 2.0.6. If you upgrade your ClickHouse destination connector to 2.0.6 or later, the column name handling should be consistent, and the error should no longer occur [Column name discrepancy during Incremental Append + Deduped sync mode](https://github.com/airbytehq/airbyte/issues/63695). If you continue to experience issues after upgrading, please let the Airbyte team know.
m
@kapa.ai now i'm not getting add column errors but modify column errors for a different table
k
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain specific information about "modify column" errors in the ClickHouse destination connector after upgrading to version 2.0.6 or later. The available documentation and issue discussions address the "add column" error related to column name sanitization, which was fixed in version 2.0.6, but there is no mention of "modify column" errors or their causes. If you are encountering "modify column" errors, it may be a new or separate issue not covered in the current documentation or issue trackers provided. I recommend checking the latest [ClickHouse destination changelog](https://docs.airbyte.com/integrations/destinations/clickhouse#changelog) for recent fixes or updates, and if the problem persists, consider opening a new issue with detailed logs and context for the Airbyte team to investigate.