I created an external table in redshift and did something like the following query Try this SELECTidentityMap,json_extract_path_text(json_serialize(identityMap)::text, 'ecid', '0', 'id') AS ecid_id1,json_extract_path_text(json_serialize(identityMap)::text, 'ecid', '1', 'id') AS ecid_id2,json_extr...