Skip to main content

Data export

Metronome can send your sandbox and production data directly to your data warehouse, giving you the flexibility to build reports and dashboards with your favorite data tools.

Exporting data from Metronome is a simple process requiring a one-time setup of your data destination at https://app.metronome.com/settings/general/data-export. After the initial export, your data is updated automatically at least once a day (depending on the table).

Get started

To set up your destination data warehouse, contact your Metronome representative.

Supported destination types

Metronome supports data export to the most common data warehouses, databases, and object storage providers. We continue to add new providers; if your preferred vendor is not listed below, contact your Metronome representative.

Data warehouse

  • BigQuery
  • Clickhouse
  • Databricks
  • Redshift
  • Snowflake

Database

  • Athena
  • MySQL
  • Postgres
  • SingleStore

Object storage

  • Google Cloud Storage
  • S3

The data appears in this folder structure:

<bucket_name>/<folder_name>/<table_name>/dt=<transfer_date>/<file_part>_<transfer_timestamp>.parquet

Where:

  • <bucket_name> and <folder_name> are provided during destination configuration.
  • <table_name> is the name of the table being transferred (see the schema tables below for examples).
  • <transfer_date> and <transfer_timestamp> are generated at transfer time and based on the transfer's start time. <transfer_date> is of the form 2025-01-01, while <transfer_timestamp> is of the form 20250102150405.
  • <file_part> is a monotonically increasing integer for a given timestamp, and does not carry any special meaning.
Append-Only

Object storage destinations listed above export files as an append-only log with at-least-once semantics. There will be rows with the same primary key in multiple files because of updates to the row or transfer retries. Metronome customers need to handle these appropriately by using the most recent data for each row.

Data availability

Metronome can export these types of sandbox and production data:

Metronome dataTable nameTransfer Frequency†Average Freshness††Table Type
Alertsalert24 hours8 hoursIncremental
Alertscustomer_alert_history24 hours8 hoursIncremental
Finalized Invoicesinvoice24 hours8 hoursIncremental
Finalized Invoicesline_item24 hours8 hoursIncremental
Productproduct24 hours8 hoursIncremental
Chargescontracts_scheduled_charges24 hours8 hoursSnapshot
Contractscontracts_contracts24 hours8 hoursSnapshot
Contractscontracts_commits24 hours8 hoursSnapshot
Contractscontracts_balances24 hours8 hoursSnapshot
Contractscontracts_usage_filters24 hours8 hoursSnapshot
Contractscontracts_billing_provider_configuration24 hours8 hoursSnapshot
Contract Modificationscontracts_overrides24 hours8 hoursSnapshot
Contract Modificationscontracts_transitions24 hours8 hoursSnapshot
Contract Modificationscontracts_amendments24 hours8 hoursSnapshot
Contract Pricingcontracts_rate_cards24 hours8 hoursSnapshot
Contract Pricingcontracts_rate_card_entries24 hours8 hoursSnapshot
Contract Pricingcontracts_product_list_item_versions24 hours8 hoursSnapshot
Customerscustomer24 hours8 hoursIncremental
Customerscustomer_billing_provider_configuration24 hours8 hoursIncremental
Draft Invoicesdraft_invoice24 hours8 hoursSnapshot
Draft Invoicesdraft_line_item24 hours8 hoursSnapshot
Eventsevents24 hours8 hoursIncremental
Invoice Breakdownsinvoice_breakdowns_invoices24 hours8 hoursSnapshot
Invoice Breakdownsinvoice_breakdowns_line_items24 hours8 hoursSnapshot

† Transfer frequency indicates the frequency at which new records get sent to your destination. †† Average Freshness indicates the average delay between when data is generated in Metronome and when the data appears in your destination.

Incremental data exports

Data exports of incremental tables contain only the rows of data that have changed since the last export. Use the updated_at column to pull the latest updates.

Alerts

Includes alerts and the history of customer alerts triggered.

Tables

Example 1 - Fetch alerts with webhooks enabled

SELECT id, name, alert_type, threshold FROM alert WHERE webhooks_enabled = TRUE AND disabled_at IS NULL;

Example 2 - Fetch count of alerts by day over the last week

SELECT DATE_TRUNC("DAY", ah.created_at) AS alert_date, alert.name, COUNT(alert.id) AS triggered_count
FROM customer_alert_history ah
JOIN alert
ON ah.alert_id = alert.id
GROUP BY 1, 2
ORDER BY 1;

Finalized Invoices

Includes all invoices to customers that have been finalized or voided. No further changes can be made to these invoices or their corresponding line items.

Tables

Example 1 - Fetch monthly invoice totals

