Technical FAQs on Business Rules on HANA
What is Business Rules on HANA ?
Business Rules on HANA is an offering in SAP HANA to author, generate and execute rules. Rules can be designed using Decision Tables in SAP HANA Studio, followed by generation of SQLScript procedure which is nothing but the runtime artifact of the decision table and finally use this SQLScript procedure in application for radical improvement in decision making time. For more information refer the blog series – Big-Data Decision-Making made better with Business Rules in SAP HANA
How is Business Rules on HANA aligned with Business Rules Management Systems ?
In Business Rules on HANA, Decision Table is the rule artifact that is used to extract the core decision logic in a tabular structure that is quick to read, clean and understandable. The power lies in the SAP HANA database-based rules engine that uses in-memory technologies for quicker decisions in real-time. In coherence to BRMS, the tool to define and manage rules is HANA Studio and the runtime environment to invoke rules is SQLScript Procedure that is generated once the rules are activated in HANA Studio. The lifecycle of the rules are managed and maintained by SAP HANA.
What is the runtime artifact for Business Rules on HANA ?
SQLScript Procedure. This SQLScript Procedure is generated when the decision table is activated from SAP HANA Studio. This procedure resides at following location in HANA Studio : <HANA System>/Catalog/ _SYS_BIC/ Procedures/<package-name>/<decisiontable-name>
Which engine in SAP HANA is used to execute Business Rules ?
Calculation Engine is used to execute the SQL Procedure generated from the decision table. The calculation engine is optimized for complex calculation, SQL Scripts, MDX queries and planning engine operators. All these different programming models are translated into a common representation called “calculation model”, then these models are optimized using a rule-based model optimizer and finally this optimized model is executed by the Calculation Engine executor.
Is pure SQL faster than Decision Table ?
Decision Table is generated into a SQLScript Procedure which is the runtime artifact of Business Rules on HANA. This SQLScript Procedure is run using Calculation Engine which is optimized to give high performance. While pure SQL is optimized and executed by the SQL Processor, the SQLScript Procedure by default is executed by Calculation Engine. In certain situations, SQL Processor could be faster than Calculation engine processor.
What is overall architecture of Business Rules on HANA ?
How does Business Rules on HANA scale with the increase in database rows ?
Performance of Decision Table increases linearly with increase in the database records. Follow the blog on performance to see how decision table performs in Select and Update SQL statements – Performance Studies of Decision Table in SAP HANA
What are the usecases for Business Rules on HANA ?
Business Rules on HANA can be used in various industries where decision are subjective to high -change like in Banking for relationship-based pricing, credit decisioning, score card etc. OR in Insurance for new products, claims, agent commissions management etc . OR in Healthcare for fraud detection etc. The two usecase studies of Retail Industry could be found at the blog –Big-Data Decision-Making made better with Business Rules in SAP HANA
When is Column View generated as part of Decision Table activation ?
Decision table can be modeled in several ways. The data foundation can be based on (a) Single Physical table (b) Multiple Physical Tables with JOIN (c) Table types and (d) Information model like Attribute view, Analytical View or Calculation View. Depending upon the type of data foundation, there is an additional Column View or Result View generated together with the basic SQLScript procedure. For case(b) where there is join operator (inner, right outer or left outer) used in Data Foundation, a column view is generated which is then used in final SQLScript procedure. This column view can be found at <HANA System>/Catalog/ _SYS_BIC/Column Views/<package-name>/<decisiontable-name>CV
When is Result View generated as part of Decision Table activation ?
Decision table that are modeled with ONLY parameters as Action return a Table Type when activated. The SQLScript procedure that is generated is a READ-ONLY procedure that uses this table type as OUTPUT. To consume such decision table, you have to use the Result View which is nothing but a column view that internally consumes the SQLScript procedure. This Result View can be found at –
<HANA System>/Catalog/ _SYS_BIC/Column Views/<package-name>/<decisiontable-name>RV
Why I do not find Result View even when Decision Table has Parameters as Action ?
Result View is generated when ONLY Parameters are used in Action. If any other Attribute is used in Action then Result View is not generated.