Skip to content

Conversation

dhtclk
Copy link
Collaborator

@dhtclk dhtclk commented Sep 26, 2025

Summary

Autogenerate System Tables

Checklist

@dhtclk dhtclk requested a review from a team as a code owner September 26, 2025 15:30
Copy link

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clickhouse-docs Ready Ready Preview Comment Oct 16, 2025 8:19pm
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
clickhouse-docs-jp Ignored Ignored Oct 16, 2025 8:19pm
clickhouse-docs-ru Ignored Ignored Preview Oct 16, 2025 8:19pm
clickhouse-docs-zh Ignored Ignored Preview Oct 16, 2025 8:19pm

Copy link
Member

@Blargian Blargian left a comment

Choose a reason for hiding this comment

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

Left some comments

@@ -0,0 +1,323 @@
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

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

@dhtclk let's just modify the script we currently have. There is no need to duplicate the code here such as pulling the binary, reading system-tables.sql etc.

package.json Outdated
"build-swagger": "yarn redocly build-docs https://api.clickhouse.cloud/v1 --output build/cloud/manage/api/swagger.html",
"prep-from-local": "bash ./scripts/copy-clickhouse-repo-docs.sh -l $1",
"autogenerate-settings": "bash ./scripts/settings/autogenerate-settings.sh",
"autogenerate-system-tables": "bash ./scripts/system-tables/autogenerate-system-tables.sh",
Copy link
Member

Choose a reason for hiding this comment

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

autogenerate-settings is badly named, but it does both settings and functions, and should do system tables too in the same manner.

Comment on lines 36 to 38
- name: Run Auto Generate System Tables
run: yarn autogenerate-system-tables

Copy link
Member

Choose a reason for hiding this comment

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

We unfortunately can't run it on an action because this documentation also needs to be generated as part of the docs check on ClickHouse/ClickHouse repo. That's why it runs as part of the shell script autogenerate-settings which is called as part of yarn build which runs in the Docker container on core repo.

FROM table_columns WHERE comment != '')
FROM table_columns
LIMIT 1
INTO OUTFILE 'temp-system-table.md' TRUNCATE FORMAT LineAsString
Copy link
Member

Choose a reason for hiding this comment

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

newline


echo "[$SCRIPT_NAME] Auto-generation of system tables documentation completed successfully."
echo "[$SCRIPT_NAME] Processed ${#SYSTEM_TABLES[@]} system tables."
exit 0 No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

newline

@Blargian Blargian self-requested a review October 16, 2025 20:15
@dhtclk dhtclk merged commit 0a6d48c into main Oct 16, 2025
15 checks passed
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.

2 participants