SELECT DATE_TRUNC("MONTH", end_timestamp) AS month, COUNT(0) AS invoice_count, SUM(total) AS invoice_total FROM invoice
GROUP BY 1
ORDER BY 1;

Example 2 - Fetch monthly totals by line item type

SELECT DATE_TRUNC("MONTH", i.end_timestamp) AS month,
li.line_item_type
, SUM(li.total) AS total
FROM invoice i
JOIN line_item li ON i.id = li.invoice_id
GROUP BY 1, 2
ORDER BY 2, 1;

Charges

Includes variable and fixed charge information.

Tables

Contracts

Includes contract information. The archived_at column defines whether the contract has been archived or not.

Tables

Example 1 - Fetch archived contracts

SELECT *
FROM contracts_contracts
WHERE archived_at = TRUE;

Contract Modifications

Includes any modifications on top of contracts. The contracts_overrides table holds any overrides on top of an existing contract and the contracts_transitions and contracts_amendments tables contain information about contracts ending and renewing.

Tables

Example 1 - Fetch the most recent overrides on a contract.

SELECT * FROM contracts_overrides
WHERE contract_id = <contract_id>
ORDER BY updated_at DESC;

Contract Pricing

Includes all information about pricing for a contract.

Tables

Example 1 - Fetch the active rate card entry count per rate card.

SELECT crc.id AS rate_card_id, COUNT(*)
FROM contracts_rate_cards crc
JOIN contracts_rate_card_entries crce ON crc.id = crce.rate_card_id
WHERE crce.ending_before > NOW()
GROUP BY 1
ORDER BY 1;

Customers

Includes customer metadata stored in Metronome including their ingest aliases, which can be joined with the events table. The archived_at column is used to determine if the customer is active.

The contracts_billing_provider_configuration table adds further context on the billing provider for the customer.

Tables

Example 1 - Fetch total active customers

SELECT COUNT(0) FROM customer WHERE archived_at IS NULL;

Draft Invoices

Includes all invoices to customers that are in a draft state. These tables are daily snapshots of invoices based on each customer's configuration and usage at a point-in-time during the day. The updated_at column is the time that the invoice row was calculated while the snapshot_time corresponds to the start of day (UTC). An invoice row will be populated once per day throughout a billing period until it is finalized or voided.

If an invoice is in a DRAFT_INCOMPLETE state, it means that Metronome hasn't fully computed the invoice. There will be no line items or total on the invoice. Exporting these invoices lets you know that the invoice exists, but Metronome has failed to compute it for some reason. Exporting incomplete invoices enables Metronome to send data to the specified destination as soon as possible. We expect these incomplete invoices to be hydrated in future snapshots.

Tables

Example 1 - Fetch daily invoice totals

SELECT snapshot_time, COUNT(0) AS invoice_count, SUM(total) AS invoice_total FROM draft_invoice
GROUP BY 1
ORDER BY 1;

Example 2 - Fetch invoice total by contract from most recent snapshot

SELECT contract_id, COUNT(0) AS invoice_count, SUM(total) AS invoice_total FROM draft_invoice
WHERE snapshot_time = (SELECT MAX(snapshot_time) FROM draft_invoice)
GROUP BY 1
ORDER BY 1;

Events

The full set of deduplicated raw events received by Metronome, regardless of whether or not they matched a billable metric.

Tables

Example 1 - Fetch event count per month

SELECT DATE_TRUNC('MONTH', timestamp), COUNT(0) FROM events
GROUP BY 1
ORDER BY 1;

Invoice breakdowns

info

Invoice breakdowns is currently in beta. It’s available for production use, but you may encounter product limitations. Breaking changes may occur.

Invoices and their corresponding line items, broken down to a daily granularity. See the daily revenue reports doc for more information on what to expect.

Tables

Example 1 - Fetch the line item count per invoice breakdown for draft invoices

SELECT COUNT(*), i.id as breakdown_id, i.invoice_id FROM invoice_breakdowns_invoices i
JOIN invoice_breakdowns_line_items li ON i.id = li.invoice_breakdown_id
WHERE i.status = 'DRAFT'
GROUP BY i.id
ORDER BY i.id;

Daily Sync

Data is exported once per day off of snapshots Metronome runs every 4 hours, which means you may see data up to 8 hours behind.

Schema

Nullable columns

Due to our export methodology, all columns may appear as nullable in your destination schema. The Nullable column in the table below reflects how your data is stored in Metronome.

metadata

Clients using Metronome have a variety of external systems and require different metadata to be stored. This metadata is client-specific and is stored as a JSON object in both the metadata column of each table as well as certain JSON-encoded objects.

alert

