Datasets:
Download tasks/offline-compute/MySQL/mysql_010_en/init/init_db.sql from dicemy/DataClawEval: direct link, hf CLI and curl.
- Browser
- Download file 1.81 kB
-
https://huggingface.co/datasets/dicemy/DataClawEval/resolve/main/tasks/offline-compute/MySQL/mysql_010_en/init/init_db.sql
- Command line
-
hf download hf://datasets/dicemy/DataClawEval/tasks/offline-compute/MySQL/mysql_010_en/init/init_db.sql
-
curl -L -o init_db.sql https://huggingface.co/datasets/dicemy/DataClawEval/resolve/main/tasks/offline-compute/MySQL/mysql_010_en/init/init_db.sql
1.81 kB
| -- mysql_010 database initialization: create tables + load seed data | |
| -- Executed via: mysql -u root < init_db.sql | |
| -- Fix: MySQL root default auth_socket blocks pymysql TCP connections, | |
| -- switch to mysql_native_password so pymysql (Python) can connect. | |
| ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root123'; | |
| FLUSH PRIVILEGES; | |
| CREATE DATABASE IF NOT EXISTS internal_platform_db | |
| DEFAULT CHARACTER SET utf8mb4 | |
| DEFAULT COLLATE utf8mb4_unicode_ci; | |
| USE internal_platform_db; | |
| -- Input table: 表热度字段汇总表 | |
| CREATE TABLE IF NOT EXISTS sql_heat_column_to_ao_mysql_010 ( | |
| imp_date VARCHAR(256) NOT NULL COMMENT '数据日期', | |
| databasename VARCHAR(256) NOT NULL COMMENT '库名', | |
| tablename VARCHAR(256) NOT NULL COMMENT '表名', | |
| column_list VARCHAR(256) NOT NULL COMMENT '热度字段名', | |
| user_list VARCHAR(256) NOT NULL COMMENT '用户名', | |
| heat BIGINT NOT NULL COMMENT '表热度' | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
| -- Seed data for input table | |
| INSERT INTO sql_heat_column_to_ao_mysql_010 | |
| (imp_date, databasename, tablename, column_list, user_list, heat) | |
| VALUES | |
| ('20260507', 'db_alpha', 'tbl_orders', '["col_a","col_b","col_c"]', '["user1","user2"]', 150), | |
| ('20260507', 'db_alpha', 'tbl_users', '["col_x"]', '["user3","user4","user5"]', 120), | |
| ('20260507', 'db_beta', 'tbl_events', '["col_m","col_n"]', '["user6"]', 200), | |
| ('20260507', 'db_beta', 'tbl_logs', '["col_p","col_q","col_r","col_s"]', '["user7","user8","user9","user10"]', 80), | |
| ('20260507', 'db_gamma', 'tbl_empty_cols', '[]', '["user11"]', 50), | |
| ('20260507', 'db_gamma', 'tbl_empty_users', '["col_y"]', '[]', 50), | |
| ('20260506', 'db_gamma', 'tbl_other', '["col_z"]', '["user99"]', 999); | |