Solved

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

  • 9 February 2021
  • 4 replies
  • 0 views

Badge

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!

icon

Best answer by chrisatsafe 9 February 2021, 19:44

View original

4 replies

Badge +2

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.

Userlevel 5
Badge +29

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

Badge

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! 😄

Badge +2

Thanks @chrisatsafe this indeed does the job! 😄

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

Reply