graph kpis
Calculate graph KPI snapshots from a local RDF export and generate WordLift API payloads.
Usage
worai graph kpis calculate <file> [--website-host <host>] [--graph-host <host>] [--builtin-shape <name>] [--exclude-builtin-shape <name>] [--shape <file>] [--no-builtin-shapes] [--depth <n>] [--issue-level warning|error] [--shacl-workers <n>] [--memory-mode auto|full|streaming] [--max-full-graph-bytes <bytes>] [--rdf-error-policy fail|repair-iris] [--output <file>]worai graph kpis payload <file> [--snapshot-date YYYY-MM-DD] [--website-host <host>] [--memory-mode auto|full|streaming] [--max-full-graph-bytes <bytes>] [--rdf-error-policy fail|repair-iris] [--output <file>]
Notes
- Requires
wordlift-sdk>=8.3.6. <file>accepts any graph format supported by the SDK graph loader, including Turtle and JSON-LD.calculatewrites the detailed KPI JSON, including graph totals, URL coverage, duplicate URL groups, rich snippet candidate counts, graph topology, and URL-rooted schema compliance.payloadwrites the numeric-only WordLift API snapshot payload for the selected date.--snapshot-datemust useYYYY-MM-DD; when omitted, the current UTC date is used.--website-hostscopes website URL coverage and duplicate URL KPIs to the customer website host.--graph-hostmarks graph dataset hosts as internal when computing broken internal edges; repeat it for multiple hosts.--depthcontrols subgraph expansion for URL-level SHACL compliance. The default is1.--issue-level warning|errorcontrols whether warnings count as compliance failures. The default iswarning.--no-builtin-shapesruns only shapes passed with--shape, useful for fast scheduled KPI gates.--shacl-workersparallelizes URL-level SHACL validation.--memory-mode auto|full|streamingcontrols graph KPI memory behavior.autouses full mode for files up to--max-full-graph-bytes, then uses streaming partial mode for large N-Triples, Turtle, and RDF/XML files.--max-full-graph-bytesdefaults to268435456; large Turtle and RDF/XML files are converted to temporary N-Triples before streaming partial KPIs.--rdf-error-policy fail|repair-iriscontrols RDF parser recovery. The defaultfailkeeps strict parsing;repair-irisonly repairs invalid percent escapes inside Turtle IRI tokens before temporary N-Triples conversion.--outputwrites the API payload forpayload; it writes the detailed KPI JSON forcalculate.
Examples
worai --profile acme graph kpis calculate ./acme-export.ttl --website-host www.example.com --output graph-kpis.jsonworai --profile acme graph kpis payload ./acme-export.ttl --snapshot-date 2026-06-29 --website-host www.example.com --output graph-kpi-payload.json