ColumnTypeDescription
idstringThe ID of the alert
namestringThe name of the alert
alert_typestringThe type of alert
thresholddecimalThe threshold to trigger the alert
webhooks_enabledbooleanIndicates if the alert is configured for webhooks
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
created_attimestampThe timestamp (UTC) of when the alert was created
disabled_attimestampThe timestamp (UTC) of when the alert was disabled
updated_attimestampThe timestamp (UTC) of when the alert was last updated

billable_metric

ColumnTypeDescription
idstringID of the billable metric
aggregatestringThe aggregation type
aggregate_keysjsonThe keys used for aggregation
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
group_keysjsonThe group by keys associated with this billable metric
namestringName of the billable metric
created_attimestampThe timestamp (UTC) of when the billable_metric was created
archived_attimestampThe timestamp (UTC) of when the billable_metric was archived
updated_attimestampThe timestamp (UTC) of when the billable_metric was last updated

contracts_contracts

ColumnTypeDescription
idstringID of the contract
namestringName of the contract
customer_idstringThe customer ID of the contract
rate_card_idstringThe rate card ID of the contract
starting_attimestampThe contract start timestamp (UTC)
ending_beforetimestampThe contract end timestamp (UTC). This timestamp is exclusive.
archived_atdateThe timestamp (UTC) of when the contract was archived.
multiplier_override_prioritizationstringThe prioritization for a multiplier override. There are two options:
  • Lowest multiplier (default): The lowest multiplier, aka the biggest discount, is used.
  • Explicit: The override with the lowest priority will be prioritized.
net_payment_terms_daysintegerThe amount of time a customer has to pay a contract. For example, “net 30"
usage_statement_schedule_frequencystringThe usage statement generation frequency. For example, “monthly” or “quarterly”.
created_attimestampThe timestamp (UTC) of when the contract was created
created_bytimestampThe entity the contract was created by
updated_attimestampThe timestamp (UTC) at which this row was exported
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_idstringThe snapshot ID for the contract row
metadataMetadataJSON encoded object

contracts_balances

ColumnTypeDescription
idstringThe ID of the balance
customer_idstringThe customer ID of the balance
contract_idstringThe contract ID of the balance
amendment_idstringThe amendment ID of the balance
typestringEither postpaid, prepaid, or credit
namestringThe name of the balance
priorityfloatThe priority that defines the order of balance application
descriptionstringThe description of the balance
product_idstringThe product ID associated with the balance
access_schedulejsonAccessSchedule
invoice_schedulejsonInvoiceSchedule - The invoice_schedule is always set for "postpaid" commits, sometimes set for "prepaid" commits, and never for "credit"
rollover_fractionfloatThe fraction of the balance that was rolled over
rate_typestringEither COMMIT_RATE or LIST_RATE
applicable_product_idsjsonJSON encoded list of applicable product IDs
applicable_product_tagsjsonJSON encoded list of applicable product tags
applicable_contract_idsjsonJSON encoded list of applicable contract IDs
invoice_contract_idstringThe invoice contract ID associated with the balance
ledgerjsonCommitLedgerEntry[]
rolled_over_from_commit_idstringThe commit ID the balance was rolled over from
rolled_over_from_contract_idstringThe contract ID the balance was rolled over from
updated_attimestampThe timestamp (UTC) at which this row was exported
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_idstringThe snapshot ID of the row
metadatajsonMetadata

balances.AccessSchedule

interface AccessSchedule {
schedule_items: Array<{
id: string;
/** ISO-8601 formatted timestamp */
date: string;
/** ISO-8601 formatted timestamp */
end_date: string | null;
/** Float, USD Cents */
amount: number;
}>;
}

balances.InvoiceSchedule

interface InvoiceSchedule {
schedule_items: Array<{
id: string;
/** ISO-8601 formatted timestamp */
date: string;
/** Float, USD Cents */
amount: number;
invoice_id: string;
}>;
recurring_schedule: {
/** ISO-8601 formatted timestamp */
start_date: string;
/** ISO-8601 formatted timestamp */
end_date: string;
/** Float, USD Cents */
amount: number;
amount_distribution: "divided" | "divided_rounded" | "each";
frequency: "annual" | "monthly" | "quarterly" | "semi_annual";
/** Float */
quantity?: number;
/** Float, USD Cents */
unit_price?: number;
} | null;
}

balances.CommitLedgerEntry

