Skip to content

cds-data CAP plugins

Composable SAP CAP plugins — federation for remote services, a shared pipeline engine, and materialization for local snapshots.

cds-data-federation

Annotate consumption views to proxy remotes live or sync on a schedule.

@federation.delegateLive proxy at request time
@federation.delegate
entity Partners as projection on remote.A_BusinessPartner {
    BusinessPartner as ID,
    BusinessPartnerFullName as name
};
@federation.replicateScheduled sync into local DB
@federation.replicate: { schedule: 600000 }
entity ReplicatedPartners as projection on remote.A_BusinessPartner {
    BusinessPartner as ID,
    BusinessPartnerFullName as name
};

cds-data-materializationExperimental

Persist scheduled rollups from group-by projections. Experimental — not yet released.

@materialize.snapshot: { source: { service: 'db' } }
entity DailyRevenue as projection on Orders {
  key customerId,
      sum(amount) as totalAmount
}
group by customerId;

cds-data-pipeline

Register pipelines programmatically — tracker, retry, and management API.

await pipelines.addPipeline({
  name: 'Products',
  source: { service: 'northwind', entity: 'Products' },
  target: { entity: 'my.app.LocalProducts' },
  schedule: 600_000,
});

Architecture

Three npm packages compose in one CAP app. cds-data-federation is the usual entry point when integrating remote services; cds-data-pipeline is the engine underneath for scheduled runs; cds-data-materialization covers local aggregate snapshots.

Delegate forwards reads (and optional writes) to the remote at query time. Replicate and snapshot register scheduled pipelines that move data through the engine into your database. Federation optionally layers cds-caching on delegate or replicate; federation and materialization both peer-require the pipeline package.

New to the suite? Start with Concepts — the shared terminology, architecture, and how the three plugins fit together.

Documentation

PackageWhat it is
cds-data-federation@federation.delegate and @federation.replicate on consumption views; composes the pipeline for replicate.
cds-data-materialization Experimental@materialize.snapshot on group by projections; composes the pipeline for query-shape snapshots. Not yet released.
cds-data-pipelineApplication-layer READ → MAP → WRITE engine — tracker, retry, management API, event hooks.

Install from npm: cds-data-federation, cds-data-pipeline. cds-data-materialization is experimental and not yet published.

CDS 10 & AI integration

These plugins track CAP's June 2026 (cds 10) release. All three install on both CDS 9 and CDS 10 (@sap/cds >= 9). Two new CAP capabilities compose naturally with them:

  • HCQL (CQL over HTTP) — for CAP-to-CAP integration, CAP's remote client auto-selects HCQL over OData. @federation.delegate and @federation.replicate benefit automatically, with no annotation change.
  • MCP (@cap-js/mcp) — expose federated entities to AI agents through the Model Context Protocol. Because federation handlers run on the application service, MCP query calls flow through the same delegate/replicate path as OData.

See CDS 10, HCQL and MCP for the full picture, or the deep dives in Service query execution and MCP integration.

Released under the MIT License.