schema id stringlengths 13 13 | Full schema stringlengths 78 118k | Schema content stringlengths 438 10.1M | number of tables int64 1 350 | source_task stringclasses 73
values |
|---|---|---|---|---|
schema_000876 | "CREATE TABLE public_addresses ( id int8 NOT NULL UNIQUE, city Varchar NOT NULL, country Varch(...TRUNCATED) | "{\"public_customers\": [{\"id\": 1, \"create_at\": \"2022-07-25 00:00:00\", \"customer_email\": \"t(...TRUNCATED) | 222 | task_000 |
schema_001317 | "CREATE TABLE T_USUARIO_SUSCRIPCIONES ( id_usuario TEXT NOT NULL, suscripcion TEXT NOT NULL, f(...TRUNCATED) | "{\"T_EXPORT_DATA_LOGS\": [{\"id_exportacion\": \"EXP-10000\", \"id_usuario\": \"USR_3076\", \"tipo_(...TRUNCATED) | 201 | task_000 |
schema_001517 | "CREATE TABLE TA_User ( UserID Numeric NOT NULL UNIQUE, UserName Varchar NOT NULL, Userrating (...TRUNCATED) | "{\"TA_User\": [{\"UserID\": 1, \"UserName\": \"Jo\", \"Userrating\": 3.2, \"Usergender\": \"Female\(...TRUNCATED) | 138 | task_000 |
schema_003399 | "CREATE TABLE BPM_TASK_DEF ( ID BigInt NOT NULL UNIQUE, TASK_DEFINITION_KEY Varchar NOT NULL, (...TRUNCATED) | "{\"BPM_PROCESS\": [{\"ID\": 23, \"NAME\": \"Policy Acknowledgment\", \"START_TIME\": \"2020-01-06 1(...TRUNCATED) | 127 | task_000 |
schema_004095 | "CREATE TABLE default_salary_employer ( id TEXT NOT NULL UNIQUE, name Text NOT NULL UNIQUE, cr(...TRUNCATED) | "{\"default_salary_department\": [{\"id\": \"DEPT-0001\", \"employer_id\": 249917, \"name\": \"Integ(...TRUNCATED) | 30 | task_000 |
schema_004362 | "CREATE TABLE test_table ( id Integer NOT NULL UNIQUE, self_reference_id Integer NOT NULL, FOR(...TRUNCATED) | "{\"test_table\": [{\"id\": 1, \"self_reference_id\": 63}, {\"id\": 2, \"self_reference_id\": 1}, {\(...TRUNCATED) | 148 | task_000 |
schema_005268 | "CREATE TABLE resettoken ( token longtext NOT NULL, owner Int NOT NULL, id Int NOT NULL UNIQUE(...TRUNCATED) | "{\"Project\": [{\"id\": 1, \"name\": \"Cleanup-Core-1\", \"description\": \"Maintenance of Cleanup-(...TRUNCATED) | 15 | task_000 |
schema_005537 | "CREATE TABLE TwoFactors ( Id Integer NOT NULL UNIQUE, AccountId Integer NOT NULL, Secret Text(...TRUNCATED) | "{\"LoginAttempts\": [{\"Id\": 1, \"AccountId\": 17, \"Timestamp\": \"2021-02-14 20:35:48\", \"IsSuc(...TRUNCATED) | 182 | task_000 |
schema_005691 | "CREATE TABLE auth_assignment ( item_name Varchar NOT NULL, user_id Int NOT NULL, created_at I(...TRUNCATED) | "{\"user_profile\": [{\"user_id\": 1, \"first_name\": \"Raeburn\", \"last_name\": \"Gamble\", \"emai(...TRUNCATED) | 192 | task_000 |
schema_006321 | "CREATE TABLE projects ( id Integer NOT NULL UNIQUE, code Text NOT NULL, directory Text NOT NU(...TRUNCATED) | "{\"projects\": [{\"id\": 1, \"code\": \"HTTP-001\", \"directory\": \"/var/log/nginx/proxy-cache/htt(...TRUNCATED) | 4 | task_000 |
End of preview. Expand in Data Studio
SQaLe — schemas
Unique database schemas and their synthetic contents, one row per schema.
The questions live in
cwolff/queries, joined on schema id.
These two columns were previously stored inline on every question row of cwolff/data_work_in_progress. With ~25 questions per schema that was a ~25x duplication of the largest columns in the corpus; holding them once here is the entire point of the split.
Columns
| column | |
|---|---|
schema id |
join key into cwolff/queries |
Full schema |
the DDL — CREATE TABLE ... for every table |
Schema content |
JSON, table name -> list of row dicts (the synthetic data) |
number of tables |
convenience count |
Materializing a SQLite database
import json, sqlite3
from datasets import load_dataset
s = load_dataset("cwolff/schemas", split="train")[0]
con = sqlite3.connect(":memory:")
for stmt in s["Full schema"].split(";"):
if stmt.strip():
con.execute(stmt)
for table, rows in json.loads(s["Schema content"]).items():
if not rows:
continue
cols = list(rows[0])
con.executemany(
f'INSERT OR IGNORE INTO "{table}" ({",".join(chr(34)+c+chr(34) for c in cols)}) '
f'VALUES ({",".join("?" * len(cols))})',
[[r.get(c) for c in cols] for r in rows],
)
con.commit()
Splits
Schema-disjoint from cwolff/queries and using the same assignment, so
load_dataset(..., split="test") gives exactly the schemas the test questions need.
| split | schemas |
|---|---|
train |
4,268 |
test |
209 |
Covering 111,141 questions in cwolff/queries.
- Downloads last month
- 33