type LedgerEntry =
| {
/**
* Represents the starting balance of a postpaid commit.
*/
type: "postpaid_initial_balance";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
}
| {
/**
* Represents deductions from the remaining obligation of the
* postpaid commit as the result of an invoice with usage that
* applies to this commit.
*/
type: "postpaid_automated_invoice_deduction";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
invoice_id: string;
}
| {
/**
* Represents a true-up invoice that was issued for this commit to
* cover usage that was not covered by automated usage invoices.
*/
type: "postpaid_trueup";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
invoice_id: string;
}
| {
/**
* Represents that a prepaid commit segment was started and the customer
* now has access to the usage amount for that segment. These segments
* are described in the access schedule of the prepaid commit.
*/
type: "prepaid_segment_start";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
}
| {
/**
* Represents deductions from the prepaid commit segment caused by a
* usage invoice that included usage applicable to this commit.
*/
type: "prepaid_automated_invoice_deduction";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
/**
* Represents unused usage from the prepaid commit which was rolled
* over to a new contract.
*/
type: "prepaid_rollover";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
new_contract_id: string;
new_commit_id: string;
}
| {
type: "prepaid_commit_canceled";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
type: "prepaid_commit_credited";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
/**
* Represents commit amount that was unused and expired at the end of
* a commit segment. Does not include usage that rolled over to a new
* contract.
*/
type: "prepaid_segment_expiration";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
}
| {
type: "prepaid_manual";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
reason: string;
}
| {
type: "postpaid_manual";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
}
| {
/**
* Represents that a credit segment was started and the customer
* now has access to the usage amount for that segment. These segments
* are described in the access schedule of the credit.
*/
type: "credit_segment_start";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
}
| {
/**
* Represents deductions from the credit segment caused by a
* usage invoice that included usage applicable to this credit.
*/
type: "credit_automated_invoice_deduction";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
type: "credit_commit_canceled";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
type: "credit_commit_credited";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
/**
* Represents credit amount that was unused and expired at the end of
* a credit segment.
*/
type: "credit_segment_expiration";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
}
| {
type: "credit_manual";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
reason: string;
};

contracts_commits

The commits table only includes contract-level commits. It does not include customer-level commits or credits, or contract-level credits.
ColumnTypeDescription
idstringThe commit
contract_idstringThe contract ID of the commit
amendment_idstringThe amendment ID associated with the commit
typestringThe type of commit: postpaid or prepaid
namestringThe name of the commit
priorityfloatThe priority that defines the order in which commits should be applied
descriptionstringThe description of the commit
product_idstringThe product ID associated with the commit
amountfloatDeprecated (use the amount from the schedule items instead)
access_schedulejsonAccessSchedule
invoice_schedulejsonInvoiceSchedule The invoice_schedule is always set for "postpaid" commits, sometimes set for "prepaid" commits, and never for "credit"
rollover_fractionfloatThe fraction of the commit that was rolled over
rate_typestringEither COMMIT_RATE or LIST_RATE
applicable_product_idsjsonJSON encoded list of applicable product IDs
applicable_product_tagsjsonJSON encoded list of applicable product tags
ledgerjsonCommitLedgerEntry[]
rolled_over_from_commit_idstringThe commit ID the commit was rolled over from
rolled_over_from_contract_idstringThe contract ID the commit was rolled over from
updated_attimestampThe timestamp (UTC) of when the commit was last updated
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_idstringThe snapshot ID of the row
metadatajsonMetadata

commits.AccessSchedule

interface AccessSchedule {
schedule_items: Array<{
id: string;
/** ISO-8601 formatted timestamp */
date: string;
/** ISO-8601 formatted timestamp */
end_date: string | null;
/** Float, USD Cents */
amount: number;
}>;
}

commits.InvoiceSchedule

interface InvoiceSchedule {
schedule_items: Array<{
id: string;
/** ISO-8601 formatted timestamp */
date: string;
/** Float, USD Cents */
amount: number;
invoice_id: string;
}>;
recurring_schedule: {
/** ISO-8601 formatted timestamp */
start_date: string;
/** ISO-8601 formatted timestamp */
end_date: string;
/** Float, USD Cents */
amount: number;
amount_distribution: "divided" | "divided_rounded" | "each";
frequency: "annual" | "monthly" | "quarterly" | "semi_annual";
/** Float */
quantity?: number;
/** Float, USD Cents */
unit_price?: number;
} | null;
}

commits.CommitLedgerEntry

