About sequences
An asset can have one or more sequences connected to it. You can analyze and visualize sequences to draw inferences from the data, for example, to visualize the expected performance of a generator given its load. Another common way to use sequences is to store large amounts of data index of which isn’t linked to time. A row is a piece of information associated with a row number. Each row has a number of columns, each containing an integer, floating point, or string value. When you create the sequence, you define the column types, and each sequence can have up to 200 columns. The rows are identified by their row number, a searchable positive 64-bit integer. You can’t search by other columns than the row number. The rows don’t have to be consecutive or start at a specific number. Typical use cases for sequences include:- Storing and retrieving an entire curve with an x-y dependency. In this case, use two floating-point columns so that the integer type on the row number doesn’t restrict you..
- Storing a log based on distance or depth, with information in columns of different types for each entry. If you store the distance or depth as the row number (an integer), you may lose precision but can search for all events that occurred at a particular distance or depth.
Create a sequence
To create a sequence, you need to define the columns. It’s optional, but highly recommended, to give the sequence itself anexternalId. For columns, specify an externalId and a valueType.
This example request creates a sequence:
Add rows to a sequence
To add rows to a sequence, you need to specify the sequenceid or externalId along with a list of the columns you are inserting data into.
For example, to insert two rows in the sequence created in the previous example, use:
Retrieve rows from a sequence
To get the rows from a sequence, you can use theexternalId or the id of the sequence.
Optionally, specify the columns you want to retrieve. The default is to return all columns.
For example, to get the first 5 rows from a sequence by using the externalId, in this case performance_curve, use the request:
-
endis exclusive. Even if you specify a higher limit, the request returns a maximum of five rows. - Unlike the endpoints for creating sequences and inserting rows, you can only request rows from a single sequence here.
- We skip rows where all column values are null/missing.
Add (or modify) columns to a sequence
To add columns to a sequence, you need to use the sequences update endpoint. This endpoint can also remove or modify existing columns. Data in removed columns are lost, whereas data in new columns default to null. You can modify the name, externalId, description, or metadata fields. To modify and change the data type, you need to delete and recreate the column. Modification won’t affect the default ordering of columns. For example, to update the metadata and externalId of a column, remove and add a column, use the request:Paginate retrieved rows
When you get too many rows, you can use cursors to paginate through the results. For example, to get a single specific column from all rows with row numbers between 0 and 999999, use the request:10000 is the maximum limit per request.
cursor field changed to the value returned in nextCursor.