Hi,
I have a column containing json objects with arbitrary schema
For example in raw data, for some rows, column X would be { a: 1, b : 4}
and for other rows column X would be like { c: 9}
If I set JSON as the type of column X, all values in column X would be like { a: 1, b:4, c: null}. Each value in column X would contain all the keys.
Is JSON the preferred data type for column X, or should we store column X as string and convert string to json within SQL? And how to convert string json to json format so I can use json_extract_scalar function?
Thanks