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 CATALOG on the system catalog
    • SELECT on the specific system tables you want to query
    • A SQL warehouse for executing system table queries

    Step-by-Step Implementation

      Configuration Reference

      System Tables: Accessing Audit Logs and Usage Data configuration options
      System TableSchemaKey ColumnsRetention
      usagesystem.billingusage_date, sku_name, usage_quantity, workspace_id1 year
      list_pricessystem.billingsku_name, pricing, usage_unitCurrent prices
      auditsystem.accessevent_time, action_name, user_identity, request_params1 year
      table_lineagesystem.accesssource_table_full_name, target_table_full_name, event_time1 year
      column_lineagesystem.accesssource_column_name, target_column_name, event_time1 year
      historysystem.querystatement_id, statement_text, total_duration_ms30 days

      Monitoring, Cost, and Security Considerations

      Common Pitfalls and Recommended Patterns

        Frequently Asked Questions