ClickHouse Dictionaries
Contents
We don't use ClickHouse dictionaries very often, and there are a few aspects to them that have caused headaches in production.
Using a ClickHouse table as a source
If you don't provide a PASSWORD when creating a dictionary, you will likely get errors like this with calling
getDictOrNull:
You could provide one in the DDL, but the problem with this is that if the password is ever rotated, you will need to re-run the migration, or you'll start getting auth errors again.
Here's an example of providing this section in the DDL:
PostHog is an all-in-one developer platform for building successful products. We provide product analytics, web analytics, session replay, error tracking, feature flags, experiments, surveys, LLM analytics, data warehouse, CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.