Time Series Data Ingestion
About Time Series Data Ingestion
The Predix Essentials Time Series Data module provides POST methods, JSON payload and CSV file, to ingest time series data. The CSV supported formats are ODBExportCSV, and ProficyFileCollectorCSV. This module is used by various features and other modules to consume time series data for display, charting, and analysis.
The two ingestion methods can be used for one or more tags. For each tag, a series of data points are defined by timestamp, data value, and data quality indicator. The data points are specified as numeric, string or boolean values.
After creating the ingestion files, they are submitted through REST endpoints and can be queried using the time series data retrieval endpoint to ensure correct data ingestion. Correct any errors in the ingestion file by resubmitting as needed, which replaces the existing data. Any data with new value type or quality indicator ingests as new records.
The following definitions are helpful for understanding the headers and parameters:
- Authorization
- Enter the token_type followed by a space, then the access_token that is in the response you previously obtained, for example,
bearer eyJhbGciOiJSUzI1NiJ9.A...
The following code sample includes a bearer token:{ "access_token": "eyJhbGciOiJSUzI1NiJ9.A...", "token_type": "bearer", "refresh_token": "eyJhbGciOiJSUzI1NiJ9.e..", "expires_in": 86399, "scope": "openid", "jti": "5e2c90ea-9edd-4da1-80c8-4a0d67f77ef3" }
- Content-type
- The MIME type of the body of the request. Supported types for ingestion are
application/x-www-form-urlencoded
, andapplication/json
- tenant
- The unique ID for the tenant (for example, 07F28C049E0F4F29B8E85E4A6C916D7F)
- file_type
- The file type you are using to ingest time series data. It is a required parameter. The permitted values are
json
,X-GE-CsvFormat
, andProficyFileCollectorCSV
- dataSource
- The data source you are using for time series data. This parameter is optional. If provided, overrides the default data source defined in the configuration file. For example,
predixtss.PredixTSS
is a time series data source. - 200
- On successful ingestion, a 200 OK message appears.
Ingest Time Series Data
Before You Begin
- Time series data stored JSON, ZIP or CSV file format.Note: The maximum file size per ingestion is 50MB.Make sure that the time stamp provided in the CSV file is in the YYYY-MM-DDTHH:MM:SS.000 format.
- Supported numeric, string, and Boolean tag values.
- OAuth token used to ingest time series data.Important: Make sure you have a valid, unexpired token. Tokens are client-specific and expire within a specified time. Check the JSON response for the token expiration.
- In the Setup section, obtain the following information:
- Client ID
- Time Series Data ingestion URL
- User name
- Access to a REST client such as Postman or Advanced REST client.
Value | Description |
---|---|
0 | Bad quality. |
1 | Uncertain quality. |
2 | Not applicable. |
3 | Good quality. If you do not specify quality, the default is good (3). |
Procedure
Results
Upon successful request, a 201 created message appears.
Verify Time Series Ingestion
After ingesting time series data using the REST endpoint, you can use HTTP POST
, cURL, or Predix Essentials to verify proper ingestion.
Before You Begin
About This Task
- Use HTTP POST method.
- Use the cURL command to retrieve data.
- Plot tags using the Analysis tab in the Predix Essentials application.
Procedure
Predix Time Series Data Bulk Ingestion
You need to work with the Time Series Data team to ingest Predix time series data in bulk. This module is in limited release.
Stream Time Series Data
To ingest time series data into Predix Essentials using a web socket, a ServiceOps ticket is needed to get the credentials to enable time series data streaming. To perform this task, do the following:
Procedure
- File http://sc.ge.com/*apmtimeseriesstreaming to request information to enable data streaming for your tenant. The ticket provides zone ID, web socket URL, scope, client ID, and secret.
- Follow the https://www.ge.com/digital/product-documentation to initiate web socket streaming.