Skip to main content

Export Metronome data

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 once a day.

Get started

To set up your destination data warehouse, please 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, please contact your Metronome representative.

Data warehouse

  • BigQuery
  • Clickhouse
  • Databricks
  • Redshift
  • Snowflake

Database

  • Athena
  • MySQL
  • Postgres
  • SingleStore

Object storage

  • Google Cloud Storage
  • S3
Append-Only

Object storage destinations listed above will 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 will need to handle these appropriately by using the most recent data for each row.

Folder Structure

The data will appear in the following 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 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 2006-01-01, while <transfer_timestamp> is of the form 20060102150405.
  • <file_part> is a monotonically increasing integer for a given timestamp, and does not carry any special meaning.

Data availability

Metronome can export these types of sandbox and production data:

Metronome dataTable nameTransfer Frequency†Average Freshness††
Alertsalert3 hours6 hours
Alertscustomer_alert_history3 hours6 hours
Finalized Invoicesinvoice3 hours6 hours
Finalized Invoicesline_item3 hours6 hours
Finalized Invoicessub_line_item3 hours6 hours
Draft Invoicesdraft_invoice24 hoursn/a
Draft Invoicesdraft_line_item24 hoursn/a
Draft Invoicesdraft_sub_line_item24 hoursn/a
Credit Grantscredit_grant3 hours6 hours
Credit Grantscredit_grant_deduction3 hours6 hours
Eventsevents3 hours3 hours
Customerscustomer3 hours6 hours
Planscredit_type3 hours6 hours
Plansplan_charge3 hours6 hours
Plansplan3 hours6 hours
Plansproduct3 hours6 hours

† Transfer frequency indicates the frequency at which new records will be 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.

Alerts

Includes alerts and the history of customer alerts being 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;

Example2 - 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 and sub-line items.

Tables

Note: Sub line items with a quantity of zero will not be exported.

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 usage-based totals

SELECT DATE_TRUNC("MONTH", i.end_timestamp) AS month,
CASE WHEN sli.billable_metric_id IS NULL THEN 'NON_USAGE' ELSE 'USAGE' END AS charge_type
, SUM(sli.subtotal) AS total
FROM invoice i
JOIN line_item li ON i.id = li.invoice_id
JOIN sub_line_item sli ON sli.line_item_id = li.id
GROUP BY 1, 2
ORDER BY 2, 1;

Draft Invoices

Includes all invoices to customers that are in a draft state. These tables are daily snapshots of invoices based on the configuration and usage at a point-in-time throughout 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, sub 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

Note: Sub line items with a quantity of zero will not be exported.

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 plan from most recent snapshot

SELECT plan_id, plan_name, 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,2
ORDER BY 1;

Example 3 - Fetch daily usage-based totals

SELECT snapshot_time,
CASE WHEN billable_metric_id IS NULL THEN 'NON_USAGE' ELSE 'USAGE' END AS charge_type
, SUM(subtotal)
FROM draft_sub_line_item
GROUP BY 1, 2
ORDER BY 2, 1;

Credit Grants

Includes credit grant information required to reconstruct a ledger. The credit_grant table will contain all the credit grants and the credit_grant_deduction table contains all the deductions (either through consumption or expiration) that occurred on a given grant.

Tables

Example 1 - Fetch expired credit grants per month

SELECT DATE_TRUNC('MONTH', effective_at), SUM(amount) FROM credit_grant_deduction
WHERE memo = 'Credits expired'
GROUP BY 1
ORDER BY 1;

Events

The full set of de-duplicated 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;

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 whether or not the customer is active.

Tables

Example 1 - Fetch total active customers

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

Plans

Includes default pricing information for every plan with their corresponding credit types. A credit type may be a fiat currency such as USD or GBP or a custom pricing unit.

Tables

Example 1 - Fetch all charges for a given plan

SELECT * FROM plan_charge WHERE plan_id = 'deadbeef-0000-0000-0000-0000deadbeef';

Example 2 - Fetch all plans starting in the next 7 days

SELECT * FROM plan WHERE starting_on >= CURRENT_DATE() AND starting_on <= DATEADD("DAY", 7, CURRENT_DATE());
Daily Sync

Data is exported once per day, which means that some data may be up to 24 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.

ERD

Browse our interactive Entity Relationship Diagram that shows our full Schema and its relationships, as well as slices of the data to help you better visualize which tables are connected to each other.

(Scroll tables to the right to view the data types for every destination.)

metadata

Clients using Metronome have different external systems that require different metadata to be stored. This metadata is client specific and stored as a JSON object in the metadata column of each table and on some of the JSON encoded objects too.

