Build a Consumer Data Product
This guide walks through building a consumer data product end to end. You will start from the desired output shape, select upstream sources, configure projection logic, and publish the consumer data product. Once published, you can configure delivery interfaces to serve data externally.
Demand-Driven Modeling
Consumer data products use a demand-driven modeling approach: you begin with the shape your consumers need and work backward to determine which source data products provide the inputs and how to project them.
Define the desired output shape for a customer-360 consumer product:
{
"name": "customer-360",
"kind": "consumer",
"schema": {
"type": "object",
"properties": {
"customer_id": { "type": "string" },
"full_name": { "type": "string" },
"lifetime_value": { "type": "number" },
"last_order_date": { "type": "string", "format": "date-time" },
"segment": { "type": "string", "enum": ["vip", "regular", "at-risk"] }
}
}
}
Identify Upstream Sources
Working backward from this shape, identify which source data products supply each field:
customer_idandfull_name— from thecustomerssource data productlifetime_valueandlast_order_date— aggregated from theorderssource data productsegment— derived via enrichment logic applied to the aggregated values
This backward mapping defines the lineage from consumer to sources.
Create the Consumer Data Product
Use the CLI to create the consumer data product and establish its lineage to upstream sources:
loxtep data-products create \
--name "customer-360" \
--domain-id <domain-uuid> \
--kind consumer \
--description "Unified customer view aggregating orders and profile data"
Configure the Delivery Workflow
Consumer data products use the data-product-consumption workflow type (referred to as a "delivery workflow" in the UI). This workflow orchestrates derivation from upstream sources rather than raw event ingestion.
Create the delivery workflow:
loxtep workflows create \
--name "customer-360-derivation" \
--project-id <project-uuid> \
--workflow-type delivery \
--description "Derives customer-360 from customers and orders sources"
Note: The workflow type value is
'delivery'in code. In user-facing contexts this is a "Delivery Workflow."
Define Projection Logic
The projection logic specifies how upstream source data is transformed into the consumer data product's shape. Loxtep supports four derivation strategies: aggregation, enrichment, filtering, and entity resolution (golden records).
Aggregation
Aggregate order data to compute lifetime value and last order date:
import { LoxtepClient } from '@loxtep/sdk';
const client = await LoxtepClient.fromWorkspace();
await client.build.workflows.create({
project_id: 'proj_analytics',
domain_id: 'domain_commerce',
name: 'customer-360-aggregation',
workflow_type: 'enrichment',
});
Then add transformation nodes to the workflow graph using MCP or the CLI:
{
"operation": "patch_workflow_graph",
"project_id": "proj_analytics",
"workflow_id": "wf_customer360",
"operations": [
{
"op": "add_node",
"node": {
"id": "aggregate_orders",
"type": "transform",
"config": { "type": "aggregation", "source": "dp_orders", "groupBy": "customer_id" }
}
}
]
}
Enrichment
Apply business logic to enrich the aggregated data with a customer segment.
Author transformation nodes in the checked-in workflow bundle, then run
loxtep lint and loxtep push. The SDK does not expose a standalone
createTransformation method.
Entity Resolution (Golden Records)
When multiple source systems hold overlapping customer records, add an entity resolution transformation to the workflow bundle. Declare the source products, match keys, and merge strategy in that node's configuration.
Filtering
Exclude records that do not meet quality thresholds with a filtering transformation in the same workflow bundle. Validate the complete graph rather than creating transformations as disconnected resources.
Record Lineage
Loxtep automatically records the derivation relationship as lineage from upstream source data products to the consumer. This lineage is visible in the catalog and used by governance tools for impact analysis.
Verify lineage was recorded correctly:
{ "operation": "get_lineage_impact", "data_product_id": "<data-product-uuid>" }
The output shows that customer-360 derives from customers and orders, with the specific transformation chain documented for each field.
Configure Delivery
Once your consumer data product is published and producing data, configure delivery interfaces to serve data to external systems. Loxtep supports these delivery patterns:
- Webhook — push events to an endpoint on change
- API Endpoint — generate a queryable REST API
- Export — bulk extract (CSV/Parquet/JSON) on schedule
- SQL Query — query the table. Metabase, Tableau, Power BI, and Looker read through a SQL grant on that table or a shaped SQL table
- Event Stream — subscribe to real-time changes
To land data in your own warehouse instead, see Bring your own warehouse for ingesting directly into it or binding a table that's already there.
For step-by-step setup instructions for each pattern, see Configuring Delivery.
For an overview of when to use each pattern, see Delivery Patterns.
Readiness Stage and Cross-Project Access
Consumer data products typically operate at the In Progress or Ready readiness stage. To be consumed by a project in the same domain, In Progress is sufficient (stable entity IRIs, glossary terms bound, entity resolution enabled). To be consumed by a project in a different domain, it must reach Ready — all schema fields bound to ontology concepts and relationships navigable in the Knowledge Graph.
Mark it Ready
Request governance sign-off to mark the product Ready:
loxtep data-products promote dp_customer360 --target gold
Once Ready, the consumer data product is discoverable and accessible across project boundaries.