Best practice. How to throw error on rule violation?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Best practice. How to throw error on rule violation?

      What is the best way to throw/catch an error in a rule?

      Toy example.

      ['Average Cost'] = ['Total Cost']/['Count']

      What is the best way to signal "Divide by zero" error (other than adding another element to the dimension to capture this rare event.)

      Do people just track the output of the olap_server.log looking for errors?

      Just wondering... I'm worried that I'll write rules that will only apply to N% of the cases I want them to capture and I'll be missing data because these errors are trapped silently (I don't think Jedox highlights cells where there were calculation exceptions...)
    • Hi,

      there is a palo.ini option to suppress rule error for better performance mainly for B: rules

      ### ############################################################################
      ### ignore-rule-error
      ### ############################################################################

      ## Ignores arithmetical errors during rule calculation
      # (like division by zero) and replaces them with 0.
      #
      # ignore-rule-error (default state is true)


      strange behavior of palo.ini switches is that each instance of the entries switches the behavior. i.e. adding the line ignore-rule-error will actually cause that rules can generate errors (don't blame me for that - backward compatibility)

      As palo rules are typically working on B: level there is lots of rule calculated. Therefore rules are being optimized for large sparse areas that cannot effectively process large amount of non-sparse error values potentially generated by rules.

      Most ot the similar in memory OLAPs calculating rules on the fly doesn't care about division by zero - it just return zero. Rule designer has to take care of this. Fact is that there is not enough good tools that can be used for this. I'm trying to push priority of these tools higher

      Only way now is to use IFs in your rules for testing and once the model is stabilized, removes these if for better performance. IFs are also performance killers for B: rules
    • Thanks Jiri.

      If I need to keep track of this kind of error, I'll probably program it as a separate spreadsheet to sanity check my calcs. Then, the checks won't be run in normal operation only when the sanity check spreadsheet is manually refreshed.

      Its good to know about the ignore-rule-error flag. I may set that if I find that I need more details about why some rules fail to update.