Table DDL logs

The DDL log records every change the platform made to your tables, one run at a time: what changed, which statements ran, and what failed. It sits in the ClickHouse tab of Observability, next to the views described in ClickHouse activity.

Open the DDL log

  1. Open Observability from the sidebar.
  2. Click ClickHouse in the row of tabs at the top.
  3. Click DDL log in the view toggle.

The DDL log appears in the toggle only if your role holds View Table DDLs. See Permissions below.

Read the run list

Each row is one run, and the list opens with the newest first. Use the search box, the column filters and Period to narrow it; Periods, filters and exports describes how these shared controls behave.

ColumnWhat it shows
Started AtWhen the run started.
Statusrunning, succeeded or failed.
KindWhat the run did: create, drop, alter, truncate, delete, insert, refresh, replace or sync.
Database and TableThe database and the table the run changed.
DurationHow long the run took: milliseconds under a second, seconds under a minute, then minutes and seconds.
ErrorThe run's error, when it failed. The column is not sortable.
Finished AtWhen the run finished.
UserThe user the run is recorded for.
Table IDThe table's identifier, shown as a number when present.
Run IDThe run's identifier.

Status and Kind are colour-toned badges: red for a failure and for destructive kinds such as drop, truncate and delete, green for a success, informational for in-progress states and for create and replace, and amber for alter.

Open a run

  1. Click a row to open the run's details on the right; click the same row again to close them.
  2. Read the header: the changed table's name, the run's status and kind, its duration, the number of statements the run holds and how many failed, and when the run started.
  3. Read the notices above the statements: Run error when the run failed, and Recreation reasons when the platform recorded reasons for recreating the table.
  4. Read the Statements list, described below.
  5. Expand Schema changes, collapsed by default, to see the schema changes recorded for the run.

Read the statements

The Statements list is a timeline of what the run executed, in order. When the panel opens, the first failed statement is already expanded; if none failed, the first statement is.

Export the log

  1. Set Period, and filter or search as needed.
  2. In the export control in the toolbar, pick CSV, Excel, JSON or TSV, then click the download icon next to it.

Periods and limits

Permissions

To do thisYou need
See the DDL logView Table DDLs, preset Table DDL Viewer
Export the logExport Table DDLs, preset Table DDL Manager

The Observability Administrator preset includes both. The Observability Viewer preset includes viewing the log but not exporting it. See Roles and permissions and the Permission reference.

Questions, answered

A Warehouse table was recreated. How do I find out why?

Open Observability > ClickHouse > DDL log, set Period to cover the change, and find the run for that table. Open the run. When the platform recorded reasons for the recreation, its Recreation reasons notice lists them.

Who changed a table?

Find the change in the DDL log and read its User column, which shows the user the run is recorded for. Open the run to see the statements it executed.

Why does the timeline show CREATE TABLE when the SQL says CREATE OR REPLACE TABLE?

The operation next to a statement collapses common modifiers, so CREATE OR REPLACE TABLE and CREATE TABLE IF NOT EXISTS both read CREATE TABLE. The recorded SQL itself is unchanged.

Why does a rename statement show the old table name?

The label takes the first table name the statement mentions. For a rename, that is the table being renamed; the new name appears on the line below.

Why is a statement's SQL cut off?

Long SQL is clamped at 12 lines so the panel stays readable. Use Show all N lines to expand it, and Show less to collapse it again.

A run is marked Failed. Where do I see the error?

Open the run. A Run error notice shows the run's error, and each failed statement carries a Statement error notice with its own reason. The Error column also shows the run's error in the list.

Why does a run show no statements?

The record for that run holds no statements, and the panel says so. When present, the Recreation reasons and Schema changes parts still describe the change.

What is in the Schema changes section?

The schema changes the run recorded, kept as structured JSON. It stays collapsed by default; expand it to read it.

Why can't I sort the Error column?

The Error column is not sortable. To find failures, filter Status to failed, or filter the Error column itself.

Why is the export button missing on the DDL log?

Exporting needs Export Table DDLs, which is separate from reading the log. Ask an administrator for the Table DDL Manager preset or the permission.

What is the difference between the DDL log and Query Management?

The DDL log follows the table changes the platform made and the statements inside each run. Query Management holds the queries themselves, including the platform's own queries. Use the DDL log for a table's history, and Query Management to find, reuse or investigate queries.

Why can't I see the DDL log?

The view needs View Table DDLs. It appears in the ClickHouse view toggle only if your role holds it; ask an administrator for the Table DDL Viewer preset or the permission.