My laptop beckons to me. As I place my weight, the chair bounces slightly. The screen lights up. I click my icon and wait. In the distance, a hovercraft comes up to speed. Through fiber optics cables, packets fly thousands of miles to bring up Information Steward’s log in page.
I’m going to get deeper into the rules engine.
A side note: Information steward has some extensive tutorials here and I would highly recommend viewing them. We’re going to assume you have working knowledge of IS, a project and a few rules created. The purpose of this entry is to explain a bit what’s going on behind the scenes with the rules engine. Maybe, just maybe, we’ll see how to create a rule that updates on a more frequent basis.
First, what is a rule?
From my perspective, a rule is a parameterized function (if you want to get technical.) That is, it has inputs you define, and a single return value. It’s defined independant of the databases. Only once it’screated do you bind it to a field or several fields. Then you add it to your dashboard.
I have a rule on my dashboard
But, then what?
How often is that rule calculated?
The defaults are: The rule is calculated once a day. So, if you just created a rule, added it to your dashboard, and left it alone, you’d get a new blip on your scorecard every day for the rest of information steward’s life. Like most things in software, this has a complication. That is, if you’ve built out some rules and
added them to your scorecard, when you open your scorecard, you won’t see that rule show up.
Where did it go?
This can be confusing.
First, an easy way to see your rule. On the top left, change the ‘show score as of’ drop down to ‘now.’ By default, the scorecard shows yesterday’s refresh. This will update to the latest scorecard, which will show your new rule. But, it will not have any data.
A dashboard with no data is only of limited value
How do we get that data?
Now, this is where we get into the details of how the scorecard and the rules are calculated. First, let’s calculate the rule. We’ll choose to run it now by going to your workspace.
- Under workspace home, click rule results.
- Open the table you applied your rule
- With this table selected, choose ‘calculate score’
This will create a new task.The task is what gets executed. If you have additional tables you’ve bound to the rule, you’ll want to add those tables here. This will allow you to compile all the rules as one task, which is easier to manage.
So, now that’s run. But wait, you are not going to see the rules come up quite yet. There is another piece of this puzzle. You need to recalculate the scorecard. For this:
- Go to your CMC
- Open applications
- Right click ‘Information Steward Application’ and choose ‘Manage
What you see before you are several utilities that work in the background of information steward. The one we’re interested in is the calculate scorecard utility. If you select that, and click actions > run now, it will take the results of the rule you just ran and add it to the dashboard.
The support site has a more detailed description of ‘calculate scorecard’ and why we must take two steps, (running the rule and recalculating the scorecard)
The Calculate Scorecard Utility does the folllowing:
The formula for calculating the scorecard is fairly straightforward. It is (object score x weight%) + (object score x weight%) = combined score. The object can be a rule binding, rule, or quality dimension. The number of object scores depends on the number of objects you want to add in the key data domain. The score calculation for a scorecard process begins with the scores from the rule binding and is rolled up to the rule. The rule score is then rolled up to the quality dimension and finally from the quality dimension to the key data domain. The weight in each section must add up to 100%.
The scorecard scores are calculated and stored in the repository using the Calculate Scorecard utility, which is scheduled in the Central Management Console (CMC). By default, the Calculate Scorecard utility is run on a daily basis, but you can change the frequency in the CMC. Note that the scores for rule bindings are calculated by
a rule task, which calculates the scores for all rules bound to the tables, flat files, and/or views.
If you go to your dashboard now, you will see the rule has a new entry. The next step is setting this up to refresh at the interval you want. To schedule the rule on a recurring basis:
- Load your CMC
- Navigate to Information Steward
- Open ‘data insight’
- Open ‘projects’
- Open your current project
You will see the task you created. From this interface, you can right click your rule anddefine a recurring schedule. Maybe once every hour?
You’ll want to define a schedule for ‘calculate scorecard’ that matches your desired interval. That means going back to that utility interface.
An important note: If you want to refresh your scorecard’s values more than once an hour, you need to change a setting on information steward
Check the Optimization Period setting in the Central Management Console (CMC) under Applications > Information Steward > Configure Application > Data Insight Settings > Rules > Optimization Period or Profiling > Optimization Period and change this value to 0 so all scheduled runs are updating the information/statistics.
If the scheduled task is run within the optimization period that is set in the Central Management Console (CMC), no update to the statistics will be done.
Hopefully this helps explain the details of what’s going on with the rules engine and shows how you can extend it a bit more. One last note, as of the time of this article, you cannot calculate a single scorecard.The global ‘calculate scorecard’ utility refreshes all scorecards. I could imagine a very large deployment hitting a performance bottleneck at this point. Having said that, my environment has~10 scorecards and this utility took less than a minute to run, but your mileage may vary.