Skip to main content
Question

Workaround to run LineCombiner in Group mode? (OR condition)

  • December 8, 2022
  • 5 replies
  • 26 views

aron
Enthusiast
Forum|alt.badge.img+16

I would like to combine lines on the attributes in column A OR B OR C and so on. The "combine on attributes" is an AND condition. What would be the cleanest workaround to achieve this?

5 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • December 8, 2022

Would 3 LineCombiners in a row give the expected results, one for each attribute?


aron
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • December 8, 2022

Would 3 LineCombiners in a row give the expected results, one for each attribute?

It would absolutely do the job. Only thing is that I would need +10 of them. Was hoping for some clever trick to cut the number of transformers.


redgeographics
Celebrity
Forum|alt.badge.img+62

Can you elaborate a bit more on your data structure? Are columns A, B and C always present and do they always have a value? Can they have the same value?


aron
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • December 8, 2022

Can you elaborate a bit more on your data structure? Are columns A, B and C always present and do they always have a value? Can they have the same value?

The columns are always present, they do not always have a value but they can have the same value.

 

The LineCombiner in question is embeded in a custom transformer that is used in multiple streams. My plan B is to filter out only the columns that are needed for each respective stream. Before I venture into that I wanted see if there was some less convoluted way to mangage the group processing.


Forum|alt.badge.img+2
  • December 8, 2022

@aron​ Can you create a new group attribute using a conditional new_attr A if A NOT <null> or B if B NOT <null> OR C if C NOT <null and then use that?