I process data with two maps per records, one is (“&”,”=”)-formatted (id=111&name=…), the other one is (“;”,”=”)-formatted.
Of course, I could :
- replace “;” by “&” in the data
- or define
- one of them as MAP with “COLLECTION ITEMS TERMINATED BY …” specified at declaration
- and treat the other map as STRING and parse it with str_to_map() at each query.
But isn’t there any more elegant solution like multiple collection format declaration for the same table?
Thank.
How about writing your own Writable and SerDe to create a table with 4 columns:
You could use this example as a starting point.