The Flow CSV File Streaming Consumer allows you to push Flow Measure data into a CSV File, by specifying your own delimiters and payload definition for the CSV file structure. This can be used when integrating to other systems where staging to files is required.
Measure data, model attributes and event context can be automatically inserted into a custom CSV file based on new data that gets calculated within Flow.
A file retention period can also be specified, to keep files up until a certain age threshold.
Configuring a CSV File Streamer Consumer
To create a connection using a CSV File Streamer Consumer, right-click on Data Consumers, and select “New", Streaming”.
This will list the "CSV File" Consumer:
Select The “CSV File” consumer to open its editor:
,
The following properties need to be set to configure the CSV Consumer.
|
Name that descriptively identifies the consumer. |
|
Location of the file path to the CSV File. File will be created if it does not exist. Format of the file name can be made dynamic by specifying a "Timestamp" placeholder. Placeholder is specified as [Timestamp('yyyy-MM-dd')]. The datetime format is based on .Net datetime format standards. |
|
Character to use as the delimiter for the fields. |
|
Days to keep the files available in the specified folder location. |
|
JSON Array object to specify the structure of the CSV file. A list of placeholders to be used will be listed below in the document. Example payload can be [{"name":"[MeasureName]","Value":"[MeasureValue]","Start":"[PeriodStart]","End":"[PeriodEnd]"}]. All parameters denoted in square brackets will be replaced by the Flow Integration Engine. |
After configuring the properties, save the consumer. the consumer will be assigned to your default platform and will be deployed.
Configure a Measure to Stream
From your Flow model, select and open the configuration of a measure that you want to push to the CSV File. Dragging the data consumer onto the specific context in the Integration section of the measure will link the CSV file to the measure to be pushed.
Please review the list below all the placeholders that is available to be used in the payload definition:
Placeholders available for the payload definition:
|
This will be replaced by the value of the model attribute configured on the measure based on the name of the model attribute. If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the value of the description of the measure. If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the string value of the measure’s interval type (Minutely, Hourly, Shiftly, Daily etc.). If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the string value of the name of the measure’s parent entity. This can be either a metric or an event. If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the integer value of the measure’s unique ID. |
|
This will be replaced by the string value of the measure’s name. If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the string value of the measure’s unit of measure that has been configured. If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the string value of the measure’s hierarchical name up-to metric of event level. If no value is found, it will be replaced by a blank string (""). |
|
This will be replaced by the double representation of the measure’s value per time period interval. If no value is found, it will be replaced by NULL ("NULL"). |
|
This will be replaced by the most recent timestamp the measure value had been changed. |
|
This will be replaced by the most recent timestamp, in UTC, the measure value had been changed. |
|
This will be replaced by the Date Time value of the current time period’s end time being processed. |
|
This will be replaced by the Date Time value of the current time period’s start time being processed. |
|
This will be replaced by the UTC Date Time value of the current time period’s end time being processed. |
|
This will be replaced by the UTC DateTime value of the current time period’s start time being processed. |
|
This will be replaced by the integer representation of the measure’s value quality score, based on the OPC quality code as received from the data source for that time period interval. |
|
This will be replaced by the integer representation of the duration, in milliseconds, of the particular time period interval. |
|
This will be replaced by the integer representation of the current version of the value. |
|
This will be replaced by the integer representation of the unique timeperiod id of the specific time period interval. |
|
This will be replaced by the integer representation of the unique measure value ID of the specific time period interval. |
|
If event context is added to the measure, each of the attribute values will be replaced for the current time period interval. |
|
If event context is added to the measure, each of the attributes will be replaced for the current time period interval. |
|
All values will be pushed to the consumer. This include all versions, not just the latest value. The preferred flag will be set as a Boolean (true/false) to indicate if the current value in the value set is the preferred value or not. |
|
If the current version had been changed manually by a specific user, the username ID will be replaced with the unique ID of the user configured in Flow that modified the value. If no user made changes to the value, it will be replaced by a blank string (""). |
- Date time options available include:
- PeriodEnd - Formatting can be applied. i.e [PeriodEnd("yyyy-DD-mm")]
- PeriodStart - Formatting can be applied. i.e [PeriodStart("yyyy-DD-mm")]
- PeriodEndUTC - Formatting can be applied. i.e [PeriodEndUTC("yyyy-DD-mm")]
- PeriodStartUTC - Formatting can be applied. i.e [PeriodStartUTC("yyyy-DD-mm")]
- Now - Formatting can be applied. i.e [Now("yyyy-DD-mm")]
- NowUTC - Formatting can be applied. i.e [NowUTC("yyyy-DD-mm")]
- MeasureValueDateTime - Formatting can be applied. i.e [MeasureValueDateTime("yyyy-DD-mm")]
- MeasureValueDateTimeUTC - Formatting can be applied. i.e [MeasureValueDateTimeUTC("yyyy-DD-mm")]