Integrations

Shyft Time Series

The following is provided as a python package (wheel): trident-shyft. It provides integrations with Shyft’s distributed time series system.

The following shows how it connects a Trident engine to a DTS server:

shyft dtss

API Overview

The trident-shyft package provides the following components, to be used together with the Trident engine:

  • ShyftDataService - factory strategy object

  • ShyftDataProvider - read-only time series data provider for input data

  • ShyftDataStore - read-write time series data store for result data

Basic usage

The following will set up Shyft as the default data provider for time series data:

import trident.core
import ngltmshyft

engine = trident.core.Engine()
...

shyft_host = "localhost"
shyft_port = 91919
service = ngltmshyft.ShyftDataService()
service.shyft_ref_prefix = "shyft://trident" # will be prepended to each shyft request
service.connect_dts("{shyft_host}:{shyft_port}")
engine.data_service = service

Shyft URL’s

When requests are made from Trident through the ShyftDataService, Shyft URL’s are chosen as follows:

When requesting input data: <prefix>/datasets/<dataset_id>/<resource_id>; e.g. shyft://trident/datasets/my_dataset/my_ts

When storing result data: <prefix>/runs/<run_id>/results/<resource_id>; e.g. shyft://trident/runs/my_run/results/my_ts

More examples

For a more complete set of examples, see the shyft folder in the trident.notebooks repository.

Source code

The source code is available in the trident-shyft repository.