Skip to content

Data export & warehouse sinks

Data export & warehouse sinks

Cbox Billing exposes every billing dataset — invoices, subscriptions, customers, the recurring-revenue bridge, credit notes, payments, coupons, dunning, seats, licenses and the raw usage-event stream — as a streamed, typed export, and stages those datasets to object storage the way Snowflake, BigQuery and Redshift actually ingest at scale.

There are two delivery surfaces, both real:

  1. On-demand exports — pick a dataset, a format (CSV or NDJSON) and an optional date range in the console (Data → Exports), or hit the streamed download route, and get the current plane's data. Every export streams straight from the database with a chunked cursor, so memory stays bounded no matter how large the table.
  2. Warehouse sinks — a configured sink stages each dataset as partitioned NDJSON/CSV files in an object-store disk (s3 or any Laravel filesystem disk), writes a JSON delivery manifest alongside, and emits the exact per-warehouse load manifest (COPY INTO / bq load / DDL) an operator or a scheduled loader runs. A scheduled warehouse:sync ships only rows changed since each dataset's watermark.

The honest boundary: staged files (real) vs direct push (seam)

Warehouses load at scale from staged files in object storage, not row-by-row inserts. That staged-file + load-manifest path is fully built and fully functional with nothing more than object-store credentials — there is no bundled warehouse SDK and no fabricated client. Pushing the staged files into the warehouse over a live API is left to an explicit, documented seam (WarehousePush) whose shipped default is a no-op. This keeps the app honest: everything it claims to do, it does.

In this section