Skip to main content
Measure your trials with Data Export SQL or, without SQL, with in-app reports. Both assume the tagging and conventions from the overview.

Definitions

Data Export SQL

Filter environment_type in every query. Sandbox and production data share a single export destination, so scope each query to environment_type = 'PRODUCTION'.
Notes that apply to every query:
  • Contract, balance, and transition tables are daily snapshots (snapshot_id, updated_at = export time), so keep only the most recently exported row per id. Customer, alert, and invoice tables are incremental. See data availability for the transfer frequency and freshness of each table.
  • JSON columns export as strings: use json_extract_scalar (Trino/Athena), JSON_VALUE (BigQuery), or PARSE_JSON(...):path::string (Snowflake).
  • Custom fields live under metadata.custom_fields, not a custom_fields column (except customer.custom_fields, which is a real column).
  • Table and column names follow the database reference; a modelled warehouse layer on top may rename or split schemas. More query patterns are in the SQL cookbook.
(Retention here means “billed for usage in month N”; for usage-based retention independent of billing, use line_item.quantity by product_id instead.)

Without Data Export

Data Export is an add-on. These in-app reports cover the essentials: For real-time per-customer state, POST /v1/contracts/customerBalances/list returns the credit with custom_fields, access_schedule, ledger, and balance.