Skip to main content
During configuration, a mapping is defined from the connected Dataset to the target Destination. This mapping is referred to as a Stream. This Stream is orchestrated by Prequel Import and resiliently batches, transforms, delivers records to the connected Destination.

Stream configuration options

FieldTypeRequiredDescription
namestringYesA descriptive name for the Stream.
destination_iduuidYesThe ID of the Destination where data will be delivered.
provider_iduuidYesThe ID of the Provider that owns this Stream.
source_querystringYesA SQL query that selects and transforms data from the source Dataset. Use row_data.* to access fields from the source.
lineage_column_namestringYesThe column name used to uniquely identify records for change detection and deduplication.
mappingsarrayYesAn array of field mappings that transform source data to target fields.

Mappings

Each mapping object defines how a source field or expression maps to a target field in the Destination.
FieldTypeRequiredDescription
source_expressionstringYesA field name or expression to extract/transform data from the source. Supports functions like concat(), string(), date_add(), and literal values.
target_fieldstringYesThe field name in the Destination where the value will be written.

Example

{
  "name": "Stream to Destination",
  "destination_id": "00000000-0000-0000-0000-000000000000",
  "provider_id": "00000000-0000-0000-0000-000000000000",
  "source_query": "SELECT DISTINCT row_data.id as id, row_data.email as email, row_data.given_name as given_name, row_data.surname as surname FROM source_table;",
  "lineage_column_name": "id",
  "mappings": [
    {
      "source_expression": "concat(given_name, ' ', surname)",
      "target_field": "name"
    },
    {
      "source_expression": "email",
      "target_field": "email"
    },
    {
      "source_expression": "'EST'",
      "target_field": "tz"
    },
    {
      "source_expression": "date_add(now(), 3, 'days')",
      "target_field": "valid_until"
    },
    {
      "source_expression": "string(id)",
      "target_field": "fingerprint"
    }
  ]
}