Spin up ephemeral databases for scratch work
Exploratory SQL is easier when you're not leaning on shared prod or a crowded staging schema. Create a throwaway managed database with an expiry, load and query in isolation, then let it disappear — no cleanup, no stepping on teammates or shared quotas.
How it works
Step 1: Create an ephemeral database
Spin up a throwaway database called scratch that auto-expires in 24 hours, so my experiments don’t linger.Step 2: Explore and query
Show the columns on our product analytics data source, then give me event counts by week for the last 24 weeks from the events table.Step 3: Load a one-off file into it
Load segment.parquet as a high_value_users table in my scratch database. What table name do I query afterward?Step 4: Run a one-off command in an auto-created database
databases run scopes a command to a short-lived database, auto-creating one (default --expires-at 24h) when you don't pass --database.
Run a one-off exploration command against a throwaway database, then let it auto-expire.Step 5: Isolate messy uploads in their own throwaway database
I’m loading a rough partner extract for a one-off QA join. Keep it in a throwaway database that expires so it doesn’t linger after we’re done.Step 6: Tear it down when you're done
Delete early, or just let expires_at clean it up for you.
I’m done with the scratch database — tear it down now instead of waiting for it to expire.Who uses this
- Analysts prototyping joins before promoting logic to scheduled jobs.
- Agents that need real compute on temporary data, scoped to a single task and torn down after.
- Platform folks who don't want half the company experimenting on one shared warehouse role.