HouseWatch icon indicating copy to clipboard operation
HouseWatch copied to clipboard

schema stats page error on loading data

Open huwngnosleep opened this issue 1 year ago • 2 comments

image

We are using ClickHouse server 23.12.2, maybe there was an update in field names of system.tables leading to frontend code getting wrong fields

Frontend is reading name field, but query return table field instead:

image

I recommend to add new fields on query in housewatch/clickhouse/queries/sql.py, it won't break previous HouseWatch versions

from this:

AVAILABLE_TABLES_SQL = """
SELECT database, table
FROM system.tables
WHERE database NOT ILIKE 'information_schema'
"""

to this:

AVAILABLE_TABLES_SQL = """
SELECT database, table, table as name, total_bytes, total_bytes as readable_bytes, total_rows, engine, partition_key
FROM system.tables
WHERE database NOT ILIKE 'information_schema'
"""

if that okay I will submit a pull request

huwngnosleep avatar Jun 20 '24 04:06 huwngnosleep

This indeed fixes the issue, same problem when using dev compose after creating a table.

AranNomante avatar Feb 04 '25 18:02 AranNomante

@huwngnosleep are you still working on this issue?

VishalYadavCF avatar Sep 03 '25 19:09 VishalYadavCF