Databricks

What Are System Tables? Databricks Monitoring & Audit Tables Complete Guide

2026-03-21
更新: 2026-03-27
NicheeLab Editorial Team

System Tables let you query operational metadata from your Databricks workspace directly with SQL, including audit logs, billing data, compute resources, and table lineage. They live as Delta Tables under the Unity Catalog system catalog, and serve as the foundation for BI, security auditing, and cost optimization. The Data Engineer Professional exam asks about the available System Tables, their use cases, and how to enable them.

System Tables Overview

System Tables are metadata tables that the Databricks platform generates and updates automatically. You do not write to them explicitly — workspace activity (job runs, table access, cluster creation, and so on) is recorded in real time. Every table lives in a schema under the system catalog.

Key Tables at a Glance

TableSchemaContentsRetention
system.access.auditaccessAudit log of every API call and UI action365 days
system.billing.usagebillingDBU consumption and per-SKU billing data365 days
system.billing.list_pricesbillingUnit prices for each SKU (including the price change history)All-time
system.compute.clusterscomputeCluster creation, configuration, and status changes365 days
system.compute.node_typescomputeAvailable instance typesLatest snapshot only
system.lakeflow.job_run_timelinelakeflowJob run timeline and task execution results365 days
system.lakeflow.job_task_run_timelinelakeflowTask-level execution timeline365 days
system.information_schema.tablesinformation_schemaMetadata for tables registered in Unity CatalogLatest snapshot only
system.information_schema.columnsinformation_schemaColumn definitions for Unity Catalog tablesLatest snapshot only
system.storage.predictive_optimization_operations_historystorageExecution history for Predictive Optimization (automatic OPTIMIZE / VACUUM)90 days

Enabling System Tables

By default, only a subset of System Tables schemas is enabled. To enable all of them, an Account Admin runs the following commands.

-- 全スキーマを有効化(アカウント管理者権限が必要)
ALTER CATALOG system ENABLE ALL SCHEMAS

-- 特定スキーマのみ有効化
ALTER CATALOG system ENABLE SCHEMA billing
ALTER CATALOG system ENABLE SCHEMA access

-- アクセス権の付与(データエンジニアグループに監査ログの読み取り権限)
GRANT SELECT ON SCHEMA system.access TO `data-engineers`
GRANT SELECT ON TABLE system.billing.usage TO `finance-team`

Audit Log Query Examples

The system.access.audit table records every API request and action taken in the workspace. Use it for security auditing and compliance reporting.

-- 過去7日間のテーブルアクセスログ(誰がどのテーブルを参照したか)
SELECT
  event_date,
  user_identity.email AS user_email,
  action_name,
  request_params.full_name_arg AS table_name,
  source_ip_address,
  response.status_code
FROM system.access.audit
WHERE action_name IN ('getTable', 'commandSubmit')
  AND event_date >= CURRENT_DATE - INTERVAL 7 DAYS
  AND request_params.full_name_arg IS NOT NULL
ORDER BY event_date DESC

-- 特定ユーザーの操作履歴(インシデント調査用)
SELECT
  event_date,
  event_time,
  action_name,
  request_params,
  response.status_code,
  source_ip_address
FROM system.access.audit
WHERE user_identity.email = '[email protected]'
  AND event_date >= '2026-03-01'
ORDER BY event_time DESC

Billing Analysis Query Examples

Join system.billing.usage with system.billing.list_prices to analyze actual costs in USD.

-- 過去30日のSKU別DBU消費量と推定コスト
SELECT
  u.sku_name,
  u.usage_unit,
  SUM(u.usage_quantity) AS total_dbu,
  ROUND(SUM(u.usage_quantity * p.pricing.default), 2) AS estimated_cost_usd
FROM system.billing.usage u
LEFT JOIN system.billing.list_prices p
  ON u.sku_name = p.sku_name
  AND u.usage_date BETWEEN p.price_start_time AND COALESCE(p.price_end_time, '2099-12-31')
WHERE u.usage_date >= CURRENT_DATE - INTERVAL 30 DAYS
GROUP BY u.sku_name, u.usage_unit
ORDER BY estimated_cost_usd DESC

-- ワークスペース別の日次コスト推移
SELECT
  u.usage_date,
  u.workspace_id,
  ROUND(SUM(u.usage_quantity * p.pricing.default), 2) AS daily_cost_usd
FROM system.billing.usage u
LEFT JOIN system.billing.list_prices p
  ON u.sku_name = p.sku_name
  AND u.usage_date BETWEEN p.price_start_time AND COALESCE(p.price_end_time, '2099-12-31')
WHERE u.usage_date >= CURRENT_DATE - INTERVAL 90 DAYS
GROUP BY u.usage_date, u.workspace_id
ORDER BY u.usage_date DESC

Cluster Monitoring Query Examples

Use the system.compute.clusters table to analyze cluster configuration, uptime, and cost efficiency.

