-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathiceberg-dba-dashboard.json
More file actions
395 lines (395 loc) · 13.9 KB
/
Copy pathiceberg-dba-dashboard.json
File metadata and controls
395 lines (395 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
{
"$schema": "https://altinity.com/schemas/altinity-sql-browser/portable-bundle-v1.schema.json",
"format": "altinity-sql-browser/portable-bundle",
"version": 1,
"exportedAt": "2026-07-13T09:08:20.678Z",
"metadata": {
"name": "Iceberg catalog explorer — DBA",
"description": "Maintenance and health view of Iceberg catalog metadata."
},
"queries": [
{
"id": "iced-0",
"sql": "",
"specVersion": 1,
"spec": {
"name": "About: Iceberg catalog explorer (DBA)",
"favorite": true,
"description": "Generated by examples/mjs/build-iceberg-dashboards.mjs — edit that script, not this entry.",
"view": "panel",
"panel": {
"cfg": {
"type": "text",
"content": "## Iceberg catalog explorer — DBA\n\nMaintenance signals for every installed catalog, from Iceberg metadata only:\nsnapshot-expiry backlog, manifest fragmentation, metadata.json bloat,\nmerge-on-read delete manifests, and two **log panels** — the snapshot commit\ntimeline and the metadata-version timeline (`from` accepts relative times\nlike `-30d`).\n\nThe shared `catalog` filter narrows every tile; blank = all catalogs.\nDetail tables (schema, partition spec, manifest inventory, full snapshot log)\nlive in the Library below the dashboard tiles — they are deliberately not on\nthe dashboard. Per-table small-file/skew/Parquet analysis: generate the\ndrill-down portable bundle from `iceberg-install.json` (entry i5)."
}
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "wide",
"minimum": "medium",
"aspectRatio": 2
}
}
}
},
{
"id": "iced-1",
"sql": "SELECT concat(catalog, '.', ice_table) AS table, count() - 1 AS old_snapshots\nFROM ice_meta_all.snapshots\nWHERE 1 /*[ AND catalog = {catalog:String} ]*/\nGROUP BY catalog, ice_table\nHAVING old_snapshots > 0\nORDER BY old_snapshots DESC\nLIMIT 25",
"specVersion": 1,
"spec": {
"name": "Snapshot-expiry candidates",
"favorite": true,
"description": "Snapshots per table beyond the current one — each is history that expireSnapshots() could reclaim. Big counts = expiry never runs.",
"view": "panel",
"panel": {
"cfg": {
"type": "hbar",
"x": 0,
"y": [
1
],
"series": null
},
"key": "table:String|old_snapshots:Int64"
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "medium",
"minimum": "compact",
"aspectRatio": 1.5
}
}
}
},
{
"id": "iced-2",
"sql": "SELECT concat(ml.catalog, '.', ml.ice_table) AS table,\n count() AS manifests,\n round(sum(ml.added_files_count + ml.existing_files_count) / count(), 1) AS avg_files_per_manifest\nFROM ice_meta_all.manifest_lists AS ml\nINNER JOIN ice_meta_all.tables AS t\n ON ml.catalog = t.catalog AND ml.ice_table = t.ice_table AND ml.list_snapshot_id = t.current_snapshot_id\nWHERE 1 /*[ AND ml.catalog = {catalog:String} ]*/\nGROUP BY table\nORDER BY manifests DESC",
"specVersion": 1,
"spec": {
"name": "Manifest fragmentation (current snapshot)",
"favorite": true,
"description": "Manifests referenced by each table's CURRENT manifest-list, and how few files each tracks on average. Many manifests tracking few files each = rewriteManifests() candidate.",
"view": "panel",
"panel": {
"cfg": {
"type": "bar",
"x": 0,
"y": [
1,
2
],
"series": null
},
"key": "table:String|manifests:UInt64|avg_files_per_manifest:Float64"
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "medium",
"minimum": "compact",
"aspectRatio": 1.5
}
}
}
},
{
"id": "iced-3",
"sql": "SELECT concat(catalog, '.', ice_table) AS table, countIf(content = 1) AS delete_manifests\nFROM ice_meta_all.manifest_lists\nWHERE 1 /*[ AND catalog = {catalog:String} ]*/\nGROUP BY catalog, ice_table\nORDER BY delete_manifests DESC",
"specVersion": 1,
"spec": {
"name": "Merge-on-read delete manifests",
"favorite": true,
"description": "Delete manifests (content=1) in each table's manifest-lists. A growing count means MOR deletes are piling up and reads pay for it — schedule rewrite_data_files/compaction.",
"view": "panel",
"panel": {
"cfg": {
"type": "bar",
"x": 0,
"y": [
1
],
"series": null
},
"key": "table:String|delete_manifests:UInt64"
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "medium",
"minimum": "compact",
"aspectRatio": 1.5
}
}
}
},
{
"id": "iced-4",
"sql": "SELECT concat(o.catalog, '.', o.ice_table) AS table,\n countIf(o.kind = 'metadata.json') AS metadata_files_on_s3,\n max(t.num_snapshots) AS snapshots_in_current_metadata\nFROM ice_meta_all.objects AS o\nLEFT JOIN ice_meta_all.tables AS t ON o.catalog = t.catalog AND o.ice_table = t.ice_table\nWHERE o.kind = 'metadata.json' /*[ AND o.catalog = {catalog:String} ]*/\nGROUP BY table\nORDER BY metadata_files_on_s3 DESC",
"specVersion": 1,
"spec": {
"name": "metadata.json versions on S3",
"favorite": true,
"description": "Physical metadata.json objects per table vs. the versions the current metadata-log still references. A wide gap = metadata bloat (write.metadata.delete-after-commit.enabled is off).",
"view": "panel",
"panel": {
"cfg": {
"type": "bar",
"x": 0,
"y": [
1,
2
],
"series": null
},
"key": "table:String|metadata_files_on_s3:UInt64|snapshots_in_current_metadata:UInt64"
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "medium",
"minimum": "compact",
"aspectRatio": 1.5
}
}
}
},
{
"id": "iced-5",
"sql": "SELECT concat(catalog, '.', ice_table) AS table,\n countIf(kind = 'data.parquet') AS data_files,\n countIf(kind = 'manifest') AS manifests,\n countIf(kind = 'metadata.json') AS metadata_versions\nFROM ice_meta_all.objects\nWHERE 1 /*[ AND catalog = {catalog:String} ]*/\nGROUP BY catalog, ice_table\nORDER BY data_files DESC",
"specVersion": 1,
"spec": {
"name": "Physical objects per table",
"favorite": true,
"description": "S3 object census per table by Iceberg role — the denominator for orphan hunting. Compare data.parquet counts against data_files() from the per-catalog drill-down to find unreferenced files.",
"view": "panel",
"panel": {
"cfg": {
"type": "bar",
"x": 0,
"y": [
1,
2,
3
],
"series": null
},
"key": "table:String|data_files:UInt64|manifests:UInt64|metadata_versions:UInt64"
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "medium",
"minimum": "compact",
"aspectRatio": 1.5
}
}
}
},
{
"id": "iced-6",
"sql": "SELECT committed_at AS ts,\n multiIf(operation IN ('overwrite', 'delete'), 'warn', 'info') AS level,\n concat(catalog, '.', ice_table, ' — ', operation,\n ' (+', toString(added_records), ' rows, total ',\n formatReadableSize(total_files_size), ', snapshot ', snapshot_id, ')') AS msg\nFROM ice_meta_all.snapshots\nWHERE committed_at > {from:DateTime}\n/*[ AND committed_at <= {to:DateTime} ]*/\n/*[ AND catalog = {catalog:String} ]*/\nORDER BY ts DESC\nLIMIT 500",
"specVersion": 1,
"spec": {
"name": "Snapshot commit timeline",
"favorite": true,
"description": "Every snapshot commit as a log line: operation, rows added, running total size. `from` is required and takes relative times (-30d, now-6M); operation overwrite/delete shows as warn.",
"view": "panel",
"panel": {
"cfg": {
"type": "logs",
"time": "ts",
"msg": "msg",
"level": "level"
}
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "wide",
"minimum": "medium",
"aspectRatio": 1.6
}
}
}
},
{
"id": "iced-7",
"sql": "SELECT made_current_at AS ts,\n concat(catalog, '.', ice_table, ' → ', metadata_file) AS msg\nFROM ice_meta_all.metadata_log\nWHERE made_current_at > {from:DateTime}\n/*[ AND made_current_at <= {to:DateTime} ]*/\n/*[ AND catalog = {catalog:String} ]*/\nORDER BY ts DESC\nLIMIT 500",
"specVersion": 1,
"spec": {
"name": "Metadata version timeline",
"favorite": true,
"description": "When each table's metadata.json was replaced (the Iceberg metadata-log). `from` is required and takes relative times (-30d).",
"view": "panel",
"panel": {
"cfg": {
"type": "logs",
"time": "ts",
"msg": "msg"
}
},
"dashboard": {
"role": "panel",
"sizeHints": {
"preferred": "wide",
"minimum": "medium",
"aspectRatio": 1.6
}
}
}
},
{
"id": "iced-8",
"sql": "SELECT * FROM ice_meta_all.tables WHERE 1 /*[ AND catalog = {catalog:String} ]*/ ORDER BY catalog, ice_table",
"specVersion": 1,
"spec": {
"name": "Detail: tables & properties",
"favorite": false,
"description": "One row per Iceberg table — current metadata file, snapshot, schema/snapshot counts, raw table properties JSON.",
"view": "table"
}
},
{
"id": "iced-9",
"sql": "SELECT * FROM ice_meta_all.snapshots WHERE 1 /*[ AND catalog = {catalog:String} ]*/ ORDER BY catalog, ice_table, sequence_number",
"specVersion": 1,
"spec": {
"name": "Detail: full snapshot log",
"favorite": false,
"description": "Every snapshot of every table with its summary JSON.",
"view": "table"
}
},
{
"id": "iced-10",
"sql": "SELECT * FROM ice_meta_all.schema_columns WHERE 1 /*[ AND catalog = {catalog:String} ]*/ ORDER BY catalog, ice_table, field_id",
"specVersion": 1,
"spec": {
"name": "Detail: schema columns",
"favorite": false,
"description": "Current schema of every table, one row per column.",
"view": "table"
}
},
{
"id": "iced-11",
"sql": "SELECT * FROM ice_meta_all.partition_spec WHERE 1 /*[ AND catalog = {catalog:String} ]*/ ORDER BY catalog, ice_table, field_id",
"specVersion": 1,
"spec": {
"name": "Detail: partition specs",
"favorite": false,
"description": "Default partition spec of every table, one row per partition field. Empty = unpartitioned tables.",
"view": "table"
}
},
{
"id": "iced-12",
"sql": "SELECT * FROM ice_meta_all.manifest_lists WHERE 1 /*[ AND catalog = {catalog:String} ]*/ ORDER BY catalog, ice_table, sequence_number",
"specVersion": 1,
"spec": {
"name": "Detail: manifest inventory",
"favorite": false,
"description": "Every manifest referenced by every manifest-list (all snapshots, not just current).",
"view": "table"
}
}
],
"dashboards": [
{
"documentVersion": 1,
"id": "iceberg-dba-explorer",
"title": "Iceberg catalog explorer — DBA",
"description": "Maintenance and health view of Iceberg catalog metadata.",
"revision": 1,
"layout": {
"type": "flow",
"version": 1,
"preset": "columns-2",
"items": {
"tile-iced-0": {
"span": 2,
"height": "large"
},
"tile-iced-1": {
"span": 1,
"height": "large"
},
"tile-iced-2": {
"span": 1,
"height": "large"
},
"tile-iced-3": {
"span": 1,
"height": "large"
},
"tile-iced-4": {
"span": 1,
"height": "large"
},
"tile-iced-5": {
"span": 1,
"height": "large"
},
"tile-iced-6": {
"span": 2,
"height": "large"
},
"tile-iced-7": {
"span": 2,
"height": "large"
}
}
},
"filters": [
{
"id": "filter-catalog",
"parameter": "catalog"
},
{
"id": "filter-from",
"parameter": "from"
},
{
"id": "filter-to",
"parameter": "to"
}
],
"tiles": [
{
"id": "tile-iced-0",
"queryId": "iced-0"
},
{
"id": "tile-iced-1",
"queryId": "iced-1"
},
{
"id": "tile-iced-2",
"queryId": "iced-2"
},
{
"id": "tile-iced-3",
"queryId": "iced-3"
},
{
"id": "tile-iced-4",
"queryId": "iced-4"
},
{
"id": "tile-iced-5",
"queryId": "iced-5"
},
{
"id": "tile-iced-6",
"queryId": "iced-6"
},
{
"id": "tile-iced-7",
"queryId": "iced-7"
}
]
}
]
}