This is the demo for Predix-AnalyticFramework
Also this is a simple tutorial for the AnalyticFramework of GE Predix Platform.
The official tutorial is not perfect due to the swtich from Analytic Catalog, Analytic Runtime, Analytic Ui to AnalyticFramework.
The mixed tutorial has some out of date information about how to configure the AnalyticFramework correctly.
Basically speaking, the Analyticframework is the combination of Analytic Catalog, Analytic Runtime and Analytic Ui. The following steps can quickly guide you through some common issues.
- Set up your own UAA service, Timeserise service.
- In your UAA service, you should configure a UI client, a Runtime client and a Analyticframework client. The corresponding authority and scope please refer to here
- Subscribe the service in your Predix account and bind your UAA clients.
- After your subscription, you should
update your analytic service
with your timeseriesZoneID(also assetZoneID if you need) using cf command with the following format. And alsoupdate your runtime client
to have the access to your timeseries or asset services in UAA dashboard.
{
"trustedIssuerIds":[
"UAA-URL"
],
"runtimeDependentServices":{
"predixTimeseriesZoneId": "yourTimeSeriesZoneID"
},
"uiDomainPrefix": "yourUiPrefix",
"uiTrustedClientCredentials":{
"clientId": "yourUiClientID",
"clientSecret": "yourUiClientSecret"
},
"runtimeTrustedClientCredentials":{
"clientId": "yourSchedulerClient",
"clientSecret" : "yourSchedulerClientSecret"
}
}
- After this you can upload your
analytic code
or you can use my zip and ananalytic template
using the AnalyticUi following the instruction
analytic tempalte
defines the input & output data format of your code.
- Then upload the
Orchestration file
which defines how your analytic code will be excuted during the runtime. - Upload the
port-to-field
file which defines how to process the data from the binded TimeSeries service. - Finally you can run the code using Postman.
The 6-8 steps can be finished using Postman collection
In postman command, you can use the following request body to map data from TimeSeries to your Analytic code
.
{
"orchestrationConfigurationId": "orchestrationentryID",
"assetId": null,
"assetDataFieldsMap": {
"temperature sensor": "tag-C", // map tag-C from timeseries service to temperature sensor,
// and the analytic template will map temperature sensor to your code input
"demo aggregation": "demo-aggregation1h"
},
"assetGroup": null
}