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 Sep 26, 2025 3:40pm
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
clickhouse-docs-jp Ignored Ignored Sep 26, 2025 3:40pm
clickhouse-docs-ru Ignored Ignored Sep 26, 2025 3:40pm
clickhouse-docs-zh Ignored Ignored Sep 26, 2025 3:40pm

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.

"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 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


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

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