ion-hive-serde icon indicating copy to clipboard operation
ion-hive-serde copied to clipboard

Multi Value Extraction

Open cheqianh opened this issue 3 years ago • 0 comments

The Ion path extraction APIs currently return all values that match a certain extractor, but the serde currently only chooses one.

# ion file
{ id:"user1", other_ids: [{ id: "user1234" }, { id: "user189723" }] } 

# Properties passed to serde
ion.id.path_extractor = ( id )
ion.other_ids.path_extractor = ( other_ids * id )

# Extractor matches values
doc1: ( id ) returns "user1"
      ( other_ids * id ) returns "user1234", "user189723"

# Current Serde Behavior: Serde only returns one value
doc1: id: "user1"
      other_ids: "user1234"

cheqianh avatar Sep 23 '21 01:09 cheqianh