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).
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 form2025-01-01
, while<transfer_timestamp>
is of the form20250102150405
.<file_part>
is a monotonically increasing integer for a given timestamp, and does not carry any special meaning.
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 data | Table name | Transfer Frequency† | Average Freshness†† | Table Type |
---|---|---|---|---|
Alerts | alert | 24 hours | 8 hours | Incremental |
Alerts | customer_alert_history | 24 hours | 8 hours | Incremental |
Finalized Invoices | invoice | 24 hours | 8 hours | Incremental |
Finalized Invoices | line_item | 24 hours | 8 hours | Incremental |
Product | product | 24 hours | 8 hours | Incremental |
Charges | contracts_scheduled_charges | 24 hours | 8 hours | Snapshot |
Contracts | contracts_contracts | 24 hours | 8 hours | Snapshot |
Contracts | contracts_commits | 24 hours | 8 hours | Snapshot |
Contracts | contracts_balances | 24 hours | 8 hours | Snapshot |
Contracts | contracts_usage_filters | 24 hours | 8 hours | Snapshot |
Contracts | contracts_billing_provider_configuration | 24 hours | 8 hours | Snapshot |
Contract Modifications | contracts_overrides | 24 hours | 8 hours | Snapshot |
Contract Modifications | contracts_transitions | 24 hours | 8 hours | Snapshot |
Contract Modifications | contracts_amendments | 24 hours | 8 hours | Snapshot |
Contract Pricing | contracts_rate_cards | 24 hours | 8 hours | Snapshot |
Contract Pricing | contracts_rate_card_entries | 24 hours | 8 hours | Snapshot |
Contract Pricing | contracts_product_list_item_versions | 24 hours | 8 hours | Snapshot |
Customers | customer | 24 hours | 8 hours | Incremental |
Customers | customer_billing_provider_configuration | 24 hours | 8 hours | Incremental |
Draft Invoices | draft_invoice | 24 hours | 8 hours | Snapshot |
Draft Invoices | draft_line_item | 24 hours | 8 hours | Snapshot |
Events | events | 24 hours | 8 hours | Incremental |
Invoice Breakdowns | invoice_breakdowns_invoices | 24 hours | 8 hours | Snapshot |
Invoice Breakdowns | invoice_breakdowns_line_items | 24 hours | 8 hours | Snapshot |
† 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.
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
- contracts_contracts
- contracts_commits
- contracts_balances
- contracts_usage_filters
- contracts_billing_provider_configuration
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
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;
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
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
Column | Type | Description |
---|---|---|
id | string | The ID of the alert |
name | string | The name of the alert |
alert_type | string | The type of alert |
threshold | decimal | The threshold to trigger the alert |
webhooks_enabled | boolean | Indicates if the alert is configured for webhooks |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
created_at | timestamp | The timestamp (UTC) of when the alert was created |
disabled_at | timestamp | The timestamp (UTC) of when the alert was disabled |
updated_at | timestamp | The timestamp (UTC) of when the alert was last updated |
billable_metric
Column | Type | Description |
---|---|---|
id | string | ID of the billable metric |
aggregate | string | The aggregation type |
aggregate_keys | json | The keys used for aggregation |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
group_keys | json | The group by keys associated with this billable metric |
name | string | Name of the billable metric |
created_at | timestamp | The timestamp (UTC) of when the billable_metric was created |
archived_at | timestamp | The timestamp (UTC) of when the billable_metric was archived |
updated_at | timestamp | The timestamp (UTC) of when the billable_metric was last updated |
contracts_contracts
Column | Type | Description |
---|---|---|
id | string | ID of the contract |
name | string | Name of the contract |
customer_id | string | The customer ID of the contract |
rate_card_id | string | The rate card ID of the contract |
starting_at | timestamp | The contract start timestamp (UTC) |
ending_before | timestamp | The contract end timestamp (UTC). This timestamp is exclusive. |
archived_at | date | The timestamp (UTC) of when the contract was archived. |
multiplier_override_prioritization | string | The prioritization for a multiplier override. There are two options:
|
net_payment_terms_days | integer | The amount of time a customer has to pay a contract. For example, “net 30" |
usage_statement_schedule_frequency | string | The usage statement generation frequency. For example, “monthly” or “quarterly”. |
created_at | timestamp | The timestamp (UTC) of when the contract was created |
created_by | timestamp | The entity the contract was created by |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the contract row |
metadata | Metadata | JSON encoded object |
contracts_balances
Column | Type | Description |
---|---|---|
id | string | The ID of the balance |
customer_id | string | The customer ID of the balance |
contract_id | string | The contract ID of the balance |
amendment_id | string | The amendment ID of the balance |
type | string | Either postpaid , prepaid , or credit |
name | string | The name of the balance |
priority | float | The priority that defines the order of balance application |
description | string | The description of the balance |
product_id | string | The product ID associated with the balance |
access_schedule | json | AccessSchedule |
invoice_schedule | json | InvoiceSchedule - The invoice_schedule is always set for "postpaid" commits, sometimes set for "prepaid" commits, and never for "credit" |
rollover_fraction | float | The fraction of the balance that was rolled over |
rate_type | string | Either COMMIT_RATE or LIST_RATE |
applicable_product_ids | json | JSON encoded list of applicable product IDs |
applicable_product_tags | json | JSON encoded list of applicable product tags |
applicable_contract_ids | json | JSON encoded list of applicable contract IDs |
invoice_contract_id | string | The invoice contract ID associated with the balance |
ledger | json | CommitLedgerEntry[] |
rolled_over_from_commit_id | string | The commit ID the balance was rolled over from |
rolled_over_from_contract_id | string | The contract ID the balance was rolled over from |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID of the row |
metadata | json | Metadata |
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
Column | Type | Description |
---|---|---|
id | string | The commit |
contract_id | string | The contract ID of the commit |
amendment_id | string | The amendment ID associated with the commit |
type | string | The type of commit: postpaid or prepaid |
name | string | The name of the commit |
priority | float | The priority that defines the order in which commits should be applied |
description | string | The description of the commit |
product_id | string | The product ID associated with the commit |
amount | float | Deprecated (use the amount from the schedule items instead) |
access_schedule | json | AccessSchedule |
invoice_schedule | json | InvoiceSchedule The invoice_schedule is always set for "postpaid" commits, sometimes set for "prepaid" commits, and never for "credit" |
rollover_fraction | float | The fraction of the commit that was rolled over |
rate_type | string | Either COMMIT_RATE or LIST_RATE |
applicable_product_ids | json | JSON encoded list of applicable product IDs |
applicable_product_tags | json | JSON encoded list of applicable product tags |
ledger | json | CommitLedgerEntry[] |
rolled_over_from_commit_id | string | The commit ID the commit was rolled over from |
rolled_over_from_contract_id | string | The contract ID the commit was rolled over from |
updated_at | timestamp | The timestamp (UTC) of when the commit was last updated |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID of the row |
metadata | json | Metadata |
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
Column | Type | Description |
---|---|---|
id | string | The ID of the contract amendment |
contract_id | string | The contract ID of the amendment |
effective_at | timestamp | The timestamp (UTC) of when the contract amendment is effective starting at |
created_at | timestamp | The timestamp (UTC) of when the contract amendment was created |
created_by | string | The entity the contract amendment was created by |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
metadata | json | Metadata |
contracts_overrides
Column | Type | Description |
---|---|---|
id | string | The ID of the override |
contract_id | string | The contract ID of the override |
amendment_id | string | The amendment ID of the override |
product_id | string | The product ID of the override |
starting_at | timestamp | The timestamp (UTC) of when the override starts (inclusive) |
ending_before | timestamp | The timestamp (UTC) of when the override ends (exclusive) |
entitled | boolean | Whether or not the override is entitled |
rate_type | string | Either multiplier , overwrite_flat , or overwrite_percentage . NULL if this does not override the rate |
multiplier | float | The multiplier of the override |
priority | float | Only defined for contracts with EXPLICIT multiplier override prioritization |
new_rate | json | Rate |
applicable_product_tags | json | JSON encoded list of strings |
override_specifier | json | OverrideSpecifier[] |
target | string | Either COMMIT_RATE or LIST_RATE . Indicates which rate the override applies to |
is_commit_specific | string | Whether or not the override is commit specific |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
metadata | json | Metadata |
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
Column | Type | Description |
---|---|---|
id | string | The ID of the scheduled charge |
contract_id | string | The contract ID associated with the scheduled charge |
amendment_id | string | The amendment ID associated with the scheduled charge |
name | string | The name of the scheduled charge |
description | string | The description of the scheduled charge |
product_id | string | The product ID associated with the scheduled charge |
schedule | json | Schedule |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
metadata | json | Metadata |
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
Column | Type | Description |
---|---|---|
id | string | The ID of the transition event |
type | string | Either "renewal" or "supersede" |
contract_id | string | The current contract ID |
from_contract_id | string | The contract ID that applies prior to the transition |
to_contract_id | string | The contract ID that applies after the transition |
date | timestamp | The timestamp (UTC) of the transition |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
metadata | json | Metadata |
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
andstarting_at <= {TIME}
- Select the row with the largest
version
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the contract usage filter |
contract_id | string | The ID of the contract associated with the usage filter |
version | integer | The version of the usage filter |
starting_at | timestamp | The timestamp (UTC) of the starting timestamp the usage filter is active (inclusive) |
group_key | string | The group key for the usage filter |
group_values | json | Group values for this usage filter row, stored in a JSON encoded list |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
metadata | json | Metadata |
customer
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the customer |
name | string | The name of the customer |
ingest_aliases | json | The ingest aliases of the customer |
salesforce_account_id | string | The Salesforce account ID for the customer |
billing_provider_type | string | The billing provider connected to the customer |
billing_provider_customer_id | string | The billing provider ID of the customer |
custom_fields | json | Custom fields attached to the customer |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
created_at | timestamp | The timestamp (UTC) of when the customer was created |
updated_at | timestamp | The timestamp (UTC) of when the customer was last updated |
archived_at | timestamp | The timestamp (UTC) of when the customer was archived, if applicable |
product
Column | Type | Description |
---|---|---|
id | string | The product ID |
name | string | The name of the product |
description | string | The description of the product |
custom_fields | string | Custom fields attached to the product |
created_at | timestamp | The timestamp (UTC) of when the product was created |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
deprecated_at | timestamp | The timestamp (UTC) of when the product was deprecated, if applicable |
updated_at | timestamp | The timestamp (UTC) of when the product was last updated |
invoice
Column | Type | Description |
---|---|---|
id | string | The Metronome invoice ID |
status | string | The Metronome invoice status: FINALIZED or VOID |
total | decimal | The invoice total |
credit_type_id | string | The credit type ID for the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
customer_id | string | The Metronome ID of the customer |
plan_id | string | Deprecated field - expect to be NULL |
plan_name | string | Deprecated field - expect to be NULL |
contract_id | string | The contract ID associated with the invoice |
start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) |
end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) |
billing_provider_invoice_id | string | The external invoice ID from the billing provider (e.g., Stripe) |
billing_provider_type | string | The type of external system billing provider (e.g. Stripe) |
billing_provider_invoice_created_at | timestamp | The timestamp (UTC) the external invoice was created by Metronome |
billing_provider_invoice_external_status | string | The status of the invoice in the external system (e.g. Stripe) |
invoice_label | string | The categorical label of the invoice |
issued_at | timestamp | The timestamp (UTC) of when the invoice was issued |
metadata | json | Metadata |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
updated_at | timestamp | The timestamp (UTC) of when this row was last updated |
line_item
Column | Type | Description |
---|---|---|
id | string | The line item ID |
invoice_id | string | The Metronome invoice ID associated with the line item |
credit_grant_id | string | Deprecated field - expect to be NULL |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
name | string | The line item description |
quantity | decimal | The quantity associated with the line item; this will always be 1 for invoice adjustments |
total | decimal | The line item total |
commit_id | string | The commit ID associated with the line item. Only present for beta Contract Invoices |
product_id | string | The product ID associated with the line item; this will always be NULL for invoice adjustments |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
unit_price | decimal | The price associated with the line item |
starting_at | timestamp | The timestamp (UTC) of when the line item is effective from (inclusive) |
ending_before | timestamp | The timestamp (UTC) of when the line item is effective to (exclusive) |
pricing_group_values | json | Optional pricing group values array |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) of when the line item was last updated |
is_prorated | boolean | Indicates if the value is prorated over the period. For subscription charges only. |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
draft_invoice
Column | Type | Description |
---|---|---|
_metronome_metadata_id | string | Unique identifier for each draft invoice ID + snapshot_time pair |
id | string | The Metronome invoice ID |
status | string | The Metronome invoice status: DRAFT or DRAFT_INCOMPLETE (see the invoice table for FINALIZED and VOID invoices) |
total | decimal | The invoice total |
credit_type_id | string | The credit type ID for the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
customer_id | string | The Metronome ID of the customer |
plan_id | string | Deprecated field - expect to be NULL |
plan_name | string | Deprecated field - expect to be NULL |
contract_id | string | The contract ID associated with the invoice |
start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) |
end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) |
billing_provider_invoice_id | string | The external invoice ID from the billing provider (e.g., Stripe) |
billing_provider_invoice_created_at | timestamp | The timestamp (UTC) of when the external invoice was created by Metronome |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
snapshot_time | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
label | string | The categorical label of the invoice |
draft_line_item
Column | Type | Description |
---|---|---|
_metronome_metadata_id | string | Opaque unique identifier for each row |
id | string | The line item ID |
invoice_id | string | The Metronome invoice ID associated with the line item |
credit_grant_id | string | Deprecated field - expect to be NULL |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
name | string | The line item description |
quantity | decimal | The quantity associated with the line item; this will always be 1 for invoice adjustments |
total | decimal | The line item total |
commit_id | string | The commit ID associated with the line item. Only present for beta Contract Invoices |
product_id | string | The product ID associated with the line item; this will always be NULL for invoice adjustments |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
unit_price | decimal | The price associated with the line item |
pricing_group_values | json | Optional pricing group values array |
is_prorated | boolean | Indicates if the value is prorated over the period. For subscription charges only. |
updated_at | timestamp | The timestamp (UTC) of when the line item was last updated |
snapshot_time | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
events
Column | Type | Description |
---|---|---|
transaction_id | string | The unique ID of the event |
customer_id | string | The ID of the customer the event applies to |
timestamp | timestamp | The timestamp (UTC) of the event |
event_type | string | The event type |
properties | string | The properties of the event |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
_metronome_metadata_id | string | Metronome metadata ID |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
[Beta] invoice_breakdowns_invoices
Column | Type | Description |
---|---|---|
id | string | The Metronome invoice breakdown ID |
invoice_id | string | The Metronome invoice ID associated with the breakdown |
customer_id | string | The Metronome customer ID associated with the breakdown |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_timestamp | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
transfer_id | string | The Metronome transfer ID for this invoice breakdown |
netsuite_sales_order_id | string | Not generally available - expect to be NULL |
salesforce_opportunity_id | string | The Salesforce opportunity ID associated with the breakdown |
net_payment_term_days | integer | The net payment terms in days associated with the breakdown |
credit_type_id | string | The ID of the credit type associated with the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
issued_at | timestamp | The timestamp (UTC) this breakdown was issued |
status | string | DRAFT or FINALIZED |
subtotal | decimal | Deprecated field - expect to be NULL |
total | decimal | The total for the invoice |
type | string | The invoice type |
external_invoice | json | The external invoice data |
plan_id | string | Deprecated field - expect to be NULL |
contract_id | string | The contract ID associated with the invoice |
amendment_id | string | The amendment ID associated with the invoice |
correction_record | json | A list of all corrections associated with the invoice |
reseller_royalty | json | Not generally available - expect to be NULL |
custom_fields | json | Custom fields that apply to the invoice |
billable_status | string | The invoice’s billable status |
breakdown_start_timestamp | timestamp | The timestamp corresponding with the start of the breakdown window (inclusive) |
breakdown_end_timestamp | timestamp | The timestamp corresponding with the end of the breakdown window (exclusive) |
window_size | string | The size of the breakdown window. Typically DAILY |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
invoice_start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) (inclusive) |
invoice_end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) (exclusive) |
[Beta] invoice_breakdowns_line_items
Column | Type | Description |
---|---|---|
id | string | The Metronome line item breakdown ID |
invoice_breakdown_id | string | The Metronome invoice breakdown ID associated with the line item |
name | string | The name of the line item associated with the breakdown |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_timestamp | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
transfer_id | string | The Metronome transfer ID for this line item breakdown |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
quantity | decimal | The quantity of this line item breakdown row |
total | decimal | The total for the line item breakdown |
unit_price | decimal | The unit price for the line item |
product_id | string | The ID of the product for the line item |
netsuite_item_id | string | Not generally available - expect to be NULL |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
commit_id | string | The commit ID associated with the line item breakdown |
commit_segment_id | string | The commit segment ID associated with the line item breakdown |
commit_type | string | The commit type associated with the line item breakdown |
commit_netsuite_sales_order_id | string | Not generally available - expect to be NULL |
commit_netsuite_item_id | string | Not generally available - expect to be NULL |
postpaid_commit_id | string | The postpaid commit ID, if applicable |
reseller_type | string | Not generally available - expect to be NULL |
custom_fields | json | Custom fields that apply to the breakdown |
price_group_values | json | The price group values associated with the line item breakdown |
presentation_group_values | json | The presentation group values associated with the line item breakdown |
billable_metric_id | string | The billable metric ID that applies to the line item breakdown |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
metadata_json | json | Metadata |
contracts_billing_provider_configuration
Column | Type | Description |
---|---|---|
id | string | The Metronome contract billing provider configuration ID |
contract_id | string | The Metronome contract ID associated with this row |
customer_id | string | The customer ID associated with this row |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
billing_provider_config_id | string | The Metronome billing provider configuration ID associated with this row |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
contracts_product_list_item_versions
Column | Type | Description |
---|---|---|
id | string | The Metronome product list item version ID |
product_list_item_id | string | The product list item ID associated with the row |
type | string | The type of the product list item version |
version | integer | The version of the product list item |
name | string | The name of the product list item version |
starting_at | timestamp | The timestamp (UTC) the version is active starting at (inclusive) |
is_refundable | boolean | Whether or not the product list item version is refundable |
billable_metric_id | string | The billable metric ID associated with the product list item version |
composite_product_ids | json | The list of composite product IDs associated with the row |
tags | json | The list of tags associated with the row |
composite_tags | json | The list of composite tags associated with the row |
quantity_conversion | json | The quantity conversion for the row |
quantity_rounding | json | The quantity rounding for the row |
pricing_group_key | json | The pricing group key for the row |
presentation_group_key | json | The presentation group key for the row |
created_at | timestamp | The timestamp (UTC) this row was created at |
created_by | string | The entity this row was created by |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
metadata | json | Metadata |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The ID of the snapshot this row was transferred during |
contracts_rate_cards
Column | Type | Description |
---|---|---|
id | string | The Metronome contract rate card ID |
credit_type_conversions | json | The credit type conversions associated with the row |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
billing_provider | string | The billing provider associated with this row |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
snapshot_id | string | The ID of the snapshot this row was transferred during |
metadata | json | Metadata |
aliases | json | List of aliases for the rate card |
fiat_credit_type_id | string | The fiat credit type ID associated with the rate card |
fiat_credit_type_name | string | The name of the fiat credit type associated with the rate card |
created_by | string | The creator of the rate card |
created_at | timestamp | The timestamp (UTC) this row was created |
description | string | The description of the rate card |
name | string | The name of the rate card |
contracts_rate_card_entries
Column | Type | Description |
---|---|---|
id | string | The Metronome contract rate card entry ID |
rate_card_id | string | The Metronome rate card ID associated with this entry |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
product_id | string | The product ID associated with this entry |
version | integer | The version of this rate card entry |
starting_at | timestamp | The timestamp (UTC) the rate card entry starts at (inclusive) |
ending_before | timestamp | The timestamp (UTC) the rate card entry ends at (exclusive) |
entitled | boolean | Whether or not the entry is entitled |
rate | string | The rate that applies to the entry |
commit_rate | string | The commit rate that applies to the entry (if applicable) |
product_order | integer | The product order associated with the entry |
pricing_group_values | json | The pricing group values that apply to the entry |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
snapshot_id | string | The ID of the snapshot this row was transferred during |
metadata | json | Metadata |
credit_type_id | string | The credit type ID associated with the rate card |
credit_type_name | string | The name of the credit type associated with the rate card |
customer_alert_history
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the customer alert history |
customer_id | string | The name of the customer associated with the alert history |
alert_id | string | The alert ID associated with the row |
alert_status | string | The alert status associated with the row |
additional_data | json | Additional data about the alert |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
created_at | timestamp | The timestamp (UTC) of when the customer was created |
customer_billing_provider_configuration
Column | Type | Description |
---|---|---|
id | string | The Metronome contract billing provider configuration ID |
configuration | string | The configuration associated with the row |
customer_id | string | The customer ID associated with this row |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
billing_provider | string | The billing provider associated with this row |
updated_at | timestamp | The timestamp (UTC) this row was last updated |