-- アクティブなクラスタとそのスペック一覧
SELECT
  cluster_id,
  cluster_name,
  cluster_source,
  driver_node_type,
  node_type_id AS worker_node_type,
  autoscale.min_workers,
  autoscale.max_workers,
  spark_version,
  creator
FROM system.compute.clusters
WHERE delete_time IS NULL
ORDER BY cluster_name

-- 長時間稼働クラスタの検出(コスト最適化)
SELECT
  cluster_id,
  cluster_name,
  creator,
  state,
  TIMESTAMPDIFF(HOUR, last_restarted_time, CURRENT_TIMESTAMP) AS hours_since_restart
FROM system.compute.clusters
WHERE state = 'RUNNING'
  AND delete_time IS NULL
  AND TIMESTAMPDIFF(HOUR, last_restarted_time, CURRENT_TIMESTAMP) > 24
ORDER BY hours_since_restart DESC

Using Table Lineage

Lineage automatically tracked by Unity Catalog is recorded in the system.access.table_lineage and system.access.column_lineage tables. Use them to visualize data flow for impact analysis and data-quality tracking.

-- 特定テーブルの上流テーブル(データソース)を特定
SELECT
  source_table_full_name,
  target_table_full_name,
  event_date,
  entity_type
FROM system.access.table_lineage
WHERE target_table_full_name = 'gold.analytics.daily_revenue'
  AND event_date >= CURRENT_DATE - INTERVAL 30 DAYS
GROUP BY source_table_full_name, target_table_full_name,
         event_date, entity_type
ORDER BY event_date DESC

Operational Best Practices

  • Always specify filters: System Tables hold huge volumes of records, so omitting an event_date or usage_date filter in the WHERE clause can drive query costs through the roof.
  • Aggregate into gold tables: Pre-aggregate frequently used metrics into a materialized view or Delta Table, and visualize them in a Databricks SQL dashboard.
  • Configure alerts: Use Databricks SQL alerts to detect cost thresholds and unusual access patterns.
  • Long-term storage: If you need data beyond the 365-day retention window, export it to external storage on a scheduled job.

Sample Question

System Tables - Audit Logs

問題 1

The security team needs to identify every user who accessed a specific table in the Databricks workspace over the past 30 days. Which approach is most appropriate?

  1. Query system.information_schema.tables to look up the table owner.
  2. Query system.access.audit, filter by event_date and request_params.full_name_arg, and aggregate user_identity.email.
  3. Run DESCRIBE HISTORY against the table and identify readers from the userIdentity column.
  4. Query system.billing.usage and pick out users whose DBU consumption corresponds to table access.

正解: B

system.access.audit records every API request in the workspace, including both reads and writes against tables. Narrowing the window with event_date, filtering on request_params.full_name_arg, and aggregating user_identity.email gives you exactly the list of accessors. DESCRIBE HISTORY only captures table mutations (WRITE, MERGE, etc.) and not SELECTs. information_schema only exposes ownership metadata, and billing.usage does not break access down by table.

Frequently Asked Questions

What permissions are required to enable System Tables?

System Tables live under the Unity Catalog system catalog, and enabling them requires Account Admin privileges. You can either run ALTER CATALOG system ENABLE ALL SCHEMAS or toggle them from the System Tables settings screen in the account console. After enabling, access to each table is controlled with Unity Catalog GRANT statements at the schema or table level.

How long is data retained in System Tables?

It depends on the table. system.access.audit (audit logs), system.billing.usage (billing data), and system.compute.clusters (cluster info) are each retained for 365 days. system.billing.list_prices (list prices) keeps the full history of price changes indefinitely. Data beyond the retention window is purged automatically, so use ETL to copy it into another table if you need long-term storage.

Do queries against System Tables incur compute costs?

Yes. SQL queries against System Tables consume DBUs (Databricks Units) just like any other Delta Table query. system.access.audit in particular holds a huge number of records, so an unfiltered SELECT * can get expensive. Always filter on event_date, action_name, or similar columns in the WHERE clause, and pre-aggregate common metrics into materialized views or gold tables to keep costs down.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Databricks

Databricks Certifications: All 7 Exams, Difficulty & Study Plan (2026)

Complete guide to all 7 Databricks certifications — Data Eng...

Databricks

Databricks Exam Difficulty Ranking: All 7 Certs Compared (2026)

Every Databricks certification ranked by difficulty, with st...

Databricks

Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)

How to pass Databricks certifications efficiently. Official ...

Databricks

Databricks Data Engineer Associate: Complete Guide (2026)

Domain-by-domain breakdown of the Databricks Certified Data ...

Databricks

Databricks Data Engineer Professional: Complete Guide (2026)

Tactics for the Databricks Certified Data Engineer Professio...

Browse all Databricks articles (110)
© 2026 NicheeLab All rights reserved.