The metadata column will also include any custom fields under a custom_fields JSON object if they exist.

alert

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe alert IDNtexttextvarcharstringstring
nameThe name of the alertNtexttextvarcharstringstring
alert_typeThe type of alertYtexttextvarcharstringstring
thresholdThe threshold to trigger the alertNdecimaldecimaldecimalnumericdecimal
webhooks_enabledIndicates if the alert is configured for webhooksNbooleanbooleanbooleanbooleanboolean
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
created_atThe timestamp (UTC) of when the alert was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp
disabled_atThe timestamp (UTC) of when the alert was disabledNtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) of when the alert was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

billable_metric

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe Billable Metric IDNtexttextvarcharstringstring
aggregateThe aggregation typeNtexttextvarcharstringstring
aggregate_keysThe keys used for aggregationNtexttextvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
group_keysThe keys associated with this metricNjsonbvariantvarcharstringstring
nameThe name of this metricNtexttextvarcharstringstring
created_atThe timestamp (UTC) of when the billable_metric was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp
archived_atThe timestamp (UTC) of when the billable_metric was deletedNtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) of when the billable_metric was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

credit_grant

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe credit grant IDNtexttextvarcharstringstring
customer_idThe customer ID associated with the credit grantNtexttextvarcharstringstring
nameThe name of the credit grantNtexttextvarcharstringstring
invoice_idThe ID of the invoice with the purchase charge for the credit grant, if applicableYtexttextvarcharstringstring
priorityThe priority of the credit grantNdecimaldecimaldecimalnumericdecimal
reasonThe reason of the credit grantYtexttextvarcharstringstring
amount_grantedThe amount of credit grantedNdecimaldecimaldecimalnumericdecimal
amount_granted_credit_type_idThe credit type ID for the amount grantedNtexttextvarcharstringstring
amount_paidThe amount paid for the credit grantNdecimaldecimaldecimalnumericdecimal
amount_paid_credit_type_idThe credit type ID for the amount paidNtexttextvarcharstringstring
custom_fieldsCustom fields attached to the credit grantYjsonbvariantvarcharstringstring
product_idsThe products which the credit grant are applied to; this will be "[]" if the credit grant applies to all productsNjsonbvariantvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
created_atThe timestamp (UTC) of when the credit grant was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) of when the credit grant was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
effective_atThe timestamp (UTC) of when the credit grant is effective fromNtimestamptztimestamp_tztimestamptztimestamptimestamp
expires_atThe timestamp (UTC) of when the credit grant expires atNtimestamptztimestamp_tztimestamptztimestamptimestamp
voided_atThe timestamp (UTC) of when the credit grant was voided, if applicableYtimestamptztimestamp_tztimestamptztimestamptimestamp
credit_grant_typeThe optional credit grant type specified during grant creationYtexttexttexttimestamptimestamp

credit_grant_deduction

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe credit grant deduction IDNtexttextvarcharstringstring
credit_grant_idThe credit grant ID associated with the credit grant deductionNtexttextvarcharstringstring
amountThe amount of credit deductedNdecimaldecimaldecimalnumericdecimal
memoThe memo of the credit grant deductionNtexttextvarcharstringstring
invoice_idThe invoice ID associated with the credit grant deductionNtexttextvarcharstringstring
effective_atThe timestamp (UTC) of when the credit grant deduction occurredNtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) this row was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

credit_type

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe credit type IDNtexttextvarcharstringstring
nameThe name of the credit typeNtexttextvarcharstringstring
is_currencyWhether or not the credit type is a currency, TRUE or FALSENbooleanbooleanbooleanboolboolean
environment_typeThe Metronome environment, SANDBOX or PRODUCTION; this will always be NULL for currenciesYtexttextvarcharstringstring
updated_atThe timestamp (UTC) this row was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
_metronome_metadata_idMetronome metadata IDNtexttextvarcharstringstring

customer_alert_history

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe customer alert IDNtexttextvarcharstringstring
customer_idThe customer ID associated with the alertNtexttextvarcharstringstring
alert_idThe alert IDNtexttextvarcharstringstring
alert_statusThe status of the triggered alertNtexttextvarcharstringstring
additional_dataAdditional data included in the alertYjsonbvariantvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
created_atThe timestamp (UTC) of the alert was triggeredNtimestamptztimestamp_tztimestamptztimestamptimestamp

