Within Spoon I have used the mongoDB Input step. for a given document of form..
{"Number": [
"4700100004"
],
"Random": [
"unknown"
],
"List_Of_Vals1": [
"3",
"2",
"1",
],
"List_Of_Vals2": [
"1",
"2",
"3",
]}
I am able to unwind one of the arrays using Mongo query from pdi
[{"$unwind":"$List_Of_Vals1"}]
which produces::
Number Random List_Of_Vals1 List_Of_Vals2
"4700100004" "unknown" "3" ["1","2","3"]
"4700100004" "unknown" "2" ["1","2","3"]
"4700100004" "unknown" "1" ["1","2","3"]
But ultimately I need to unwind both arrays sequentially which I thought I might be able to do by writing
[{"$unwind":"$List_Of_Vals1"},{"$unwind":"$List_Of_Vals2"}]
but this returns a duplication of "List_Of_Vals1"
Number Random List_Of_Vals1 List_Of_Vals2
"4700100004" "unknown" "3" "1"
"4700100004" "unknown" "3" "2"
"4700100004" "unknown" "3" "3"
...
...
...
What I cant seem to figure out how to get is both unwound without duplication as such:
Number Random List_Of_Vals1 List_Of_Vals2
"4700100004" "unknown" "3" "1"
"4700100004" "unknown" "2" "2"
"4700100004" "unknown" "1" "3"
Any Help is much appreciated. Thanks