JSON column in Regular table (not flex)
Hi,
I guess it is reasonable to say that most of us have some kind of an ETL process from various sources streaming data into Vertica.
My current focus is on a migration of one of our source's (Postgres) events table to change data column to be of JSONB type (binary representation of JSON).
Vertica does offer a FLEX table type but using it would force me to modify the ETL process to extract data as JSON lines where all I want is to migrate events table data column in Vertica to be of JSON type or leave it as string but find another way to query this data.
Currently events.data in Vertica is a VARCHAR type column and the content is a comma seperated Hash-Rockets pairs:
"key1"=>"value1","key2"=>"value2",....,"keyN"=>"valueN"
I've read Vertica's data type documentaion, but couldn't find anything that can support JSON or even a map.
Is there anyone who have done this kind of migration?
Any idea is welcome,
Thank you,
Yarden
Comments
See the MAPJSONEXTRACTOR documentation:
https://my.vertica.com/docs/7.2.x/HTML/index.htm#Authoring/FlexTables/MAPJSONEXTRACTOR.htm?Highlight=mapjsonextractor
Specifically the coljson example where json is loaded into a map.
Hello Sharon,
Thank you for the reference.
I'll test it tomorrow and share my findings.
Yarden
Sorry the format was lost. My browser did not have font's options. Trying again, Hope this helps,
Eugenia