type LedgerEntry =
| {
/**
* Represents the starting balance of a postpaid commit.
*/
type: "postpaid_initial_balance";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
}
| {
/**
* Represents deductions from the remaining obligation of the
* postpaid commit as the result of an invoice with usage that
* applies to this commit.
*/
type: "postpaid_automated_invoice_deduction";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
invoice_id: string;
}
| {
/**
* Represents a true-up invoice that was issued for this commit to
* cover usage that was not covered by automated usage invoices.
*/
type: "postpaid_trueup";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
invoice_id: string;
}
| {
/**
* Represents that a prepaid commit segment was started and the customer
* now has access to the usage amount for that segment. These segments
* are described in the access schedule of the prepaid commit.
*/
type: "prepaid_segment_start";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
}
| {
/**
* Represents deductions from the prepaid commit segment caused by a
* usage invoice that included usage applicable to this commit.
*/
type: "prepaid_automated_invoice_deduction";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
/**
* Represents unused usage from the prepaid commit which was rolled
* over to a new contract.
*/
type: "prepaid_rollover";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
new_contract_id: string;
new_commit_id: string;
}
| {
type: "prepaid_commit_canceled";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
type: "prepaid_commit_credited";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
invoice_id: string;
}
| {
/**
* Represents commit amount that was unused and expired at the end of
* a commit segment. Does not include usage that rolled over to a new
* contract.
*/
type: "prepaid_segment_expiration";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
}
| {
type: "prepaid_manual";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
segment_id: string;
reason: string;
}
| {
type: "postpaid_manual";
/** ISO-8601 formatted timestamp */
timestamp: string;
/** Float, USD Cents */
amount: number;
};

contracts_amendments

ColumnTypeDescription
idstringThe ID of the contract amendment
contract_idstringThe contract ID of the amendment
effective_attimestampThe timestamp (UTC) of when the contract amendment is effective starting at
created_attimestampThe timestamp (UTC) of when the contract amendment was created
created_bystringThe entity the contract amendment was created by
updated_attimestampThe timestamp (UTC) at which this row was exported
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_idstringThe snapshot ID for the row
metadatajsonMetadata

contracts_overrides

ColumnTypeDescription
idstringThe ID of the override
contract_idstringThe contract ID of the override
amendment_idstringThe amendment ID of the override
product_idstringThe product ID of the override
starting_attimestampThe timestamp (UTC) of when the override starts (inclusive)
ending_beforetimestampThe timestamp (UTC) of when the override ends (exclusive)
entitledbooleanWhether or not the override is entitled
rate_typestringEither multiplier, overwrite_flat, or overwrite_percentage. NULL if this does not override the rate
multiplierfloatThe multiplier of the override
priorityfloatOnly defined for contracts with EXPLICIT multiplier override prioritization
new_ratejsonRate
applicable_product_tagsjsonJSON encoded list of strings
override_specifierjsonOverrideSpecifier[]
targetstringEither COMMIT_RATE or LIST_RATE. Indicates which rate the override applies to
is_commit_specificstringWhether or not the override is commit specific
updated_attimestampThe timestamp (UTC) at which this row was exported
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_idstringThe snapshot ID for the row
metadatajsonMetadata

overrides.Rate

type Rate =
| {
type: "flat";
unit_price: number;
}
| {
type: "percentage";
fraction: number;
use_list_prices: boolean;
}
| {
type: "subscription";
unit_price: number;
quantity: number;
};

override.Specifier

type OverrideSpecifier = {
commit_ids?: string[];
product_id?: string;
product_tags?: string[];
pricing_group_values?: Array<{
name: string;
value: string;
}>;
};

contracts_scheduled_charges

ColumnTypeDescription
idstringThe ID of the scheduled charge
contract_idstringThe contract ID associated with the scheduled charge
amendment_idstringThe amendment ID associated with the scheduled charge
namestringThe name of the scheduled charge
descriptionstringThe description of the scheduled charge
product_idstringThe product ID associated with the scheduled charge
schedulejsonSchedule
updated_attimestampThe timestamp (UTC) at which this row was exported
metadatajsonMetadata

scheduled_charges.Schedule

interface Schedule {
schedule_items: Array<{
id: string;
/** ISO-8601 formatted timestamp */
date: string;
/** Float, USD Cents */
amount: number;
}>;
recurring_schedule: {
/** ISO-8601 formatted timestamp */
start_date: string;
/** ISO-8601 formatted timestamp */
end_date: string;
/** Float, USD Cents */
amount: number;
amount_distribution: "divided" | "divided_rounded" | "each";
frequency: "annual" | "monthly" | "quarterly" | "semi_annual";
/** Float */
quantity?: number;
/** Float, USD Cents */
unit_price?: number;
} | null;
}

contracts_transitions

ColumnTypeDescription
idstringThe ID of the transition event
typestringEither "renewal" or "supersede"
contract_idstringThe current contract ID
from_contract_idstringThe contract ID that applies prior to the transition
to_contract_idstringThe contract ID that applies after the transition
datetimestampThe timestamp (UTC) of the transition
updated_attimestampThe timestamp (UTC) at which this row was exported
metadatajsonMetadata

contracts_usage_filters

Usage filters change over time, so each row represents a distinct version of a usage filter. To determine the correct version of a usage filter at a given point in time:

  • Filter the table by contract_id and starting_at <= {TIME}
  • Select the row with the largest version