customer

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe Metronome ID of the customerNtexttextvarcharstringstring
nameThe name of the customerNtexttextvarcharstringstring
ingest_aliasesThe ingest aliases of the customerNjsonbvariantvarcharstringstring
salesforce_account_idThe Salesforce account ID for the customerYtexttextvarcharstringstring
billing_provider_typeThe billing provider connected to customerYtexttextvarcharstringstring
billing_provider_customer_idThe billing provider ID of the customerYtexttextvarcharstringstring
custom_fieldsCustom fields attached to the customerYjsonbvariantvarcharstringstring
environment_typeThe Metronome environmentNtexttextvarcharstringstring
created_atThe timestamp (UTC) of when the customer was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) of when the customer was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
archived_atThe timestamp (UTC) of when the customer was archived, if applicableYtimestamptztimestamp_tztimestamptztimestamptimestamp

draft_invoice

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
_metronome_metadata_idUnique identifier for each draft invoice ID + snapshot_time pairNtexttextvarcharstringstring
idThe Metronome invoice IDNtexttextvarcharstringstring
statusThe Metronome invoice status: DRAFT or DRAFT_INCOMPLETE (see the invoice table for FINALIZED and VOID invoices)Ntexttextvarcharstringstring
totalThe invoice totalYdecimaldecimaldecimalnumericdecimal
credit_type_idThe credit type ID for the invoiceNtexttextvarcharstringstring
credit_type_nameThe name of the credit type associated with the invoiceNtexttextvarcharstringstring
customer_idThe Metronome ID of the customerNtexttextvarcharstringstring
plan_idThe plan ID associated with the invoiceNtexttextvarcharstringstring
plan_nameThe name of the plan associated with the invoiceNtexttextvarcharstringstring
start_timestampBeginning of the usage period that this invoice covers (UTC)Ntimestamptztimestamp_tztimestamptztimestamptimestamp
end_timestampEnd of the usage period that this invoice covers (UTC)Ntimestamptztimestamp_tztimestamptztimestamptimestamp
billing_provider_invoice_idThe external invoice ID from the billing provider (e.g., Stripe)Ytexttextvarcharstringstring
billing_provider_invoice_created_atThe timestamp (UTC) the external invoice was created by MetronomeYtimestamptztimestamp_tztimestamptztimestamptimestamp
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
updated_atThe timestamp (UTC) this row was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
snapshot_timeThe timestamp (UTC) aligning with the start of the snapshotNtimestamptztimestamp_tztimestamptztimestamptimestamp
labelThe categorical label of the invoiceYtexttextvarcharstringstring

draft_line_item

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
_metronome_metadata_idOpaque unique identifier for each rowNtexttextvarcharstringstring
idThe line item IDNtexttextvarcharstringstring
invoice_idThe Metronome invoice ID associated with the line itemNtexttextvarcharstringstring
credit_grant_idThe credit grant ID associated with the line itemNtexttextvarcharstringstring
credit_type_idThe credit type ID associated with the line itemNtexttextvarcharstringstring
credit_type_nameThe name of the credit type associated with the line itemNtexttextvarcharstringstring
nameThe line item descriptionNtexttextvarcharstringstring
quantityThe quantity associated with the line item; this will always be 1 for invoice adjustmentsYdecimaldecimaldecimalnumericdecimal
totalThe line item totalNdecimaldecimaldecimalnumericdecimal
commit_idThe commit ID associated with the line item. Only present for beta Contract InvoicesYtexttextvarcharstringstring
product_idThe product ID associated with the line item; this will always be NULL for invoice adjustmentsYtexttextvarcharstringstring
group_keyThe group key associated with the line itemYtexttextvarcharstringstring
group_valueThe group value associated with the line itemYtexttextvarcharstringstring
is_proratedIndicates if the value is prorated over the period. For subscription charges only.Ybooleanbooleanbooleanbooleanboolean
updated_atThe timestamp (UTC) of when the line item was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
snapshot_timeThe timestamp (UTC) aligning with the start of the snapshotNtimestamptztimestamp_tztimestamptztimestamptimestamp

