In this video we're going to discuss how
dependency chains are used with the analysis service.
A dependency chain occurs when you use the output of one analysis as the input
to another. To illustrate this, let's go back onto our expression creation database where we
have the asset template element template and we've already created the total flow
last hour attribute. I go to my analysis template . We can see that my total flow
last hour attribute comes as a rolling average of the flow rate. I'm going to
make up another analysis and I'll use the total flow last hour attribute as an input.
I'll keep it as an expression type of analysis and I'll use my total flow last hour attribute,
again this is the output of that previous analysis we were just taking a look at. I'm going to
multiply this by 24, again this is just a made-up function, this could theoretically show you a
predictive value if you're going over the last rolling average total and multiplying it by 24 to
give you a rough idea of what the total flow might be in the day. I map this to another attribute.
We're not really concerned with the outcome of this expression scientifically,
what we are interested in is how we treat dependent analyses. I could also put this
analysis in the future and I'll use this as a predictive analysis that output today in
the future and I'll hit OK. We can see that the analysis is working and really
the important things to note I'm going to put in KB articles that are linked in the
description. Two of them indicate what happens with dependent analyses, the first is that when
you do backfilling which we'll go over in more detail the analysis service is smart
enough to know that it needs to evaluate the input function first. Meaning that we'll calculate the
total flow last hour prior to calculating the rolling day predictive flow total attributes.
To illustrate this I'm just going to backfill the total flow last hour and
the dependency chain example for asset two and we'll notice that the total flow last
hour backfills first in order so that it can be used as an input in the dependency chain
example analysis. Analyses are typically grouped together when they have similar
frequencies of triggering and when they're in a dependency chain again more information is
found in those KB articles below. One of the KB articles talks about PI analysis service
best practices and another one goes into how to troubleshoot the PI analysis service performance.
Dependency chains give you the ability to decouple analyses when you're using expensive
functions. Let's say you have a particular piece of an analysis that requires a lot of resources,
these are considered expensive functions and you could schedule
an expensive function analysis to run on an infrequent basis that can still be used as
an input to another analysis that you may want to schedule more frequently.
In the next video we're going to move away from expression analyses
and get started on building out roll-up analyses.