ColumnTypeDescription
idstringThe Metronome ID of the contract usage filter
contract_idstringThe ID of the contract associated with the usage filter
versionintegerThe version of the usage filter
starting_attimestampThe timestamp (UTC) of the starting timestamp the usage filter is active (inclusive)
group_keystringThe group key for the usage filter
group_valuesjsonGroup values for this usage filter row, stored in a JSON encoded list
updated_attimestampThe timestamp (UTC) at which this row was exported
metadatajsonMetadata

customer

ColumnTypeDescription
idstringThe Metronome ID of the customer
namestringThe name of the customer
ingest_aliasesjsonThe ingest aliases of the customer
salesforce_account_idstringThe Salesforce account ID for the customer
billing_provider_typestringThe billing provider connected to the customer
billing_provider_customer_idstringThe billing provider ID of the customer
custom_fieldsjsonCustom fields attached to the customer
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
created_attimestampThe timestamp (UTC) of when the customer was created
updated_attimestampThe timestamp (UTC) of when the customer was last updated
archived_attimestampThe timestamp (UTC) of when the customer was archived, if applicable

product

ColumnTypeDescription
idstringThe product ID
namestringThe name of the product
descriptionstringThe description of the product
custom_fieldsstringCustom fields attached to the product
created_attimestampThe timestamp (UTC) of when the product was created
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
deprecated_attimestampThe timestamp (UTC) of when the product was deprecated, if applicable
updated_attimestampThe timestamp (UTC) of when the product was last updated

invoice

ColumnTypeDescription
idstringThe Metronome invoice ID
statusstringThe Metronome invoice status: FINALIZED or VOID
totaldecimalThe invoice total
credit_type_idstringThe credit type ID for the invoice
credit_type_namestringThe name of the credit type associated with the invoice
customer_idstringThe Metronome ID of the customer
plan_idstringDeprecated field - expect to be NULL
plan_namestringDeprecated field - expect to be NULL
contract_idstringThe contract ID associated with the invoice
start_timestamptimestampBeginning of the usage period that this invoice covers (UTC)
end_timestamptimestampEnd of the usage period that this invoice covers (UTC)
billing_provider_invoice_idstringThe external invoice ID from the billing provider (e.g., Stripe)
billing_provider_typestringThe type of external system billing provider (e.g. Stripe)
billing_provider_invoice_created_attimestampThe timestamp (UTC) the external invoice was created by Metronome
billing_provider_invoice_external_statusstringThe status of the invoice in the external system (e.g. Stripe)
invoice_labelstringThe categorical label of the invoice
issued_attimestampThe timestamp (UTC) of when the invoice was issued
metadatajsonMetadata
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
updated_attimestampThe timestamp (UTC) of when this row was last updated

line_item

ColumnTypeDescription
idstringThe line item ID
invoice_idstringThe Metronome invoice ID associated with the line item
credit_grant_idstringDeprecated field - expect to be NULL
credit_type_idstringThe credit type ID associated with the line item
credit_type_namestringThe name of the credit type associated with the line item
namestringThe line item description
quantitydecimalThe quantity associated with the line item; this will always be 1 for invoice adjustments
totaldecimalThe line item total
commit_idstringThe commit ID associated with the line item. Only present for beta Contract Invoices
product_idstringThe product ID associated with the line item; this will always be NULL for invoice adjustments
group_keystringThe group key associated with the line item
group_valuestringThe group value associated with the line item
unit_pricedecimalThe price associated with the line item
starting_attimestampThe timestamp (UTC) of when the line item is effective from (inclusive)
ending_beforetimestampThe timestamp (UTC) of when the line item is effective to (exclusive)
pricing_group_valuesjsonOptional pricing group values array
metadatajsonMetadata
updated_attimestampThe timestamp (UTC) of when the line item was last updated
is_proratedbooleanIndicates if the value is prorated over the period. For subscription charges only.
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION

draft_invoice

ColumnTypeDescription
_metronome_metadata_idstringUnique identifier for each draft invoice ID + snapshot_time pair
idstringThe Metronome invoice ID
statusstringThe Metronome invoice status: DRAFT or DRAFT_INCOMPLETE (see the invoice table for FINALIZED and VOID invoices)
totaldecimalThe invoice total
credit_type_idstringThe credit type ID for the invoice
credit_type_namestringThe name of the credit type associated with the invoice
customer_idstringThe Metronome ID of the customer
plan_idstringDeprecated field - expect to be NULL
plan_namestringDeprecated field - expect to be NULL
contract_idstringThe contract ID associated with the invoice
start_timestamptimestampBeginning of the usage period that this invoice covers (UTC)
end_timestamptimestampEnd of the usage period that this invoice covers (UTC)
billing_provider_invoice_idstringThe external invoice ID from the billing provider (e.g., Stripe)
billing_provider_invoice_created_attimestampThe timestamp (UTC) of when the external invoice was created by Metronome
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
updated_attimestampThe timestamp (UTC) this row was last updated
snapshot_timetimestampThe timestamp (UTC) aligning with the start of the snapshot
labelstringThe categorical label of the invoice

