List of Information Steward rules from repository
Here’s the query that lists all the rules and the associated projects , tables and dimensions within the Information Steward repository.It also provide the rule created date.
Environment
Information Steward 4.2.5
SQL server 2012
Query
select distinct
t5.technical_name as Project_name
,t1.business_name as Rule_name
,t2.value as Quality_dimension
,t4.technical_name as Table_name
,t1.effective_dt as Rule_created_Date
from MMT_Rule t1
join MMT_Custom_Field_Value t2 on t1.rule_id = t2.[object_id] and t2.is_current_Version = 'Y'
join MMT_Relationship t3 on t1.rule_id = t3.[object_id] and user_flag1 is null and t3.relationship_subtype_cd in ( 'PRRB' ) and t3.is_current_Version = 'Y'
join MMT_Data_Group t5 on t5.data_group_id = t3.container_id and t5.is_current_version = 'Y'
join MMT_Data_Group t4 on t4.data_group_id = t3.related_object_id and t4.is_current_version = 'Y'
where t1.is_current_Version = 'Y'
Hi Magesh,
This is great. What other tables would I need to add if I also wanted to know:
Hello Karam , I can't recollect. If you use SQL server as your repo , you may trace it yourself. Read this blog.
https://blogs.sap.com/2016/01/16/tracing-information-steward-metadata-tables-with-sql-server/
I will post the answer when I have time to find it.
Thanks Magesh,
I did see that earlier today and will give it a shot. Thank you for your posts and quick reply.
Hi Magesh,
I got the privileges approved and tried it. I'm getting data back, but the Table_Name values are NULL. Any thoughts?
Thanks,
-AK
Hello Karam,
You should run the trace sql script in IS repository DB. Did you do that?
To get the columns that are bound to a rule , use the below join and select [MMT_Data_Element].Business_name
When you say rule name , do you mean ‘Domains associated with the tables/rules? , if it is then you can use the below join
The domain names are in the column [MMT_Data_Element].[business_name]
Magesh,
The information your provided was very helpful. However, I was wondering if you have any examples on creating a report of all calculated scores. I have found the table MMT_Key_Data_Domain_Score, which seams to have all of the information we are looking for... However, we want to link with the Project Name, Rule Name, and Quality Dimension, with table names and Rule Created Date. Do you have any examples or advice on how to join the key_data_domain_id to the correct rule_id? Thanks in advance. It is very much appreciated.
Hi David , Can you try this query?
For some reason , IS is not populating the table MMT_Key_Data_Domain_Score for me. So, I'm not sure if the above query would fetch you the result that you are looking for. Let me know the result , so I can drill further into it.
Hello Magesh, Have you ever figured out why the MMT_Key_Data_Domain_Score was not being populated? I am having the same issue. I have figure out how to get the list of rules, but now I want the scores....
Hi Monica, Sorry for the late reply. You may need to run the scorecard from CMC to see the MMT_Key_Data_Domain_Score score. Let me know if that doesn't work. I have another query that I can share.
Hi!
I ran the CMC scorecard, and it did not populate the MMT_Key_Data_Domain result tables. they are coming up all NULLs.
Thanks for your help.
Hi Magesh, thank you for your help so far! Unfortunately im running on NULL values as well. Could you share your other query? It might just be what we need.
Thanks in advance!
Hi Samuel,
Please check this query. Make sure you pass the IS project name at the second last line of the query. Let me know if this works for you and feel free to contact me if you have any questions.
Former Member Does this query work for you? If so, let me know so I can update this blog.
Hi Magesh, first of all thank you for your work! It helps us a lot in understanding the system further, even though the desired end-result ist not quite there yet: Specifically, this query runs endlessely on my end. Is it expected to take very long? (>1 hour)
It should not. I ran this query in my IS repo ( SQL Server) while has a considerable number of projects. It finished running in 20 seconds.
How big is your IS repository, in terms of the number of projects?
Have you run the Scorecard Utility in CMC after executing your rule task(s)?
Hey Magesh,
is there a way to also retrieve or get the rule logic that is written in IS from the repository? If so can you include which join to make?
Ie - if i wrote a regex or any expression in the expression builder, I want to be able to get the logic, is there a repo table/field that has that?
Thanks
Hi Magesh,
Very useful information, saved my day from struggling around SAP IS repo tables.
Thanks very much!
Ankit
Hi Magesh,
This is immensely helpful. I just get few duplicates every time I execute this query I get an extra row with accuracy dimension for my IS scorecards
Thanks
Saurabh
Is there also a way to display the number of filtered rows (since the DQ-score is calculated as a percentage of filtered rows not total rows) or does SAP Information Steward only store FAILED_ROW_COUNT and TOTAL_ROW_COUNT?