draft_sub_line_item

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
_metronome_metadata_idOpaque unique identifier for each rowNtexttextvarcharstringstring
idThe sub line item IDNtexttextvarcharstringstring
line_item_idThe line item ID associated with the sub line itemNtexttextvarcharstringstring
nameThe sub line item descriptionNtexttextvarcharstringstring
quantityThe quantity associated with the sub line itemYdecimaldecimaldecimalnumericdecimal
subtotalThe subtotal associated with the sub line itemYdecimaldecimaldecimalnumericdecimal
charge_idThe charge ID associated with the sub line itemNtexttextvarcharstringstring
is_proratedIndicates if the value is prorated over the period. For subscription charges only.Ybooleanbooleanbooleanbooleanboolean
billable_metric_idThe billable metric ID associated with the sub line itemYtexttextvarcharstringstring
billable_metric_nameThe name of the billable metric associated with the sub line itemYtexttextvarcharstringstring
tiersInformation about the tiers associated with the sub line item, including sub_line_item_id, name, quantity, subtotal, updated_at, price, and starting_atYjsonbvariantvarcharstringstring
updated_atThe timestamp (UTC) this row was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
snapshot_timeThe timestamp (UTC) aligning with the start of the snapshotNtimestamptztimestamp_tztimestamptztimestamptimestamp

events

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
transaction_idThe unique ID of the eventNtexttextvarcharstringstring
customer_idThe ID of the customer the event applies toNtexttextvarcharstringstring
timestampThe timestamp (UTC) of the eventNtimestamptztimestamp_tztimestamptztimestamptimestamp
event_typeThe event typeNtexttextvarcharstringstring
propertiesThe properties of the eventNjsonbvariantvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
_metronome_metadata_idMetronome metadata IDNtexttextvarcharstringstring

invoice

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe Metronome invoice IDNtexttextvarcharstringstring
statusThe Metronome invoice status: FINALIZED or VOIDNtexttextvarcharstringstring
totalThe invoice totalNdecimaldecimaldecimalnumericdecimal
credit_type_idThe credit type ID for the invoiceNtexttextvarcharstringstring
credit_type_nameThe name of the credit type associated with the invoiceNtexttextvarcharstringstring
customer_idThe Metronome ID of the customerNtexttextvarcharstringstring
plan_idThe plan ID associated with the invoiceNtexttextvarcharstringstring
plan_nameThe name of the plan associated with the invoiceNtexttextvarcharstringstring
start_timestampBeginning of the usage period that this invoice covers (UTC)Ntimestamptztimestamp_tztimestamptztimestamptimestamp
end_timestampEnd of the usage period that this invoice covers (UTC)Ntimestamptztimestamp_tztimestamptztimestamptimestamp
billing_provider_invoice_idThe external invoice ID from the billing provider (e.g., Stripe)Ytexttextvarcharstringstring
billing_provider_typeThe type of external system billing provider (e.g. Stripe, NetSuite)Ytexttextvarcharstringstring
billing_provider_invoice_created_atThe timestamp (UTC) the external invoice was created by MetronomeYtimestamptztimestamp_tztimestamptztimestamptimestamp
billing_provider_invoice_external_statusThe status of the invoice in the external system (e.g. Stripe, NetSuite)Ytexttextvarcharstringstring
invoice_labelThe categorical label of the invoiceNtexttextvarcharstringstring
issued_atThe timestamp (UTC) the invoices was issued.Ntimestamptztimestamp_tztimestamptztimestamptimestamp
metadataMetadataYjsonbvariantvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
updated_atThe timestamp (UTC) this row was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

invoice_corrections

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe Metronome invoice correction IDNtexttextvarcharstringstring
invoice_idThe Metronome invoice ID associated with the correctionNtexttextvarcharstringstring
base_invoice_idThe Metronome invoice ID associated with the correctionNtexttextvarcharstringstring
reasonThe reason for the correctionNtexttextvarcharstringstring
memoThe memo for the correctionNtexttextvarcharstringstring
sequence_numberIndicates if the correction is one of many applied to invoiceNtexttextvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
created_atThe timestamp (UTC) this correction was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp

line_item

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe line item IDNtexttextvarcharstringstring
invoice_idThe Metronome invoice ID associated with the line itemNtexttextvarcharstringstring
credit_grant_idThe credit grant ID associated with the line itemNtexttextvarcharstringstring
credit_type_idThe credit type ID associated with the line itemNtexttextvarcharstringstring
credit_type_nameThe name of the credit type associated with the line itemNtexttextvarcharstringstring
nameThe line item descriptionNtexttextvarcharstringstring
quantityThe quantity associated with the line item; this will always be 1 for invoice adjustmentsYdecimaldecimaldecimalnumericdecimal
totalThe line item totalNdecimaldecimaldecimalnumericdecimal
commit_idThe commit ID associated with the line item. Only present for beta Contract InvoicesYtexttextvarcharstringstring
product_idThe product ID associated with the line item; this will always be NULL for invoice adjustmentsYtexttextvarcharstringstring
group_keyThe group key associated with the line itemYtexttextvarcharstringstring
group_valueThe group value associated with the line itemYtexttextvarcharstringstring
unit_priceThe price associated with the line itemYdecimaldecimaldecimalnumericdecimal
starting_onThe timestamp (UTC) of when the line item is effective from (inclusive)Ytimestamptztimestamp_tztimestamptztimestamptimestamp
ending_beforeThe timestamp (UTC) of when the line item is effective to (exclusive)Ytimestamptztimestamp_tztimestamptztimestamptimestamp
pricing_group_valuesOptional pricing group values arrayYjsonbvariantvarcharstringstring
metadataMetadataYjsonbvariantvarcharstringstring
updated_atThe timestamp (UTC) of when the line item was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

