Concepts
StubberDB
A managed PostgreSQL database automatically kept in sync with your stubs
StubberDB gives every Stubber org its own PostgreSQL schema, allowing you to query and analyze your stub data using standard SQL tooling without building any custom data pipelines.
Features
- Allows you to create and manage tabular data that is automatically kept in sync with your stubs on every execution.
- Provides a single
stubstable that contains a row for every stub in your org - Supports the same branch model as the rest of the platform, with separate draft and live schemas that mirror your org's branches, allowing you to safely build and keep production and staging data in sync with your live and draft stubs respectively
- Accessible via any standard PostgreSQL client, allowing you to query and analyze your stub data using familiar SQL tools and techniques
- Fully managed and maintained by the Stubber team, with no operational overhead for your team
- Allows you to plug in external BI (Business Intelligence) and analytics tools that support PostgreSQL as a data source
Draft and Live Schemas
Each org is provisioned with two schemas that mirror the platform's draft and live branch model:
- Draft schema — stubs and data from draft stubs are synchronized to the draft schema.
- Live schema — stubs and data from live stubs are synchronized to the live schema.
This separation means you can safely iterate on schema changes in draft without affecting your live data.
All stubberdb tasks either explicitly require a branch to be specified, or execute against the current branch of the stub.
Automatic Sync
When StubberDB is enabled on an org, the update_stubberdb action stage is added to every stub execution automatically.
Each time a stub runs, this stage synchronizes the stub's current state into the appropriate branch of the org's StubberDB schema.
Stub Table
StubberDB provides a single stubs table in each schema, which contains a row for every stub in the org.
Each row in the stubs table represents a single stub and is updated on every execution. The table contains the following columns:
Enabling StubberDB
StubberDB is enabled at the org level. Once enabled, all stubs in the org will automatically begin syncing on each execution.
Go to StubberDB org settings to enable StubberDB for your org.