Skip to main content
Solved

I need to use a form of testing based on the outcomes of another transformer


Forum|alt.badge.img

The image in the annex shows my workbench.

This is the result that can be seen in ‘Passed from Tester_2’:

NAME ; DBK

Organisation X1 ; 111

Organisation X2 ; 222

 

This is the result that can be seen in ‘SQLCreator_3’:

ID ; OWNER_ORG ; CLIENT_ORG ; MONITOR_ORG

1 ; 111 ; 111 ; 333

2 ; 222 ; 222 ; 222

3 ; 333 ; 444 ; 555

4 ; 333 ; 222 ; 333

5 ; 444 ; 555 ; 111

 

I would like to use a transformer that uses the results from ‘Passed from Tester_2’ to check if one of these DBK values is present in the organisation columns of result ‘SQLCreator_3’.

So I need the transformer to select ID 1, 2, 4 and 5. But not 3 as Organisation X1 and X2 is not present in one of the three organisation columns. 

 

Can anyone explain to me how I can do this?

Thanks in advance!

Best answer by chrisatsafe

Hi @eva218​ ,

I tend to handle this by concatenating the list of test conditions into a single attribute, merging the datasets, then using an IN operation in the Tester. There's likely a few different ways to handle this but this is my go-to for this task.

 

2021-02-09_10-38-56I've attached the example from the screenshot above. Hope that helps.

View original
Did this help you find an answer to your question?

4 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • Best Answer
  • February 9, 2021

Hi @eva218​ ,

I tend to handle this by concatenating the list of test conditions into a single attribute, merging the datasets, then using an IN operation in the Tester. There's likely a few different ways to handle this but this is my go-to for this task.

 

2021-02-09_10-38-56I've attached the example from the screenshot above. Hope that helps.


hkingsbury
Celebrity
Forum|alt.badge.img+50
  • Celebrity
  • February 9, 2021

I'd suggest using the SQL Executer. However my SQL isn't great so i'm struggling to think of the statement to achieve this.

Maybe @david_r​  or @ebygomm​  will be able to help a bit more


Forum|alt.badge.img
  • Author
  • February 11, 2021
chrisatsafe wrote:

Hi @eva218​ ,

I tend to handle this by concatenating the list of test conditions into a single attribute, merging the datasets, then using an IN operation in the Tester. There's likely a few different ways to handle this but this is my go-to for this task.

 

2021-02-09_10-38-56I've attached the example from the screenshot above. Hope that helps.

Thanks @chrisatsafe this indeed does the job! 😄


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • February 11, 2021
eva218 wrote:

Thanks @chrisatsafe this indeed does the job! 😄

Awesome, thanks for letting me know you got it working!


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