You can code business rules in SQL, MDX Query, or MDX Script, and then use, respectively, NativeSqL, NativeMDXQuery, or NativeMDXScript implementation. Like MdxScript implementation, NativeMDXScript implementation can only be used for Definition rules. NativeSqL and NativeMDXQuery can be used for Assignment Rules or Allocation rules.
PerformancePoint Planning Business Modeler passes a rule that uses NativeSqL implementation to the underlying database as stored procedure. ThePlanning Business Modeler design assumes that the rule includes all necessary operational code. That is, if the rule contains only a SELECT statement, no writeback or insertions occur.
Planning Business Modeler passes a rule that uses NativeMDXQuery implementation to SQL Server Analysis Services unchanged, where the rule is run. The results of the query are returned to Planning Business Modeler, and then written to the fact tables.
Planning Business Modeler stores a rule that uses NativeMDXScript implementation in the cube as a definition rule. This rule is processed every time that a cell in its scope is queried.
A PerformancePoint Planning Server Global Administrator must enable native code implementation in the model. Because of security concerns, rules that use these implementations are typically saved as inactive, and then enabled on a case-by-case basis. For more information, see Security requirements for SQL and MDX rules.
In this topic
When to consider native code implementation
You should consider using rules that use native code implementation when Microsoft Office PerformancePoint Expression Language does not support the functionality that you want to use.
Performance characteristics of rules that use native code implementation are determined by the system in which the rule is implemented.
Rules that use NativeSql implementation run as PPSPlanning2007LowPrivilegeSQLUser. This means that rules that use this implementation have limited access to the application database. By default, the access includes the following:
Full access to the schema for business rules calculation
Write access to the measure group tables
Select access to other tables
In addition, rule permissions apply only to the application database. By default, user permission does not extend to include other, external databases.
Many times when you write a native rule you will want to refer to certain tables, databases, columns, and so on. Planning Business Modeler supports preprocessor commands for rules that have NativeSql and NativeMDXScript implementation. For more information about these commands, see Preprocessor commands for native code rules.
In addition, Planning Business Modeler enables you to pass parameters to rules that use NativeSql implementation. Parameters can help you re-use a rule between different models.
You can use parameter support to pass model variables to a native rule, because you can pass the variable in as the value of the parameter at runtime. For more information about parameters in native rules, see Using parameters in rules that have NativeSQL implementation.