what would be the queries when use OLEDB tools to get following data or any other ways to achieve it?
1) to get list of Analysis don't have child elements
2) to get list of Analysis don't PI points defined
I am not sure about 1)'s question meaning. Could you explain more about it?
If the attribute's data reference is "Analysis", then you can find Data referencePlugInID on the Element Attribute Table.
You can join it with Catalogs > System > AF > Tables > PlugIn to get the Name of the Data Reference.
If you want to check that the analysis is not mapped yet, then it will be difficult since there are no attribute at all.
For monitoring Analysis, can you use "Management"'s Status?
thanks for response.
see screenshot, this is what I mean analysis with no child elements.
Since PI SQL Family don't have specific table for analysis, it is difficult to acheve it by PI SQL.
What I can imagine is that you can check by PI SQL is that show the value of the output's attribute and you can find error status.
The other thing is that ElementHierarchy table contains path information for elements.
If you know which element contains rollup analysis, then you can get the path and you will be able to know that the element contains child element or not.
(Child element contains parent element's path in the ElementHierarchy's path column.)
In AFSDK It is possible to check if an Rollup has inputs or not.
For example, if you have a list of analyses in the analyses variable before, this will print out which Rollup have no inputs.
foreach (var analysis in analyses)
if (analysis.AnalysisRulePlugIn.Name == "Rollup")
foreach ( var inputs in analysis.AnalysisRule.GetConfiguration().ResolvedInputs)
if (inputs.AttributeList == null)
How to run this code, from where?
this is AFSDK code, a library built on top of the .Net Standard Framework. If you haven't had the chance to use it before, I suggest you go through the training that we offer on PI square:
Developing Applications with PI AF SDK
Thanks for this code, I was able to run it and get list of analysis but in addition to analysis with no child it retrieves analysis has a child elements, this analysis although have some error but it has child elements. What do you think about it?
can someone help on this:
I'm trying to get all analysis has no Child Elements:
af sdk code is proposed to use to get such analysis but it doesn't work and still retrieves analysis has child elements, see code attachment.
can someone advice on it?
Retrieving data ...