ADO.NET Provider for Apache Kafka

Build 26.0.9770

ErrorOnCreateExisting

Specifies whether the provider throws an error when a CREATE TABLE statement targets a topic or schema subject that already exists.

Data Type

bool

Default Value

false

Remarks

When TypeDetectionScheme is set to RowScan or SchemaRegistryAggregate, this property controls whether the provider throws an error when executing a CREATE TABLE statement for a topic that already exists on the Kafka broker. When set to true, the provider throws an error indicating that the topic already exists. When set to false (the default), the TopicExistsException returned by the broker is suppressed and the statement succeeds silently.

When TypeDetectionScheme is set to SchemaRegistry, this property controls whether the provider throws an error when the schema subject already exists in the Schema Registry. The Kafka-level topic existence check is always suppressed in SchemaRegistry mode regardless of this property's value.

When set to true, executing a CREATE TABLE statement for a topic that already has a schema registered in the Schema Registry causes the provider to throw an error indicating that the table already exists. This applies regardless of whether the column definitions in the CREATE TABLE statement match the existing schema or differ from it.

When set to false, executing a CREATE TABLE statement for a topic that already has a schema registered proceeds without error. If the column definitions differ from the existing schema, the provider submits the new schema to the registry and any compatibility errors are enforced by the Schema Registry according to its configured compatibility mode. If the column definitions are identical to the existing schema, the provider submits the schema and the Schema Registry returns the existing schema ID without creating a new version.

The compatibility mode used during schema submission depends on whether the subject has a subject-level compatibility override configured in the Schema Registry. If the subject has no subject-level compatibility mode set, the provider sets it to NONE before submitting. This is a persistent change to the subject's compatibility mode and is not reverted after the statement completes. If the subject already has a subject-level compatibility mode configured by an administrator, the provider leaves that setting in place and the new schema is evaluated against it. In this case, submitting a schema that is incompatible with the existing one causes the Schema Registry to return a compatibility error.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770