draft_line_item

ColumnTypeDescription
_metronome_metadata_idstringOpaque unique identifier for each row
idstringThe line item ID
invoice_idstringThe Metronome invoice ID associated with the line item
credit_grant_idstringDeprecated field - expect to be NULL
credit_type_idstringThe credit type ID associated with the line item
credit_type_namestringThe name of the credit type associated with the line item
namestringThe line item description
quantitydecimalThe quantity associated with the line item; this will always be 1 for invoice adjustments
totaldecimalThe line item total
commit_idstringThe commit ID associated with the line item. Only present for beta Contract Invoices
product_idstringThe product ID associated with the line item; this will always be NULL for invoice adjustments
group_keystringThe group key associated with the line item
group_valuestringThe group value associated with the line item
unit_pricedecimalThe price associated with the line item
pricing_group_valuesjsonOptional pricing group values array
is_proratedbooleanIndicates if the value is prorated over the period. For subscription charges only.
updated_attimestampThe timestamp (UTC) of when the line item was last updated
snapshot_timetimestampThe timestamp (UTC) aligning with the start of the snapshot
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION

events

ColumnTypeDescription
transaction_idstringThe unique ID of the event
customer_idstringThe ID of the customer the event applies to
timestamptimestampThe timestamp (UTC) of the event
event_typestringThe event type
propertiesstringThe properties of the event
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
_metronome_metadata_idstringMetronome metadata ID
updated_attimestampThe timestamp (UTC) this row was last updated

[Beta] invoice_breakdowns_invoices

ColumnTypeDescription
idstringThe Metronome invoice breakdown ID
invoice_idstringThe Metronome invoice ID associated with the breakdown
customer_idstringThe Metronome customer ID associated with the breakdown
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_timestamptimestampThe timestamp (UTC) aligning with the start of the snapshot
transfer_idstringThe Metronome transfer ID for this invoice breakdown
netsuite_sales_order_idstringNot generally available - expect to be NULL
salesforce_opportunity_idstringThe Salesforce opportunity ID associated with the breakdown
net_payment_term_daysintegerThe net payment terms in days associated with the breakdown
credit_type_idstringThe ID of the credit type associated with the invoice
credit_type_namestringThe name of the credit type associated with the invoice
issued_attimestampThe timestamp (UTC) this breakdown was issued
statusstringDRAFT or FINALIZED
subtotaldecimalDeprecated field - expect to be NULL
totaldecimalThe total for the invoice
typestringThe invoice type
external_invoicejsonThe external invoice data
plan_idstringDeprecated field - expect to be NULL
contract_idstringThe contract ID associated with the invoice
amendment_idstringThe amendment ID associated with the invoice
correction_recordjsonA list of all corrections associated with the invoice
reseller_royaltyjsonNot generally available - expect to be NULL
custom_fieldsjsonCustom fields that apply to the invoice
billable_statusstringThe invoice’s billable status
breakdown_start_timestamptimestampThe timestamp corresponding with the start of the breakdown window (inclusive)
breakdown_end_timestamptimestampThe timestamp corresponding with the end of the breakdown window (exclusive)
window_sizestringThe size of the breakdown window. Typically DAILY
updated_attimestampThe timestamp (UTC) this row was last updated
invoice_start_timestamptimestampBeginning of the usage period that this invoice covers (UTC) (inclusive)
invoice_end_timestamptimestampEnd of the usage period that this invoice covers (UTC) (exclusive)

[Beta] invoice_breakdowns_line_items

ColumnTypeDescription
idstringThe Metronome line item breakdown ID
invoice_breakdown_idstringThe Metronome invoice breakdown ID associated with the line item
namestringThe name of the line item associated with the breakdown
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_timestamptimestampThe timestamp (UTC) aligning with the start of the snapshot
transfer_idstringThe Metronome transfer ID for this line item breakdown
group_keystringThe group key associated with the line item
group_valuestringThe group value associated with the line item
quantitydecimalThe quantity of this line item breakdown row
totaldecimalThe total for the line item breakdown
unit_pricedecimalThe unit price for the line item
product_idstringThe ID of the product for the line item
netsuite_item_idstringNot generally available - expect to be NULL
credit_type_idstringThe credit type ID associated with the line item
credit_type_namestringThe name of the credit type associated with the line item
commit_idstringThe commit ID associated with the line item breakdown
commit_segment_idstringThe commit segment ID associated with the line item breakdown
commit_typestringThe commit type associated with the line item breakdown
commit_netsuite_sales_order_idstringNot generally available - expect to be NULL
commit_netsuite_item_idstringNot generally available - expect to be NULL
postpaid_commit_idstringThe postpaid commit ID, if applicable
reseller_typestringNot generally available - expect to be NULL
custom_fieldsjsonCustom fields that apply to the breakdown
price_group_valuesjsonThe price group values associated with the line item breakdown
presentation_group_valuesjsonThe presentation group values associated with the line item breakdown
billable_metric_idstringThe billable metric ID that applies to the line item breakdown
updated_attimestampThe timestamp (UTC) this row was last updated
metadata_jsonjsonMetadata

