combining 2 rows into one
Essentially I have 2 rows, each from a diff node/source
that need to be 1 row.. I tried a CAT and it didnt work.
_________________col 1 ___ col 2 ____ col 3 _____ col4 ____col 5
row1 from a filter:___Null____Null______Null______Null_____ Hello
row2 from b filter:___AAA___BBB______CCC_____DDD_____Null
output needs to be AAA,BBB,CCC,DDD,Hello
Thanks!
-
You can use groupString() in an Agg Ex to achieve that. Here's some sample code.
node:Static_Data
bretype:core::Static Data
editor:sortkey=5d2cbbff7c960c20
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
col1,col2,col3,col4,col5
NULL,NULL,NULL,NULL,Hello
AAA,BBB,CCC,DDD,NULL
EOX
editor:XY=320,280
end:Static_Data
node:Consolidate_using_groupString
bretype:core::Agg Ex
editor:Label=Consolidate using groupString()
editor:sortkey=5d2cbc94672d0e24
input:@4b4668c040aa5a85/=Static_Data.40fe6c55598828e5
output:@4b4668e708143fb4/=
prop:GroupBy=<<EOX
1
EOX
prop:Script=<<EOX
col1 = groupString('col1')
col2 = groupString('col2')
col3 = groupString('col3')
col4 = groupString('col4')
col5 = groupString('col5')
emit col1, col2, col3, col4, col5
where lastInGroup
EOX
editor:XY=430,280
node:Bypass
bretype:::Bypass
editor:shadow=4b467f7e02db3a85
input:@4b467f7e129d45c1/=
input:@4b467f830ffe047b/=
output:@40fd2c7436717256/=
end:Bypass
node:Sort
bretype:::Sort
editor:shadow=4b467f8972dc33df
input:@40fd2c743ebf4304/=
output:@40fd2c746a2a3b47/=
end:Sort
node:Agg
bretype:::Agg
editor:shadow=4b467f9b3d5028c0
input:@40fd2c7427456e5b/=
output:@40fd2c744c862db0/=
end:Agg
end:Consolidate_using_groupString
Please sign in to leave a comment.
Comments
2 comments