Skip to content

Getting Started

This section walks through the shortest path from a clean CAP app to a working federation — delegation, replication, and cache, one at a time.

PageWhat you'll do
InstallationInstall the plugin and its peer dependencies.
First DelegationAnnotate a consumption view with @federation.delegate and forward OData queries to a remote service.
First ReplicationAnnotate a consumption view with @federation.replicate and sync remote data into the local DB on a schedule.
First CacheAdd caching to a delegate — response cache (cds-caching) or entity cache (SQLite snapshot).

Patterns

Once the basics click, these task-focused pages show how local and remote data combine in real scenarios. Each page mirrors behavior that is covered by tests in packages/cds-data-federation/test/integration/ and packages/cds-data-pipeline/test/integration/.

PageWhen to reach for it
Joining Local with RemoteA local entity (reviews, bookmarks, notes) references a federated one. Covers cross-service $expand, navigation, and $filter.
Extending Remote with LocalA federated entity needs local-only children (bookmarks, tags, approval status). The reverse direction of the page above.
Cross-Provider MashupOne local entity stitches data from two different remote services in a single response.
Mixing Delegate and ReplicateLive data via delegate, reference data via replicate — both strategies in one service.
Local Analytics over Replicated DataSQL aggregations, joins, DISTINCT, $apply over replicated remote tables.

!!! tip "Prefer learning from runnable examples?" The root examples/ folder contains four servers you can boot in a single command (npm run examples:start) with Fiori Elements UIs aggregated in a launchpad. Every tile maps to one of the getting-started scenarios.

For focused, single-capability apps (one per strategy), see the [`packages/cds-data-federation/examples/`](https://github.com/mikezaschka/cds-data/tree/main/packages/cds-data-federation/examples) catalogue — numbered demos for delegate, replicate, cross-service expand, caching, cross-provider mashup, OData V2, HCQL, and MCP.

Released under the MIT License.