contracts_billing_provider_configuration

ColumnTypeDescription
idstringThe Metronome contract billing provider configuration ID
contract_idstringThe Metronome contract ID associated with this row
customer_idstringThe customer ID associated with this row
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
billing_provider_config_idstringThe Metronome billing provider configuration ID associated with this row
updated_attimestampThe timestamp (UTC) this row was last updated

contracts_product_list_item_versions

ColumnTypeDescription
idstringThe Metronome product list item version ID
product_list_item_idstringThe product list item ID associated with the row
typestringThe type of the product list item version
versionintegerThe version of the product list item
namestringThe name of the product list item version
starting_attimestampThe timestamp (UTC) the version is active starting at (inclusive)
is_refundablebooleanWhether or not the product list item version is refundable
billable_metric_idstringThe billable metric ID associated with the product list item version
composite_product_idsjsonThe list of composite product IDs associated with the row
tagsjsonThe list of tags associated with the row
composite_tagsjsonThe list of composite tags associated with the row
quantity_conversionjsonThe quantity conversion for the row
quantity_roundingjsonThe quantity rounding for the row
pricing_group_keyjsonThe pricing group key for the row
presentation_group_keyjsonThe presentation group key for the row
created_attimestampThe timestamp (UTC) this row was created at
created_bystringThe entity this row was created by
updated_attimestampThe timestamp (UTC) this row was last updated
metadatajsonMetadata
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
snapshot_idstringThe ID of the snapshot this row was transferred during

contracts_rate_cards

ColumnTypeDescription
idstringThe Metronome contract rate card ID
credit_type_conversionsjsonThe credit type conversions associated with the row
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
billing_providerstringThe billing provider associated with this row
updated_attimestampThe timestamp (UTC) this row was last updated
snapshot_idstringThe ID of the snapshot this row was transferred during
metadatajsonMetadata
aliasesjsonList of aliases for the rate card
fiat_credit_type_idstringThe fiat credit type ID associated with the rate card
fiat_credit_type_namestringThe name of the fiat credit type associated with the rate card
created_bystringThe creator of the rate card
created_attimestampThe timestamp (UTC) this row was created
descriptionstringThe description of the rate card
namestringThe name of the rate card

contracts_rate_card_entries

ColumnTypeDescription
idstringThe Metronome contract rate card entry ID
rate_card_idstringThe Metronome rate card ID associated with this entry
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
product_idstringThe product ID associated with this entry
versionintegerThe version of this rate card entry
starting_attimestampThe timestamp (UTC) the rate card entry starts at (inclusive)
ending_beforetimestampThe timestamp (UTC) the rate card entry ends at (exclusive)
entitledbooleanWhether or not the entry is entitled
ratestringThe rate that applies to the entry
commit_ratestringThe commit rate that applies to the entry (if applicable)
product_orderintegerThe product order associated with the entry
pricing_group_valuesjsonThe pricing group values that apply to the entry
updated_attimestampThe timestamp (UTC) this row was last updated
snapshot_idstringThe ID of the snapshot this row was transferred during
metadatajsonMetadata
credit_type_idstringThe credit type ID associated with the rate card
credit_type_namestringThe name of the credit type associated with the rate card

customer_alert_history

ColumnTypeDescription
idstringThe Metronome ID of the customer alert history
customer_idstringThe name of the customer associated with the alert history
alert_idstringThe alert ID associated with the row
alert_statusstringThe alert status associated with the row
additional_datajsonAdditional data about the alert
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
created_attimestampThe timestamp (UTC) of when the customer was created

customer_billing_provider_configuration

ColumnTypeDescription
idstringThe Metronome contract billing provider configuration ID
configurationstringThe configuration associated with the row
customer_idstringThe customer ID associated with this row
environment_typestringThe Metronome environment, SANDBOX or PRODUCTION
billing_providerstringThe billing provider associated with this row
updated_attimestampThe timestamp (UTC) this row was last updated