Skip to main content
Solved

For or while loop in detection rule


Forum|alt.badge.img+2

How can we use functionality like β€˜for’ and β€˜while’ loop in detection rule field while writing/creating rules for capturing data/records.

Best answer by alex

Hi Taruna,

Those particular functions are consider as an experimental feature, since they were recently implemented and therefore, they are not suggested as part of context assist. However, this doesn't mean that they wouldn't be working, given the fact that they are configured correctly, according to the documentation, and the expression passes the validation, it would be usable. Keep in mind that with rules, you are working on the record level, so you don't have access to array of records, unless you construct them manually in the expression or load it from some external source. Therefore, the scenarios where end-user would benefit from using such functions in the scope of these DQ rules can be rather limited. 
 

Best Regards,
Alex

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

Forum|alt.badge.img+1
  • Ataccamer
  • March 22, 2022

Hi Taruna,

By design detection rules are meant to be used for rule-based term detection during profiling, meaning, that the expected outcome would be boolean (true/false) so the result can be measure against a given threshold and the application would determine if this term should be applied based on the aggregated result for all given records. Therefore, I am not sure I understand the need to use for/while loop in a detection rule. However, I would be happy to proceed with the discussion in the support ticket you have raised. 

Best Regards,

Alex


Forum|alt.badge.img+2
  • Data Voyager
  • March 22, 2022

I can find "set" in ataccamma detection rule fields but I cannot find array.
For example I can find set.differenceResult but I cannot find arr.differenceResult
I have attached screenshot.

Can you reply why cannot I find arr.differenceResult?


Forum|alt.badge.img+1
  • Ataccamer
  • March 24, 2022

Hi Taruna,

Those particular functions are consider as an experimental feature, since they were recently implemented and therefore, they are not suggested as part of context assist. However, this doesn't mean that they wouldn't be working, given the fact that they are configured correctly, according to the documentation, and the expression passes the validation, it would be usable. Keep in mind that with rules, you are working on the record level, so you don't have access to array of records, unless you construct them manually in the expression or load it from some external source. Therefore, the scenarios where end-user would benefit from using such functions in the scope of these DQ rules can be rather limited. 
 

Best Regards,
Alex


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