Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Test tool should fail when number of records are identical

Peter4
アステロイド

I have an input file that is updated once a month. I would like to check if it has the same number of records as in the previous month. If that's the case, the test tool should fail. If the number of records differ, the test should pass.

 

The information would normally be stored in a log file, but I have used a dummy text input for this example. The test in the workflow should fail when tool 10 is connected to the count records tool, but it should pass when the connection is swapped with tool 7. At the moment it fails in both cases. How can I set up the test correctly?

2件の返信2
danilang
19 - Altair
19 - Altair

Hi @Peter4 

 

Each of the tests set up in the Test Tool can only access the fields on a single input, so If you wan to compare values in any single test you have to combine them before the tool.  Here, I've used a Join tool set to join on record position to get the values from both streams into a single record.  

 

danilang_0-1622200883019.png

 

The pass/fail results are as expected

 

Dan

 

 

 

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @Peter4 

 

Additionally you can use message tool to check the condition and stop execution & data flow through if the condition is met. This way upon the data is not written to the output.

 

Fail:

atcodedog05_0-1622202537536.png

Pass:

atcodedog05_1-1622202602630.png

 

Hope this helps 🙂

ラベル