Five Stars

How to get tExtractXmlField to include both xml sibling items not just one

I call a service and get back a payload (abbreviated) like this:

<events>
 <isSubscribed>true</isSubscribed>

 <multipleTimesPerDay>07:19:32</multipleTimesPerDay>
 <multipleTimesPerDay>06:09:32</multipleTimesPerDay>
</events>

I use a tExtractXmlField component to pull out the data; into a respository metadata like this:
isSubscribed  String
multipleTimesPerDay  String

I have tried changing the Datatype from String, to Object, to List; and I always just get the first item/value.

What I would like to get is:

columns
isSubscribed  multipleTimesPerDay
"true"              "07:19:32", "06:09:32"

I want the multipleTimesPerDay values in one column in the metadata repository; that I can evaluate later.

What am I missing?

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: How to get tExtractXmlField to include both xml sibling items not just one

Found a work around.
Added a tAggregateRow component, with the output column as 'multipleTimesPerDay' function list(object)
and set the output datatype for that column as List.
Works well.

2 REPLIES
Five Stars

Re: How to get tExtractXmlField to include both xml sibling items not just one

Found a work around.
Added a tAggregateRow component, with the output column as 'multipleTimesPerDay' function list(object)
and set the output datatype for that column as List.
Works well.

Six Stars

Re: How to get tExtractXmlField to include both xml sibling items not just one

1.jpg2.jpg3.jpg

 

I tried using tXMLMap, and got multipleTimesPerDay, let me know if it helps you @DaveTaylor.

Please refer attached screenshots

 

Thanks,

Sachin D.