BYOC Database
The byoc database contains 16 tables covering core entities, infrastructure resources, billing, and analytics.
Core Entity Tables
organizations (1,143 rows)
Top-level entity representing a company.
| Key Columns | Notes |
|---|---|
biz_id | Short alphanumeric ID |
state | 0 = inactive, 1 = active |
region_mode | Cloud region mode |
identity | Company identity/email |
accounts (1,296 rows)
Account registry under organizations. Links to org via org_id.
| State | Count |
|---|---|
| 1 (active) | 987 |
| 4 (internal) | 260 |
| -2 (deleted) | 39 |
| -1 (suspended) | 10 |
clusters (3,534 rows)
Cluster definitions. 172 currently active (not stopped, not deleted).
| Key Columns | Notes |
|---|---|
biz_id | UUID format |
account_id | References accounts.biz_id (short) |
cluster_type | CLASSIC (1,677) or ELASTIC (1,746) |
region_id | UUID, join to region_details |
stopped, deleted | Boolean lifecycle flags |
cluster_info (3,169 rows)
Enriched cluster metadata keyed by cluster UUID. Includes sr_version, is_cn_deployment, cluster_type, deleted.
region_details (25 rows)
Region dimension mapping region_id UUIDs to display names (e.g., "US East (N. Virginia) us-east-1"). Covers AWS, GCP, and Azure.
Resource & Infrastructure Tables
resource (3,506 rows)
One-to-one with clusters. All POST_PAY. resource_struct = CLASSIC or ELASTIC.
| State | Count |
|---|---|
| RUNNING | 140 |
| STOP | 164 |
| RELEASE | 2,494 |
| CREATING | 31 |
| ERROR | 677 |
resource_node (2,883 rows)
Nodes within a resource. Type is either FE (frontend) or WAREHOUSE (compute). Links to resource via resource_id.
resource_node_conf (17,669 rows)
Node configuration history: VM type, VM count, volume size, in_use flag. Links to resource_node via resource_node_id and vm_category via vm_category_id.
resource_item (27,366 rows)
Resource line items by type: BE (12,347), FE (13,683), WAREHOUSE (1,336). Links to resource_usage via resource_usage_id.
resource_usage (13,683 rows)
Resource usage periods with start_time/end_time as epoch. in_use flag tracks active periods. Links to resource via resource_id.
vm_category (1,760 rows)
VM instance type catalog mapping instance types (e.g., m5.2xlarge, r6i.8xlarge) to vCPU, memory, and unit_price. Process types: FE (426), BE (1,264). Prices in hundredths (e.g., 32000 = $320/unit).
Billing & Financial Tables
billing_order (55,064 rows)
Order lifecycle events. All BYOC service type.
| Type | Count |
|---|---|
| STOP | 13,700 |
| START | 12,800 |
| NODE_UPDATE | 6,500 |
| UPDATE | 2,800 |
| CREATE | 2,800 |
| RELEASE | 2,300 |
States: CREATED or ERROR.
bill_detail (~2M rows)
Hourly billing line items with resource_usage in CCU. Links to resource via resource_id and accounts via account_id. Data from Apr 2025 -- Mar 2026.
wallet_account (41 rows)
Org credit wallets. amount = remaining balance (some > $1M). Links to organizations via org_id.
Analytics Tables
warehouse_auto_scaling_policy (207 rows)
Auto-scaling configs per warehouse: min_size, max_size, policy JSON.
weekly_top_ccu_cluster_record (6,783 rows)
Weekly top-100 clusters by CCU usage. week_number format: YYYYWW (e.g., 202610). Includes total_cores, ccu_usage, active_days.
Relationship Hierarchy
organizations (org_id)
└── accounts (account_id, org_id → organizations.biz_id)
└── clusters (cluster_id, account_id → accounts.biz_id, region_id → region_details)
├── cluster_info (cluster → clusters.biz_id)
└── resource (resource_id, 1:1 with cluster)
├── resource_node (FE / WAREHOUSE nodes)
│ └── resource_node_conf (VM specs → vm_category)
├── resource_item (BE / FE / WAREHOUSE line items)
├── resource_usage (usage periods)
└── bill_detail (hourly CCU billing)
billing_order → tracks cluster lifecycle events
wallet_account → org-level credit balance
warehouse_auto_scaling_policy → per-warehouse scaling config
weekly_top_ccu_cluster_record → weekly analytics rollup