Generate Customer Insights Based on Transaction Data

This example demonstrates how to use the Feature Synthesis Snap to enrich a customer dataset by generating features from a related transaction dataset.

The pipeline combines customer and transaction datasets using the Feature Synthesis Snap. It automatically synthesizes features such as total purchase amount and item count per customer by joining on the common $customer_id field.


Customer and Transaction Datasets Preview

Download this pipeline.

  1. Configure the CSV Generator Snaps to generate base and reference datasets.

    The Customers dataset contains:

    • $customer_id
    • $firstname
    • $lastname
    • $create_time

    The Transactions dataset contains:

    • $transaction_id
    • $customer_id
    • $source
    • $num_item
    • $total
  2. Connect each CSV Generator Snap to a Type Converter Snap to normalize data types.

    Correct data typing is required for the Feature Synthesis Snap to detect relationships and generate features accurately.

  3. Configure the Feature Synthesis Snap with the following settings:
    • Base view: customer
    • Reference view: transaction
    • Join field: $customer_id

    The Snap identifies one-to-many relationships and synthesizes aggregated features from the transaction dataset per customer.


    Feature Synthesis Snap Settings

  4. Review the output from the Feature Synthesis Snap.

    The Snap appends new fields to each customer record, such as:

    • Total number of transactions
    • Sum of $total
    • Average $num_item per transaction

    Feature Synthesis Output


    Feature Synthesis Output

    A JSON-formatted preview is also available to inspect the complete feature set per customer.


    Feature Synthesis Output in JSON

To successfully reuse pipelines:
  1. Download and import the pipeline in to the SnapLogic Platform.
  2. Configure Snap accounts, as applicable.
  3. Provide pipeline parameters, as applicable.