Skip to content

Features

What cds-data-federation does today, grouped by capability. Every entry on this page is available in the current release. Annotation syntax and option reference are in Annotations; scenario names follow Cross-Service Scenarios. To decide which strategy fits a given entity — with limitations side by side — see Choosing a Strategy.

Consumption views

The CDS projection on a remote entity defines the schema contract — what fields, what shape, what renames. See Consumption Views for the full pattern catalog.

PatternExampleNotes
Wildcard projectionas projection on remote.X { * }All remote fields projected.
Column restriction + field renamesas projection on remote.X { ID as productId, price as unitPrice }Bidirectional local ↔ remote mapping. $select on the remote is restricted to the projected set.
Excluding columnsas projection on remote.X excluding { modifiedAt }Excluded fields are omitted from $select and absent from responses.
Static where clauseas projection on remote.X where status = 'active'Filter is injected into every remote query for this entity. Composes with client filters.
Entity-level renameentity Suppliers as projection on remote.Customers { … }Project a remote entity under a different local name and domain purpose.

Delegate strategy

Transparent live proxy. Annotate a consumption view with @federation.delegate and the plugin forwards reads to the remote service at request time. Reference: @federation.delegate.

CapabilityWhat it does
Declarative handler registrationAdding @federation.delegate to a projection wires the read handler automatically.
Query translation$select, $filter, $orderby, and $expand are translated through the CDS projection chain so client-side names always refer to the local model.
Column-restricted fetchRequests to the remote only include fields the consumption view projects.
Server-driven pagingWhen a remote caps responses below the client's requested $top (e.g. Northwind's 20-row default), the handler loops $top/$skip until the client is satisfied. @odata.count is preserved.
Full query passthroughArbitrary combinations of $filter / $orderby / $select / $top / $skip / $expand work on any delegate entity, V4 and V2.
Delegated expandSame-remote $expand is handled by CAP's native query translation.
Cross-service expand: local → remoteWhen a local entity $expands to a delegate entity, the plugin batch-fetches from the remote and stitches results — including cross-provider and composite-key cases.
Cross-service expand: remote → localWhen a delegate entity $expands to a local entity, the plugin forwards the remote portion, queries local for the targets, and stitches. $filter / $orderby / $top inside the expand are respected.
Navigation path filters$filter through renamed or cross-service associations (e.g. buyer/name eq 'Acme', or LocalEntity/Name eq 'X' on a delegate with a local backlink) is translated for same-service and both cross-service directions (to-one and lambda).
Cross-service navigationURL navigation across a local/remote boundary — /Reviews(id)/product or /Customers('C001')/bookmarks — is resolved transparently. Supports $select and $filter on the target.
Opt-in CUD forwardingWrites are off by default. Enable all three with writable: true or pick individual flags (create, update, delete). Synchronous — clients get the remote's response.
Error propagationRemote status codes, messages, and context reach the client.

Replicate strategy

Scheduled sync that copies remote data into the local database. Once replicated, queries run fully locally — joinable, aggregatable, offline-capable. Reference: @federation.replicate. Every replicate entity binds to an entity-shape job on cds-data-pipeline; pipeline intent is derived from the config shape (see inference rules).

CapabilityWhat it does
Full syncTruncate (multi-source aware) and replace.
Delta syncThree delta modes: timestamp-based, key-based, and datetime-fields via adapter options.
Streaming batch readsAsync-generator pipeline with configurable batch size. Only projected columns are fetched.
Idempotent writesEvery batch is applied via UPSERT — safe to re-run.
Auto-persistencereplicate entities automatically get @cds.persistence.table: true; no manual table setup.
Pipeline eventsbefore / on / after hooks on PIPELINE.READ, PIPELINE.MAP, PIPELINE.WRITE for custom transformation or filtering logic — see the pipeline event hooks reference.
Rename mapping during MAPField renames from the consumption view are applied during the MAP phase — no per-entity mapping code.
Replicated aspectlastReplicatedAt / lastReplicatedBy are auto-populated on every record.

Caching

Two optional strategies on @federation.delegate (and a rarely useful response cache on replicate). See Integration → Caching.

CapabilityWhat it does
Response cache (strategy: 'response', default)Wraps the remote READ with cds-caching; cache key = full query signature.
Entity cache (strategy: 'entity')On TTL miss, runs cds-data-pipeline to fill a SQLite table with the full projected entity; any READ CQN hits SQLite until TTL. One SQLite file per tenant when data-federation-cache is configured. Falls back to live delegate on errors.
Per-entity TTLcache: { ttl: 60000 } on either strategy.
Tag-based invalidationresponse only — auto-tag federation:<entityName>, static/dynamic/template tags via cds-caching.
Backend flexibilityresponse: in-memory, Redis, HANA, … via cds-caching. entity: primary db or optional cds.requires.'data-federation-cache' SQLite.
Configurable cache servicecache.service selects a cds-caching instance (response only).
Hit / miss metricscds-caching statistics API (response).
Graceful degradationMissing cds-caching → skip response with warning. Missing pipeline/SQLite → skip entity with warning; live delegate continues.

Cross-service scenarios

Summary — see Cross-Service Scenarios for the full scenario reference.

ScenarioSupported
Delegated expandYes (CAP-native).
Cross-service expand: local → remoteYes — including to-many, composite keys, cross-provider, nested expand, $filter / $orderby / $top / $skip inside the expand, and lambda operators.
Cross-service expand: remote → localYes — including per-parent $top limiting.
Cross-service expand: cross-providerYes.
Cross-service navigation: local → remoteYes — $select and $filter on the target supported.
Cross-service navigation: remote → localYes.

CQN safety

CapabilityWhat it does
CQN clone on mutationDelegate handlers clone queries before any modification — changes never leak back into CAP's request pipeline.

Configuration

CapabilityWhat it does
Annotation-drivenZero configuration for standard scenarios — @federation.delegate or @federation.replicate on a consumption view is enough.
Profile-based overridesDifferent settings per CAP environment profile ([development], [production], …) via the native cds.env mechanism.
Sensible defaultsRead-only CUD for delegate; delta mode for replicate; batch size 1000; 10-minute replicate schedule.

Released under the MIT License.