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
|
| 6 |
+
|
| 7 |
+
| Column | Type | Notes |
|
| 8 |
+
|---|---|---|
|
| 9 |
+
| `table_id` | string | original parent identifier (TabFact: `r-N`; WTQ: csv id) |
|
| 10 |
+
| `source` | string | `tabfact` or `wtq` |
|
| 11 |
+
| `n_rows` | int32 | parent row count |
|
| 12 |
+
| `n_cols` | int32 | parent column count |
|
| 13 |
+
| `header` | list<string> | column names |
|
| 14 |
+
| `table_csv` | large_string | full parent serialized as CSV |
|
| 15 |
+
| `provenance_url` | string | upstream link |
|
| 16 |
+
| `license_tag` | string | per-row license inheritance |
|
| 17 |
+
|
| 18 |
+
### `targets`
|
| 19 |
+
|
| 20 |
+
| Column | Type | Notes |
|
| 21 |
+
|---|---|---|
|
| 22 |
+
| `target_id` | string | unique fragment id |
|
| 23 |
+
| `parent_id` | string | links to parents_*.table_id |
|
| 24 |
+
| `parent_source` | string | `tabfact` or `wtq` |
|
| 25 |
+
| `kind` | string | `union` or `join` |
|
| 26 |
+
| `noise_tier` | string | `clean` / `schema` / `cell` / `hard` |
|
| 27 |
+
| `removed_rows` | list<int32> | indices of rows removed from parent (only for `union`) |
|
| 28 |
+
| `removed_cols` | list<int32> | indices of cols removed from parent (only for `join`) |
|
| 29 |
+
| `table_csv` | large_string | the fragment table |
|
| 30 |
+
| `license_tag` | string | inherited |
|
| 31 |
+
|
| 32 |
+
### `distractors`
|
| 33 |
+
|
| 34 |
+
| Column | Type | Notes |
|
| 35 |
+
|---|---|---|
|
| 36 |
+
| `distractor_id` | string | matches `manifests/ckan_distractor_ids` |
|
| 37 |
+
| `source` | string | always `lakebench_ckan` |
|
| 38 |
+
| `table_csv` | large_string | the CKAN distractor table |
|
| 39 |
+
| `license_tag` | string | `cc-by-4.0 (LakeBench Zenodo); per-portal upstream` |
|
| 40 |
+
|
| 41 |
+
### `queries`
|
| 42 |
+
|
| 43 |
+
| Column | Type | Notes |
|
| 44 |
+
|---|---|---|
|
| 45 |
+
| `query_id` | string | seed query identifier |
|
| 46 |
+
| `parent_id` | string | parent the query was derived from |
|
| 47 |
+
| `parent_source` | string | `tabfact` or `wtq` |
|
| 48 |
+
| `noise_tier` | string | |
|
| 49 |
+
| `seed_csv` | large_string | the seed query (parent with rows + cols removed) |
|
| 50 |
+
| `removed_rows` | list<int32> | the union target's rows |
|
| 51 |
+
| `removed_cols` | list<int32> | the join target's cols |
|
| 52 |
+
| `license_tag` | string | inherited |
|
| 53 |
+
|
| 54 |
+
## `manifests` config (8 splits)
|
| 55 |
+
|
| 56 |
+
### `splits`
|
| 57 |
+
|
| 58 |
+
| Column | Type | Notes |
|
| 59 |
+
|---|---|---|
|
| 60 |
+
| `parent_id` | string | |
|
| 61 |
+
| `split` | string | `train` / `dev` / `test` |
|
| 62 |
+
| `parent_source` | string | |
|
| 63 |
+
|
| 64 |
+
(827 train / 207 dev / 345 test rows)
|
| 65 |
+
|
| 66 |
+
### `parents_filtered`
|
| 67 |
+
|
| 68 |
+
| Column | Type | Notes |
|
| 69 |
+
|---|---|---|
|
| 70 |
+
| `parent_id` | string | |
|
| 71 |
+
| `parent_source` | string | |
|
| 72 |
+
| `n_rows` | int32 | |
|
| 73 |
+
| `n_cols` | int32 | |
|
| 74 |
+
| `passes_filter` | bool | should always be `true` since this is the post-filter list |
|
| 75 |
+
| `provenance_url` | string | |
|
| 76 |
+
|
| 77 |
+
(1,379 rows)
|
| 78 |
+
|
| 79 |
+
### `fragments` (16,548 rows)
|
| 80 |
+
|
| 81 |
+
| Column | Type | Notes |
|
| 82 |
+
|---|---|---|
|
| 83 |
+
| `fragment_id` | string | |
|
| 84 |
+
| `parent_id` | string | |
|
| 85 |
+
| `parent_source` | string | |
|
| 86 |
+
| `kind` | string | `seed` / `union_target` / `join_target` |
|
| 87 |
+
| `noise_tier` | string | |
|
| 88 |
+
| `provenance` | string | JSON-encoded extra context |
|
| 89 |
+
|
| 90 |
+
### `lake` (the retrieval lake of exactly 47,772 tables)
|
| 91 |
+
|
| 92 |
+
This split lists only the tables that are searchable in Stage-1 retrieval —
|
| 93 |
+
**i.e., union/join targets + CKAN distractors**. Parents and query seeds are
|
| 94 |
+
pipeline I/O (kept in the `lake` config's other splits and the `manifests`
|
| 95 |
+
config, but not in *this* split).
|
| 96 |
+
|
| 97 |
+
| Column | Type | Notes |
|
| 98 |
+
|---|---|---|
|
| 99 |
+
| `table_id` | string | |
|
| 100 |
+
| `kind` | string | `union_target` / `join_target` / `distractor` (exactly these three) |
|
| 101 |
+
| `parent_id` | string | nullable; only set for derivatives |
|
| 102 |
+
| `parent_source` | string | nullable; `tabfact` or `wtq` for derivative targets |
|
| 103 |
+
| `noise_tier` | string | nullable; `clean` / `schema` / `cell` / `hard` for targets only |
|
| 104 |
+
|
| 105 |
+
### `ckan_distractor_ids`
|
| 106 |
+
|
| 107 |
+
| Column | Type | Notes |
|
| 108 |
+
|---|---|---|
|
| 109 |
+
| `distractor_id` | string | (36,740 rows; matches `lake.distractors.distractor_id`) |
|
| 110 |
+
|
| 111 |
+
### `query_tasks`
|
| 112 |
+
|
| 113 |
+
| Column | Type | Notes |
|
| 114 |
+
|---|---|---|
|
| 115 |
+
| `query_id` | string | |
|
| 116 |
+
| `parent_id` | string | |
|
| 117 |
+
| `parent_source` | string | |
|
| 118 |
+
| `noise_tier` | string | |
|
| 119 |
+
| `task_type` | string | one of `union_only` / `join_only` / `union_and_join` |
|
| 120 |
+
| `gt_union_target_ids` | list<string> | ground-truth union target fragment ids |
|
| 121 |
+
| `gt_join_target_ids` | list<string> | ground-truth join target fragment ids |
|
| 122 |
+
|
| 123 |
+
### `gt_validation`
|
| 124 |
+
|
| 125 |
+
Per-query validation rows used for the dev-split macro-F1 calibration of
|
| 126 |
+
Stage-2 thresholds.
|
| 127 |
+
|
| 128 |
+
| Column | Type | Notes |
|
| 129 |
+
|---|---|---|
|
| 130 |
+
| `query_id` | string | |
|
| 131 |
+
| `gt_action` | string | `union` / `join` / `none` |
|
| 132 |
+
| `gt_target_id` | string | nullable |
|
| 133 |
+
| `metadata` | string | JSON-encoded |
|
| 134 |
+
|
| 135 |
+
### `table_maps`
|
| 136 |
+
|
| 137 |
+
| Column | Type | Notes |
|
| 138 |
+
|---|---|---|
|
| 139 |
+
| `table_id` | string | |
|
| 140 |
+
| `kind` | string | |
|
| 141 |
+
| `parent_id` | string | |
|
| 142 |
+
| `csv_path` | string | path within `lake/*` parquet (informational only — actual csv lives in `lake` config) |
|
| 143 |
+
| `stage2_calibrated_thresholds` | string | JSON-encoded; only populated for the (Stage-1 backbone, Stage-2 model) calibration result rows used in the paper |
|