Academic Hub Library


License
Apache-2.0
Install
pip install ocs-academic-hub==1.0.1

Documentation

AVEVA ADH Samples

📢 Notice: samples have transitioned to being hosted in individual repositories
📢 Notice: Samples have been updated to reflect that they work on AVEVA Data Hub. The samples also work on OSIsoft Cloud Services unless otherwise noted.

AVEVA Data Hub (ADH) is a highly flexible cloud-based platform that provides a scalable, elastic, centralized environment to aggregate data for reporting, advanced analytics, and third-party applications. ADH is powered by AVEVA's Sequential Data Store (SDS). In this GitHub repo, we provide samples which will help you get started with the ADH API against your ADH instance.

If you are interested in other AVEVA samples please see AVEVA Samples.

There is currently one type of sample in the repo:

  • getting-started icon Getting Started - ADH focused samples for a task, usually implemented as a simple console app or single page application. There are also base libraries that may be used in other apps.

  • ctp icon This task and code uses services that are currently in preview. If you are interested in this functionality, please contact ADH support.

The official ADH samples are divided in multiple categories depending on the scenario and problem/task, accessible through the following table:

Authentication

Client Credentials
Click for details on this type of authentication

.NET Build Status
Hybrid Flow
Click for details on this type of authentication

.NET Build Status
Authorization Code + PKCE
Click for details on this type of authentication

.NET Build Status
NodeJS Build Status
PowerBI Build Status
Python Build Status

Types, Streams, and Retrieving Data

WaveForm
Covers some typical operations against the SDS, including client credential authentication, creating, updating, and deleting types, streams and events. This uses a non-time Series Type. Some tasks are different from the other "Types, Streams, and retrieving Data" task, so look at the task ReadMe for details. This is a recommended starting sample, and a good a base for all other Tasks. Details

.NET Libraries Build Status
.NET REST API Build Status
Java Build Status
Angular Build Status
NodeJS Build Status
Python Build Status
Time-Series
Covers some typical operations against the SDS, including client credential authentication, creating, and deleting types and streams. This sample is based on Time-Series data. Some tasks are different from the other "Types, Streams, and retrieving Data" task, so look at the task ReadMe for details. This is a recommended starting sample, and a good a base for all other Tasks. Details

Python Build Status
.NET Build Status

Data Ingress

OMF Ingress
Covers the basic functionality of configuring and using the OMF Ingress

.NET Build Status
Bulk Upload
Demonstrates how to build a Bulk Upload utility that sends SDS objects from json files

.NET Build Status
CSV to ADH
Shows how to send a basic csv file to ADH using SDS calls

.NET Build Status

Visualization

Grafana
Demonstrates how to build a Grafana plugin that retrieves stream data from Sequential Data Store

NodeJS Build Status
SDS Visualization
This sample demonstrates a basic visualization application that can find and trend values from streams in the Sequential Data Store.

Angular Build Status
Assets
These samples highlight basic operations with Assets in ADH, including create, update, data retrieval, and delete operations on Assets. Details

.NET Build Status
Python Build Status
Power Query M
Shows how to pull data into applications that support Power Query M, such as Power BI and Microsoft Excel.

Power Query M Build Status

Analytics

Data Views
These samples highlight basic operations of Data Views for ADH, including creation, updating, getting data from and deletion of Data Views. Details

Java Build Status
Python Build Status
.NET Build Status
Data Views Jupyter
This sample demonstrates how to utilize ADH Data Views to do some basic data analysis using Python Jupyter Notebook.

Jupyter Notebook Build Status
Data Views R
Demonstrates how to create a data frame in R from an ADH Data View

R Build Status

Functionality & Utilities

UOM
Covers the basic functionality of the UOM system on ADH

.NET Build Status
Namespace Data Copy
Copies Data Views, Assets, and Streams from a source Namespace to a destination Namespace

Python Build Status
Sample Libraries
These sample libraries are used as the base for the other samples. They are designed to be straightforward implementations of the REST APIs. They are for use in the samples. Details

Java ~~~~~~~~~~~~~~~~~~~
Python ~~~~~~~~~~~~~~~~~~~
Security Management
Covers security configuration within ADH. This includes creating a custom role, creating a user, inviting a user, setting Access Control Lists (ACLs) for collections, setting ACLs for collection items, setting an owner for a collection item, and retrieving access rights.

Python Build Status
Stream Type Change
This sample highlights changing an ADH Stream's underlying SDS Type. The main purpose of this sample is to demonstrate the steps necessary to change the underlying SDS Type, and the secondary purpose is to provide an as-is utility to perform this Type change on PI Adapter v1.1 Streams after upgrading to v1.2.

Python Build Status

~~ These libraries are tested by being used in other apps.

Note: Tests with automated UI browser components (such as Hybrid Authentication, Authorization Code Flow and Angular samples) fail intermittently due to automatation issues.

For OMF to ADH samples please see the OMF repository: OSI-Samples-OMF

Credentials

A credential file is used in the samples unless otherwise noted in the sample. The name and location of the credential file should be noted in the sample's ReadMe.
Note: This is not a secure way to store credentials. This is to be used at your own risk.
You will need to modify these files locally when you run the samples.

About this repo

The style guide describes the organization of the repo and the code samples provided. The test guide goes into detail about the included automated tests. The on prem testing document describes the software installed on our internal AVEVA build agent.

Feedback

If you have a need for a new sample; if there is a feature or capability that should be demonstrated; if there is an existing sample that should be in your favorite language; please reach out to us and give us feedback at https://feedback.osisoft.com under the AVEVA GitHub Channel. Feedback.

Support

If your support question or issue is related to something with an AVEVA product (an error message, a problem with product configuration, etc...), please open a case with AVEVA Tech Support through myAVEVA Customer Portal (https://my.osisoft.com).

If your support question or issue is related to a non-modified sample (or test) or documentation for the sample; please email Samples@osisoft.com.

Contributions

If you wish to contribute please take a look at the contribution guide.

License

OSI Samples are licensed under the Apache 2 license.