These settings are autogenerated from source.
This parameter is useful when you are using formats that require a schema definition, such as Cap’n Proto or Protobuf. The value depends on the format.
Define the name of the required message in the schema defined in format_schema.
To maintain compatibility with the legacy format_schema format (file_name:message_name):
- If
format_schema_message_name is not specified, the message name is inferred from the message_name part of the legacy format_schema value.
- If
format_schema_message_name is specified while using the legacy format, an error will be raised.
Define the source of format_schema.
Possible values:
- ‘file’ (default): The
format_schema is the name of a schema file located in the format_schemas directory.
- ‘string’: The
format_schema is the literal content of the schema.
- ‘query’: The
format_schema is a query to retrieve the schema.
When format_schema_source is set to ‘query’, the following conditions apply:
- The query must return exactly one value: a single row with a single string column.
- The result of the query is treated as the schema content.
- This result is cached locally in the
format_schemas directory.
- You can clear the local cache using the command:
SYSTEM DROP FORMAT SCHEMA CACHE FOR Files.
- Once cached, identical queries from the same user are not executed to fetch the schema again until the cache is explicitly cleared
- In addition to local cache files, Protobuf messages are also cached in memory. Even after clearing the local cache files, the in-memory cache must be cleared using
SYSTEM DROP FORMAT SCHEMA CACHE [FOR Protobuf] to fully refresh the schema.
- Run the query
SYSTEM DROP FORMAT SCHEMA CACHE to clear the cache for both cache files and Protobuf messages schemas at once.
- The query is executed on behalf of the user running it, so it is subject to that user’s access rights, and its cached result is reused only for the same user. It cannot be executed where there is no user: in a background task, such as a streaming engine consumer, or when
INSERT data is parsed on the client side. Use format_schema_source set to file or string there.
Last modified on September 4, 2026