Skip to content

Commit

Permalink
Dashboards: Fix query in Data Analysis dashboard (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
oserde authored Apr 22, 2024
1 parent 4ce8ff5 commit 18fa663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dashboards/data-analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@
}
},
"queryType": "sql",
"rawSql": "SELECT name,\n engine,\n tables,\n partitions,\n parts,\n formatReadableSize(bytes_on_disk) \"disk_size\",\n col_count,\n total_rows,\n formatReadableSize(data_uncompressed_bytes) as \"uncompressed_size\"\nFROM system.databases db\n LEFT JOIN ( SELECT database,\n uniq(table) \"tables\",\n uniq(table, partition) \"partitions\",\n count() AS parts,\n sum(bytes_on_disk) \"bytes_on_disk\",\n sum(data_compressed_bytes) as \"data_compressed_bytes\",\n sum(rows) as total_rows,\n max(col_count) as \"col_count\"\n FROM system.parts AS parts\n JOIN (SELECT database, count() as col_count\n FROM system.columns\n WHERE database IN (${database}) AND table IN (${table})\n GROUP BY database) as col_stats\n ON parts.database = col_stats.database\n WHERE database IN (${database}) AND active AND table IN (${table})\n GROUP BY database) AS db_stats ON db.name = db_stats.database\nWHERE database IN (${database}) AND lower(name) != 'information_schema'\nORDER BY bytes_on_disk DESC\nLIMIT 10;",
"rawSql": "SELECT name,\n engine,\n tables,\n partitions,\n parts,\n formatReadableSize(bytes_on_disk) \"disk_size\",\n col_count,\n total_rows,\n formatReadableSize(data_uncompressed_bytes) as \"uncompressed_size\"\nFROM system.databases db\n LEFT JOIN ( SELECT database,\n uniq(table) \"tables\",\n uniq(table, partition) \"partitions\",\n count() AS parts,\n sum(bytes_on_disk) \"bytes_on_disk\",\n sum(data_uncompressed_bytes) as \"data_uncompressed_bytes\",\n sum(rows) as total_rows,\n max(col_count) as \"col_count\"\n FROM system.parts AS parts\n JOIN (SELECT database, count() as col_count\n FROM system.columns\n WHERE database IN (${database}) AND table IN (${table})\n GROUP BY database) as col_stats\n ON parts.database = col_stats.database\n WHERE database IN (${database}) AND active AND table IN (${table})\n GROUP BY database) AS db_stats ON db.name = db_stats.database\nWHERE database IN (${database}) AND lower(name) != 'information_schema'\nORDER BY bytes_on_disk DESC\nLIMIT 10;",
"refId": "A"
}
],
Expand Down

0 comments on commit 18fa663

Please sign in to comment.