It's also something we're working on! Shameless plug - I happen to work at Sneller (sneller.io, open source at https://github.com/SnellerInc/sneller) that might be interesting to you.
A couple of key ideas - first, we bypass the need for any sort of 'semi-structured to relational' ETL/ELT overhead by running vectorized SQL on a (compressed) binary form of the JSON data which preserves its original structure. So we're schema-on-read first and foremost - you don't need to worry about adding new fields in the source JSON as long as your queries know of these new fields.
Second, we completely separate storage from compute. Unlike CH we don't use local disk as any sort of storage tier, and use cloud object stores as our _primary_ storage tier. So all your data (including the compressed binary version of your source JSON) lives in s3 buckets in your control.
Feel free to check us out and let us know what you think!
1. Github - https://github.com/SnellerInc/sneller
2. Intro blog - https://github.com/SnellerInc/blogs/blob/main/introducing-sn...
How would that look like? MatViews in CH are like insert triggers so does it mean that one MatView per schema?
>I see the only suboptimal part if different schemas have different types for the same field and it has to convert it to String.
Agree, this is what I was actually after and it actually happens with system data sometimes- you can have "user" field as an int and string in different schemas.
I see the only suboptimal part if different schemas have different types for the same field and it has to convert it to String.
You can create an API endpoint, and send those JSON to it. In the "destination" part, it can sync to clickhouse (one of many choices, like redshift, snowflake,besides clickhouse) very quickly, and flatten the JSON into columns. If there is new key found in JSON, it will create a new column in clickhouse.
I have not found a way/tool to replace this. Many of the tools fail at dynamic data with cardinality. Wanted to use Clickhouse like this, adding columns as they are discovered but it did not go well, but it has been a while. Also adding replicas is not as easy as Elasticsearch.
Does anyone have a similar use case implemented with Clickhouse when data is not known before hand and unfolds as time goes by?