Docs / Capability guide

Reporting, exports and scheduled delivery

Choose metrics and dimensions, run a report, and export CSV.

All capabilities · Related guide · Agent prompt for this capability

When to use this example

Use this example when a client, finance team or analyst needs a repeatable report for a defined period. Explicit dates and metrics make it possible to compare runs and explain which data went into the file.

What the example gives you

The exporter writes executed report rows to CSV and preserves decimal values. It fails if the query did not execute; an executed query with no rows produces a header-only file. Scheduling and delivery are separate API steps.

Before you start

A tenant API key with reporting access, a configured reporting warehouse, and a writable output location.

Run the example

Download integration-recipes

Extract the archive and follow README.md for setup, commands, and expected results. Start with report_export.py. Local tests use sample data.

Python tools accept --help. To connect to your workspace, supply the deployment URLs, credentials and resource IDs required by the tool.

Connect it to your application

  1. Load getReportsCatalog and select only available metrics/dimensions for the requested data tier (temperature) and time interval (grain). Use an explicit reporting period and time zone; do not sum incompatible currencies.

  2. Run report_export.py with a saved ReportRunRequest JSON file. The synchronous runReport response includes executed: executed=false means the query was prepared but did not run. Treat this as an export failure.

  3. Save reusable report definitions with createReportConfig. Configure scheduled reports and export destinations only after confirming recipients, permissions and storage; inspect export job state rather than treating blob_uri as a public download URL.

Check the result

The CSV header matches the selected dimensions and metrics, decimal values remain exact, and transport/query failures exit nonzero. Empty executed results are valid; unexecuted queries are not.

API operations