PostHog / PostHog/HouseWatch

schema stats page error on loading data

Open
#70 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
631
Forks
45
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in housewatch/clickhouse/queries/sql.py and inspect AVAILABLE_TABLES_SQL alongside the schema stats page's expected fields. Verify the query works with ClickHouse 23.12.2 and that the schema stats page loads table data without field errors; confirm the change remains compatible with earlier HouseWatch versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
clickhouse
Domain
databases, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.