sub_line_item

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe sub line item IDNtexttextvarcharstringstring
line_item_idThe line item ID associated with the sub line itemNtexttextvarcharstringstring
nameThe sub line item descriptionNtexttextvarcharstringstring
quantityThe quantity associated with the sub line itemYdecimaldecimaldecimalnumericdecimal
subtotalThe subtotal associated with the sub line itemYdecimaldecimaldecimalnumericdecimal
charge_idThe charge ID associated with the sub line itemNtexttextvarcharstringstring
billable_metric_idThe billable metric ID associated with the sub line itemYtexttextvarcharstringstring
billable_metric_nameThe name of the billable metric associated with the sub line itemYtexttextvarcharstringstring
tiersInformation about the tiers associated with the sub line item, including sub_line_item_id, name, quantity, subtotal, updated_at, price, and starting_atYjsonbvariantvarcharstringstring
updated_atThe timestamp (UTC) this row was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

plan_charge

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idMetronome metadata IDNtexttextvarcharstringstring
charge_idThe ID of the plan chargeNtexttextvarcharstringstring
nameThe name of the plan chargeNtexttextvarcharstringstring
plan_idThe ID of the plan associated with the plan chargeNtexttextvarcharstringstring
product_idThe ID of the product associated with the plan chargeNtexttextvarcharstringstring
product_nameThe name of the product associated with the plan chargeNtexttextvarcharstringstring
billable_metric_idThe ID of the billable metric associated with the plan chargeYtexttextvarcharstringstring
billable_metric_nameThe name of the billable metric associated with the plan chargeYtexttextvarcharstringstring
start_periodThe starting period of the associated plan chargeNdecimaldecimaldecimaldecimaldecimal
credit_type_idThe credit type IDNtexttextvarcharstringstring
credit_type_nameThe credit type nameNtexttextvarcharstringstring
charge_typeThe type of charge ("usage", "fixed", "composite", "minimum", or "seat")Ntexttextvarcharstringstring
quantityThe default quantity of the plan chargeYdecimaldecimaldecimaldecimaldecimal
environment_typeThe environment of the plan chargeNtexttextvarcharstringstring
pricesThe prices associated with the plan chargeNjsonbvariantvarcharstringstring
custom_fieldsCustom fields attached to the chargeYjsonbvariantvarcharstringstring
updated_atThe timestamp (UTC) of when the plan charge was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

plan

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe plan IDNtexttextvarcharstringstring
nameThe name of the planNtexttextvarcharstringstring
descriptionThe description of the planNtexttextvarcharstringstring
billing_frequencyThe frequency of billing for the planNtexttextvarcharstringstring
starting_onThe timestamp (UTC) this plan startedNtimestamptztimestamp_tztimestamptztimestamptimestamp
custom_fieldsCustom fields attached to the planYjsonbvariantvarcharstringstring
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
created_atThe timestamp (UTC) of when the plan was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp
deprecated_atThe timestamp (UTC) of when the plan was deprecated, if applicableYtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) of when the plan was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp

product

Column nameDescriptionNullable?Postgres data typeSnowflake data typeRedshift data typeBigQuery data typeDatabricks data type
idThe product IDNtexttextvarcharstringstring
nameThe name of the productNtexttextvarcharstringstring
descriptionThe description of the productNtexttextvarcharstringstring
custom_fieldsCustom fields attached to the productYjsonbvariantvarcharstringstring
created_atThe timestamp (UTC) of when the product was createdNtimestamptztimestamp_tztimestamptztimestamptimestamp
environment_typeThe Metronome environment, SANDBOX or PRODUCTIONNtexttextvarcharstringstring
deprecated_atThe timestamp (UTC) of when the product was deprecated, if applicableYtimestamptztimestamp_tztimestamptztimestamptimestamp
updated_atThe timestamp (UTC) of when the product was last updatedNtimestamptztimestamp_tztimestamptztimestamptimestamp
Metronome logoMetronome logo