Skip to content

Fix schema stats page error on loading data - #94

Closed
vaibhavmashal wants to merge 1 commit into
PostHog:mainfrom
vaibhavmashal:fix-schema-stats
Closed

Fix schema stats page error on loading data#94
vaibhavmashal wants to merge 1 commit into
PostHog:mainfrom
vaibhavmashal:fix-schema-stats

Conversation

@vaibhavmashal

Copy link
Copy Markdown

Fixes #70.

The frontend expects a
ame\ field and extra table stats (\ otal_bytes, \ otal_rows, \engine, \partition_key) when retrieving available tables, but \AVAILABLE_TABLES_SQL\ previously only returned \database\ and \ able. This PR updates the query to return these fields as well (aliasing \ able\ to
ame), ensuring the frontend can load data correctly without breaking.

Copilot AI lite review requested due to automatic review settings August 23, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses the schema stats page failing to load by updating the ClickHouse “available tables” query to return the fields the frontend expects (notably name plus size/row/engine/partition metadata). It also changes how the frontend Docker image is built and run.

Changes:

  • Expand AVAILABLE_TABLES_SQL to return name (aliased), total_bytes, readable_bytes, total_rows, engine, and partition_key.
  • Update frontend/Dockerfile to use a Node base image and serve the built static assets on port 3000.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
housewatch/clickhouse/queries/sql.py Extends the available-tables query to include frontend-required fields and aliases.
frontend/Dockerfile Switches to a runnable container that serves the built frontend with serve on port 3000.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/Dockerfile Outdated
Comment on lines +1 to +8
FROM node:20-alpine

WORKDIR /frontend

RUN npm install -g serve
COPY build/ build/

CMD ["echo", "Serve the files from /frontend/build, don't run this container directly"] No newline at end of file
CMD ["serve", "-s", "build", "-l", "3000"] No newline at end of file
Comment thread frontend/Dockerfile Outdated

WORKDIR /frontend

RUN npm install -g serve
@vaibhavmashal

Copy link
Copy Markdown
Author

Rebased the branch onto upstream \main\ to cleanly isolate the changes to \AVAILABLE_TABLES_SQL\ in \housewatch/clickhouse/queries/sql.py\ and remove the unrelated frontend Dockerfile commit.

@vaibhavmashal vaibhavmashal closed this by deleting the head repository Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

schema stats page error on loading data

2 participants