<@U04S8PLJWMT> is it possible to predefine an empt...
# ask-ai
m
@kapa.ai is it possible to predefine an empty clickhouse table in my destination database (airbyte clickhouse V2) without NULLABLE columns, then in the connection be able to sync with the source?
k
Short answer: not today. - In ClickHouse v2, Airbyte manages the destination schema: it creates tables per stream in the target database/namespace and maps Airbyte types to ClickHouse types. There’s no documented option to “adopt” a pre-existing table schema. The required permissions (CREATE/ALTER/DROP TABLE) also imply the connector expects to own table creation/alteration. [[ClickHouse dest](https://docs.airbyte.com/integrations/destinations/clickhouse).] - The migration guide reiterates v2 writes typed columns directly to {database}.{table}, replacing the old raw JSON approach—again, with Airbyte handling table structure. [[Clickhouse migration](https://docs.airbyte.com/integrations/destinations/clickhouse-migrations).] - Advanced knobs like choosing engine/primary key in non-dedup modes are requested but not available yet, indicating limited control over the physical schema. [[Beta discussion](https://github.com/airbytehq/airbyte/discussions/62035).] I’m sorry, but the knowledge sources do not mention any way to bind a connection to an already-created, strictly NOT NULL table. The supported path is to let the connector create/manage the tables. If this is a blocker, you might consider filing a feature request in that discussion thread. [[ClickHouse dest](https://docs.airbyte.com/integrations/destinations/clickhouse); [Beta discussion](https://github.com/airbytehq/airbyte/discussions/62035).]
A message from kapa.ai
Short answer: not currently. - In ClickHouse v2, Airbyte owns table creation and typing per stream; it writes to {database}.{table} and expects CREATE/ALTER/DROP permissions. There’s no documented option to “adopt” an existing table schema. [[ClickHouse dest](https://docs.airbyte.com/integrations/destinations/clickhouse); [Clickhouse migration](https://docs.airbyte.com/integrations/destinations/clickhouse-migrations).] - Requests for more control over physical schema (engine choice, primary keys in append mode, partitioning) are noted but not available yet. [[V2 beta thread](https://github.com/airbytehq/airbyte/discussions/62035).] So you can’t predefine a NOT NULL table and have Airbyte sync into it; you need to let the connector create/manage the table. If this is a blocker, consider adding a feature request in the V2 discussion. [[ClickHouse dest](https://docs.airbyte.com/integrations/destinations/clickhouse); [V2 beta thread](https://github.com/airbytehq/airbyte/discussions/62035).]