Do Greptimedb has Elasticsearch like "Dynamic Mapp...
# general
c
Do Greptimedb has Elasticsearch like "Dynamic Mapping" field for JSON Logs? For example: I have insert a log {"user": 123} and later i insert a {"user": "name"} it is okay? On ES, it will throw error, and we have to bump the JSON field to be "Dynamic Mapping". And both log live happily after. • It is not possible to know what type of log it can be in a mix application env before hand. • The trade off it is like the json can't be eval using "user" < 1000 after you do dynamic mapping • The JSON can't be complex in structure for actual log, and the field can be nested very deep. If you solve this, how about the query speed?
n
hi @ChengLim Teo, it depends on how you store json data in greptimedb. • if you use greptimedb pipeline to store user in a dedicated column, then you won't be able to store different type of values • if you use our current json data type, it's basically jsonb so it's possible. but there is no query acceleration. • we are working on a new json2 data type to address, it allows you to store
user
with dynamic type while maintain a columnar storage format for it
🙏 1
c
That's very good news. Hope the json2 is out soon.
👍 1