Source Data Products

A source data product is an atomic dataset with kind: source. It represents data ingested from an external system — a database, SaaS API, event bus, or file drop — into the Loxtep platform. Source data products typically sit toward the Raw-to-In-Progress end of the readiness scale and are consumed internally by workflows and consumer data products, and by your AI agents over the hosted MCP server.

What Makes a Data Product "Source"

Source data products have three defining characteristics:

  • Atomic — each source product represents a single coherent dataset from one external system (e.g., "Shopify Orders", "Stripe Payments", "PostgreSQL Customers").
  • Owned — a source product has a clear owner who defines its schema and maintains its quality.
  • Ingestion-oriented — data flows inward from external systems into Loxtep via the ingestion workflow type.

Source vs. Consumer

The key distinction is directionality. A source product ingests data from outside Loxtep into the platform. A consumer data product projects data from inside the platform outward to consumers. Source products are the raw material; consumer products are the refined output.

Ingestion Pathways

Source data products accept data through three mechanisms:

Connectors

Connectors are managed integrations with external systems. Loxtep provides golden-path connectors for common sources (Postgres, S3, webhook, Shopify, Stripe, HubSpot) that handle authentication, pagination, and change detection automatically.

Create a connector and link it to a source data product. For golden-path connectors (Shopify, rest-api, file-transfer), entity selection and ingest configuration run through a guided ingest journey — not a monolithic HTTP ingest shortcut:

  1. Test the connector, then persist entity selection (confirm_connector_entity_selection or equivalent UI flow).
  2. The platform emits connector-ingest-configured and starts one design-ingestion-workflow run per entity (journey id: connector:{connector_id}:entity:{entity}).
  3. Each run provisions an ingestion workflow + raw source data product, deploys it, and starts define-data-product-semantics when deployment bindings exist.
  4. Optional canonical branch: entity-projection-inference → design-enrichment-workflow (save + deploy enrichment) → semantics for the sink enriched data product.

Use loxtep_connect to create the connector, then confirm the selected entities so the platform creates the source products and ingestion workflows:

{
  "operation": "create_connector",
  "connector_type": "shopify",
  "name": "Commerce Shopify",
  "configuration": { "shop": "mystore.myshopify.com" }
}

SDK Ingestion

The TypeScript and Python SDKs allow applications to push data programmatically:

import { LoxtepClient } from '@loxtep/sdk';

const client = await LoxtepClient.fromWorkspace();

const writer = await client.get_writer('orders_raw');
writer.write({
  id: 'evt-1',
  payload: {
    order_id: 'ord_12345',
    customer_email: 'buyer@example.com',
    total_amount: 4999,
    created_at: new Date().toISOString(),
  },
});
await writer.close();

Webhooks

External systems can push events directly to a source product's webhook endpoint. Loxtep validates incoming payloads against the product's schema and rejects malformed events.

Schema Definition

Every source data product declares a schema that defines the structure and constraints of accepted data. Schemas use JSON Schema with Loxtep extensions for semantic annotations.

A schema defines:

  • Field names and types — the structural contract for incoming data.
  • Required fields — which fields must be present on every record.
  • PII annotations — fields marked x-pii: true trigger governance policies automatically.
  • Semantic bindings — at In Progress and above, fields bind to glossary terms and ontology concepts.

Schema Validation

Incoming data is validated against the schema at ingestion time. Records that violate the schema are rejected and logged as validation errors. This ensures the source product maintains a consistent shape regardless of upstream system behavior.

The Ingestion Workflow

Source data products use the ingestion workflow type to orchestrate the path from raw event to stored record. The ingestion workflow handles:

  1. Reception — accepting data from the connector, SDK, or webhook.
  2. Validation — checking the payload against the schema.
  3. Transformation — applying any configured field mappings or enrichments.
  4. Quality checks — running quality rules (e.g., "total_amount must be non-negative").
  5. Storage — persisting the validated record in the data product's backing store.

Quality Rules

Quality rules attach to source data products and run inline during ingestion. Rules define constraints that go beyond schema validation:

loxtep quality-rules create --file ./positive-amount-rule.json

Failed records are flagged or rejected depending on the rule's configured action (warn vs. block).

Semantic Enrichment

Source data products begin their lifecycle Raw — raw ingested data with system-native identifiers and no ontology bindings. As you enrich the product, it progresses through the readiness stages:

  • Raw — raw data as-is from the external system.
  • In Progress — stable entity IRIs minted, glossary terms bound to fields, entity resolution enabled.
  • Ready — divergent fields covered by enterprise overrides; relationships navigable in the Knowledge Graph.

