v.18.12New Feature

Invalidate Query Implementation for ClickHouse Source

invalidate_query (the ability to specify a query to check whether an external dictionary needs to be updated) is implemented for the clickhouse source. #3126
invalidate_query support is added for the clickhouse dictionary source, enabling automatic invalidation of external dictionaries based on custom query results.

Why it matters

This feature allows ClickHouse to automatically detect when an external dictionary needs to be refreshed by executing a specified query. It solves the problem of stale dictionary data by providing a mechanism to invalidate and update dictionaries only when necessary, improving data freshness and system efficiency.

How to use it

Users can specify an invalidate_query in the dictionary configuration for the clickhouse source. This query is executed periodically, and if its result indicates the dictionary has changed, ClickHouse will invalidate and reload the dictionary automatically.