1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# OData source (#512) with server-side incremental push-down (#513).
#
# The `odata:` block makes the REST source speak OData natively — it follows
# `@odata.nextLink` paging, unwraps the `$.value` envelope, and renders the
# `$select` / `$filter` query options. `replication_bind` then pushes the stored
# bookmark into the request as an OData `$filter` so the server returns only rows
# changed since the last run.
#
# faucet validate cli/examples/odata_to_jsonl.yaml
# faucet run cli/examples/odata_to_jsonl.yaml
#
# Tip: `faucet discover cli/examples/odata_to_jsonl.yaml` reads the service's
# `$metadata` (EDMX) and emits one matrix row per entity set, with typed schemas.
version: 1
name: odata_orders
pipeline:
source:
type: rest
config:
base_url: "https://services.example.com/odata/v4"
auth:
type: bearer
config: { token: "${env:AUTH_TOKEN}" }
odata:
version: v4
entity: Orders
select: [OrderID, CustomerID, OrderDate, Total]
page_size: 500
# Server-side incremental push-down: the bookmark becomes an OData
# `$filter` (`OrderDate gt <bookmark>`). The client-side filter on
# `replication_key` stays on as a safety net.
replication_method: { type: incremental }
replication_key: OrderDate
start_replication_value: "2024-01-01T00:00:00Z"
replication_bind:
into: query
name: "$filter"
template: "OrderDate gt ${bookmark}"
format: iso8601
sink:
type: jsonl
config:
path: ./out/orders.jsonl