Moving from Raw to In Progress requires a review; moving to Ready requires a governance sign-off.

Lifecycle Status

A source data product carries a lifecycle status independent of its readiness stage:

StatusMeaning
draftUnder development, not yet accepting production data
activeLive, accepting data, available for use
deprecatedMarked for removal, consumers should migrate
archivedRetired — there is no separate "retired" state; archiving is how a data product is retired

Lifecycle status is orthogonal to readiness stage — a product can be active at any stage from Raw to Ready.

Monitoring and Observability

Track the health of source data products through:

  • Queue depth — how many events are awaiting processing.
  • Throughput — events ingested per second.
  • Validation errors — records rejected by schema or quality rules.
  • Latency — time from event reception to storage.

Query ingestion metrics via the CLI:

loxtep queue info dp_orders

Internal Use

Source data products are used internally within the platform by:

  • Workflows — transformations and enrichments that read from source products.
  • Consumer data products — composed projections that derive from one or more source products via projection logic.
  • AI agents — connected over the hosted MCP server, reading governed data within their granted access.
  • Knowledge Graph — once Ready, relationships are queryable via RDF/SPARQL.

Delivery

Source data products can have delivery interfaces attached directly — you do not need to create a consumer data product first to deliver data externally. If the source data's shape already matches what downstream systems need, attach a delivery interface directly to the source product.

Creating a consumer data product is only necessary when you need to reshape, combine, or enrich data before it leaves the platform. For straightforward delivery of source data as-is, configure delivery directly from the source product's Delivery tab in the data product detail page.

Available Delivery Patterns

Source data products support these delivery patterns:

PatternMechanismLatencyBest For
WebhookPush to HTTP endpoint on data changeReal-timeEvent-driven integrations
API EndpointGenerated REST API for on-demand queryOn-demandApps, services, dashboards
ExportScheduled or one-time bulk extract (CSV/Parquet/JSON)BatchReports, data sharing, compliance
SQL QuerySQL on the queryable table or a shaped SQL tableOn-demandAnalysis. BI tools read through a SQL grant
Event StreamReal-time change subscriptionReal-timeStreaming consumers, CDC

For the full pattern reference including trade-offs, configuration options, and when to use each, see Delivery Patterns.

Configuring Delivery on a Source Data Product

To add a delivery interface to a source data product:

  1. Open the source data product detail page.
  2. Select the Delivery tab.
  3. Choose a delivery pattern from the pattern picker (or click Add in an existing pattern section).
  4. Complete the pattern-specific configuration wizard.

Example — adding webhook delivery via MCP (save_workflow_bundle with workflow_type: "delivery" and a Target connection, then deploy_workflow):

{
  "operation": "save_workflow_bundle",
  "project_id": "proj_commerce",
  "dry_run": true,
  "files": {
    "workflows/wf_orders_webhook/workflow.json": {
      "workflow_id": "wf_orders_webhook",
      "workflow_type": "delivery",
      "name": "Orders webhook delivery"
    },
    "workflows/wf_orders_webhook/connections/conn_webhook_target.json": {
      "connection_id": "conn_webhook_target",
      "role": "Target",
      "connector_id": "conn_https_webhook",
      "configuration": {
        "endpoint_url": "https://downstream.example.com/events",
        "method": "POST"
      }
    }
  }
}

Then deploy the workflow:

{
  "operation": "deploy_workflow",
  "workflow_id": "<workflow-uuid>",
  "instance_id": "<instance-uuid>"
}

Common Scenarios for Direct Source Delivery

  • Raw event forwarding — push ingested events to a webhook endpoint for real-time processing by downstream services.
  • Data sharing — export the source product as-is to partners or compliance archives without transformation.
  • BI access — connect a BI tool directly to the source product for exploration and dashboarding.
  • CDC replication — stream changes to another system via Event Stream for real-time sync.

When to Use a Consumer Data Product Instead

If you need to reshape, combine, or enrich data before delivery, build a consumer data product first using projection logic, then configure delivery on the consumer product. This keeps the source product's schema stable and clean while allowing the consumer product to tailor the shape for specific downstream needs.

See Configuring Delivery for step-by-step setup instructions for each delivery pattern.

Creating a Source Data Product

The MCP tool surface provides full lifecycle management for source data products:

{
  "operation": "create_data_product",
  "project_id": "proj_commerce",
  "name": "orders",
  "kind": "source"
}

See the Build Your First Data Product guide for a complete walkthrough of creating, configuring, and deploying a source data product.