Filters are often applied by the business users or rule designers to control the output based on the multiple parameters specific to any industry like filter customers that have a specific plan in telecom industry or filter deals based on autmobile manufacturer, model etc. or filtering customers that have specific policy in Life Insurance sector or filtering messages in your inbox. This blog will walk you through the process of defining rules and using them to filter the content based on specified action and/or input.
Facts
Usecase
There is an online company that offers discount coupons on car deals from various dealers based on the car model and manufacturer. A set of rules are run to decide the discount given by various dealers from different regions. Customers can use these discount coupons with the dealers when purchasing the car.
Solution
Here is a step-to-step guide that could be used to filter rules using decision table based on the usecase described above. Explore this solution that has been divided into 3 sections (a) Data model (b) Decision Table model (c) Consumption model
Note: All the images are based on modeling done on HANA Studio SP07, but the same usecase could be designed
in same way in SP06 as well.
(a) Data Model
I have created three database tables named CAR, DEALER and DISCOUNT_COUPON. CAR table contains all the metadata about the car, DEALER contains all the metadata about the dealers and their location and DISCOUNT_COUPON contains discount information that would later be suggested to the customers who are looking for best buy before purchasing the car.
(b) Decision Table Modeling
Data Foundation
Note: Action is a Parameter – DISCOUNT, which is set to after the rules are executed.
Decision Table
Note: This would generate the Result View that would be used in Calculation View.
For more details on modeling decision table refer my blog series
Calculation View
Note: You can find result view in “_SYS_BIC/<your-package>/<your-decision-table-name>_RV
(c) Consumption Model
Calculation view can further consumed using OData service.
You can thus use decision table to control the items that are consumed in your application, and can bring in ability of controlled consumption to the database. Follow this blog to successfully create custom application in HANA especially where filtering-rules are needed. Do write in your suggestions and feedback. If you have any queries on filtering rules then drop me comments, I would be happy to help you !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
29 | |
21 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |