System Tables: Accessing Audit Logs and Usage Data
Who this is for:
Architecture / Concept Overview: System Tables: Accessing Audit Logs and Usage Data
System tables live in the system catalog and are organised into schemas that map to functional areas — billing, access, compute, and more.
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
graph TD
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
SYS[system Catalog] --> BILLING[system.billing<br/>usage · list_prices]
SYS --> ACCESS[system.access<br/>audit · table_lineage · column_lineage]
SYS --> COMPUTE[system.compute<br/>clusters · warehouses]
SYS --> QUERY[system.query<br/>history]
SYS --> INFO[system.information_schema<br/>tables · columns · constraints]
SYS --> MARKET[system.marketplace<br/>listings]
SYS:::governance
BILLING:::ingestion
ACCESS:::governance
COMPUTE:::processing
QUERY:::processing
INFO:::serving
MARKET:::source
*Figure 1 — System catalog organisation: billing, access, compute, query, and information schema tables.*
System tables feed governance, cost management, and operational monitoring workflows.
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
flowchart LR
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
SYSTBL[System Tables] --> COST[Cost Management<br/>DBU tracking · Chargeback]
SYSTBL --> GOV[Governance<br/>Audit · Access reviews]
SYSTBL --> PERF[Performance<br/>Query optimisation · SLA tracking]
SYSTBL --> SEC[Security<br/>Anomalous access · Failed logins]
SYSTBL:::governance
COST:::ingestion
GOV:::governance
PERF:::processing
SEC:::source
*Figure 2 — Four primary use cases for system tables: cost management, governance, performance, and security.*
Key Terms
Prerequisites and Setup
- Account admin role to enable system tables
USE CATALOGon thesystemcatalogSELECTon the specific system tables you want to query- A SQL warehouse for executing system table queries
Step-by-Step Implementation
Configuration Reference
| System Table | Schema | Key Columns | Retention |
|---|---|---|---|
usage | system.billing | usage_date, sku_name, usage_quantity, workspace_id | 1 year |
list_prices | system.billing | sku_name, pricing, usage_unit | Current prices |
audit | system.access | event_time, action_name, user_identity, request_params | 1 year |
table_lineage | system.access | source_table_full_name, target_table_full_name, event_time | 1 year |
column_lineage | system.access | source_column_name, target_column_name, event_time | 1 year |
history | system.query | statement_id, statement_text, total_duration_ms | 30 days |