Skip to main content
Question

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


aron
Supporter
Forum|alt.badge.img+16
  • Supporter

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+30
  • Influencer
  • December 8, 2022

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


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • December 8, 2022
dustin wrote:

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+47

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
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • December 8, 2022
redgeographics wrote:

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?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings