Skip to main content
PREMIUM ADD-ON ✨This Lago Data Pipeline feature is available upon request only. Please contact us to get access to this premium feature.
Lago Data Pipeline lets you automate the flow of your billing, Contract, and usage data into your analytics and storage systems. Use it to run queries in your warehouse or to build dashboards for your finance team from data that stays in sync.

Prerequisites

  • Data sync frequency: 1 day by default, but we can go down to 15 minutes;
  • Data transfers: Incremental or Backfill; and
  • Data security: a high level of security and encryption.

Data destinations

You can sync your Lago data to any of the following destinations:

Data sources

Lago syncs one dataset to your destination, whichever billing engine your organization uses: plans and subscriptions, or the product catalog with contracts and rate cards. The table names, column names and their meaning are the same for both, so an organization that moves to the product catalog keeps the same tables and queries.
  • Tables that only apply to one billing engine are synced for every organization, and are empty when your organization does not use that engine. For example, the product catalog tables below are empty for an organization billing with plans and subscriptions.
  • Tables used by both billing engines, such as fees and daily_usages, have additional columns for the product catalog. These columns are always added after the existing ones and are empty for rows that do not come from the product catalog. Existing columns are never renamed, removed or reordered.
Every table has an organization_id column, a lago_id primary key and an updated_at column used for incremental syncs. See the Data Pipeline schema for the columns of every table.

Tables

These tables are filled for every organization, whatever its billing engine:

Plans and subscriptions tables

These tables are empty for an organization billing with the product catalog:

Product catalog tables

These tables hold the product catalog and are empty for an organization that does not use it: Product catalog plans are in catalog_plans, separate from the plans table used by plans and subscriptions.

Deleted records

The sync only adds and updates rows in your destination, so deletions in Lago are exported as data:
  • When a table keeps deleted records, the row is still synced and its deleted_at column holds the deletion date. Filter on deleted_at IS NULL to keep active records only.
  • When a record is removed from Lago, a row is added to the record_deletions table with the name of its table in table_name and its id in lago_record_id. Delete or ignore the matching rows in your destination.
record_deletions covers the following tables: fees, fees_taxes, invoice_subscriptions, invoices_taxes, credit_notes_taxes, billing_entities_taxes, customers_taxes, rate_cards_taxes, plans_taxes and contract_rate_cards_terms.
Rows in record_deletions are kept for one month. If the sync to your destination is paused for longer than that, deletions from that period are not exported, and a full resync of the affected tables is needed to remove the deleted records from your destination.