I have a redshift table that has a column (SUPER data type) that contains nested json data that can have 1..n nests such as
{
key1:value1,
key2:{
keya: valuea,
keyb: {
k1a: v1a,
k2b: v2b
}
}
}
The column has a billion plus rows and many records may not have 3 or 4 level nests based on if it was populated upstream.
I would like to do something equivalent to jsonb_object_keys(jsonb field) available on postgres to list out Keys (not values) available at any level so in above block it should return:
key1 key2 keya keyb k1a k2b
I searched for an equivalent function in partiql and unable to find one. Can someone point me in the right direction?
Thanks in advance