JDBC Driver for Apache Kafka

Build 25.0.9540

HideUnusedColumns

Determines whether to hide key or value colums when the topic has no associated schema information.

Possible Values

Legacy, Never, Key, Value, KeyAndValue

データ型

string

デフォルト値

"Legacy"

解説

In some situations the 本製品 has no information on the type of data stored in the keys or values of a topic's messages. This can happen for several reasons:

This option determines whether the 本製品 exposes fallback columns for parts of the message that have no schema information. In the following descriptions, value columns include both the Message column used for single values as well as columns flattened from the value. Similarly, key columns include both the top-level key column (named by MessageKeyColumn) and columns flattened from the key. Refer to トピックからのメタデータの抽出 for more information on column flattening.

By default the 本製品 follows these legacy rules, which are compatible with versions of the 本製品 before this option was introduced:

  • For TypeDetectionScheme=RowScan and TypeDetectionScheme=None, no value columns are exposed if none of the scanned messages have values. The same applies for keys if they are enabled.
  • For TypeDetectionScheme=SchemaRegistry or TypeDetectionScheme=SchemaRegistryAggregate, the behavior depends upon AllowKeyOnlyRegistryTopics. By default key-only topics are disabled and topics without value schemas are not exposed as tables. When key-only topics are enabled, topics without value schemas expose a fallback Message column that reports base64 values. In either case, topics without key schemas do not expose key columns.

The other options provide consistent behavior regardless of the TypeDetectionScheme:

  • With HideUnusedColumns=Never, the 本製品 pushes fallback columns for topic values, and keys if enabled. The fallback value column is called Message and the fallback key columns is named by MessageKeyColumn. Both fallback columns report base64 values.
  • With HideUnusedColumns=Key, the 本製品 does not push a fallback column for keys. It still pushes a fallback column for values. If key columns are not enabled, this option has the same behavior as Never.
  • With HideUnusedColumns=Value, the 本製品 does not push a fallback column for values. It still pushes a fallback column for keys if keys are enabled.
  • With HideUnusedColumns=KeyAndMessage, the 本製品 never pushes fallback columns.

Note that there are no cases where TypeDetectionScheme=MessageOnly and schema information is missing. In MessageOnly mode, the 本製品 does not use any external information to determine the format of the topic's values. The 本製品 always returns a single Message column that is decoded according to SerializationFormat. Key columns behave the same way but using MessageKeyType.

For the same reason, the 本製品 does not consider a column unused if it uses a primitive value format. Setting SerializationFormat to Long, Integer, Float, Double, or String prevents the 本製品 from accessing the broker or schema registry to determine value schemas. The same applies for MessageKeyType and key schemas.

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