uptrace / go-clickhouse

Golang ClickHouse client
https://clickhouse.uptrace.dev
BSD 2-Clause "Simplified" License
253 stars 27 forks source link

Support Object/JSON type? #22

Open franchb opened 2 years ago

franchb commented 2 years ago

New data type Object(), which supports storing of semi-structured data (for now JSON only). Data is written to such types as string. Then all paths are extracted according to format of semi-structured data and written as separate columns in most optimal types, that can store all their values. Those columns can be queried by names that match paths in source data. E.g data.key1.key2 or with cast operator data.key1.key2::Int64.

https://clickhouse.com/docs/en/whats-new/changelog/#experimental-feature-1

iam047801 commented 1 year ago

@vmihailenco, hey there! Will you implement it? I need it too.

vmihailenco commented 1 year ago

There are multiple issues with JSON datatype and none is working on them: https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aissue+is%3Aopen+label%3Acomp-type-object

StealthBadger747 commented 6 months ago

Looks like the JSON data type is now obsolete. See https://github.com/ClickHouse/ClickHouse/pull/59367 and https://github.com/ClickHouse/ClickHouse/issues/46190

Looks like I will have to find a new strategy for storing dynamic user defined data.

anishjain94 commented 2 months ago

@StealthBadger747 Were you able to find a new strategy for storing dynamic types or json?