Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowInvalid
Message:      Failed to parse string: 'virtual_idol_9' as a scalar of type int64
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2303, in cast_table_to_schema
                  cast_array_to_feature(
                  ~~~~~~~~~~~~~~~~~~~~~^
                      table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      feature,
                      ^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1852, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                                           ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2143, in cast_array_to_feature
                  return array_cast(
                      array,
                  ...<2 lines>...
                      allow_decimal_to_str=allow_decimal_to_str,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2006, in array_cast
                  return array.cast(pa_type)
                         ~~~~~~~~~~^^^^^^^^^
                File "pyarrow/array.pxi", line 1147, in pyarrow.lib.Array.cast
                File "/usr/local/lib/python3.14/site-packages/pyarrow/compute.py", line 412, in cast
                  return call_function("cast", [arr], options, memory_pool)
                File "pyarrow/_compute.pyx", line 604, in pyarrow._compute.call_function
                File "pyarrow/_compute.pyx", line 399, in pyarrow._compute.Function.call
                  result = GetResultValue(
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
                  raise convert_status(status)
              pyarrow.lib.ArrowInvalid: Failed to parse string: 'virtual_idol_9' as a scalar of type int64
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

query-id
int64
corpus-id
string
score
int64
0
dw__fclt_org_dlc_key
1
0
dw__master_dept_hierarchy
1
0
dw__fclt_rooms
1
0
dw__fclt_building_address
1
0
dw__buildings
1
1
dw__academic_terms_all
1
1
dw__iap_subject_person
1
1
dw__iap_subject_session
1
1
dw__iap_subject_detail
1
2
dw__library_course_instructor
1
2
dw__library_reserve_catalog
1
2
dw__library_subject_offered
1
2
dw__library_reserve_matrl_detail
1
3
dw__fac_building_address
1
3
dw__fac_rooms
1
3
dw__employee_directory
1
3
dw__buildings
1
4
dw__fclt_rooms
1
4
dw__course_catalog_subject_offered
1
4
dw__fclt_building_address
1
4
dw__fclt_building
1
4
dw__buildings
1
5
dw__fclt_rooms
1
5
dw__subject_offered
1
5
dw__fclt_building_address
1
5
dw__buildings
1
6
dw__tip_detail
1
6
dw__tip_material
1
6
dw__tip_subject_offered
1
7
dw__fclt_building_hist
1
7
dw__fclt_rooms
1
7
dw__employee_directory
1
8
dw__fclt_rooms
1
8
dw__course_catalog_subject_offered
1
8
dw__fclt_building
1
8
dw__cis_course_catalog
1
9
dw__fclt_rooms
1
9
dw__fclt_building
1
9
dw__mit_student_directory
1
10
dw__fac_building
1
10
dw__fac_floor
1
11
dw__time_day
1
11
dw__iap_subject_category
1
11
dw__iap_subject_detail
1
12
dw__iap_subject_session
1
12
dw__iap_subject_sponsor
1
12
dw__iap_subject_detail
1
13
dw__time_day
1
13
dw__iap_subject_person
1
13
dw__iap_subject_detail
1
14
dw__academic_terms_all
1
14
dw__iap_subject_session
1
14
dw__iap_subject_detail
1
15
dw__iap_subject_session
1
15
dw__iap_subject_detail
1
15
dw__buildings
1
16
dw__iap_subject_session
1
16
dw__iap_subject_detail
1
16
dw__buildings
1
17
dw__sis_course_description
1
17
dw__sis_subject_code
1
17
dw__sis_department
1
18
dw__sis_course_description
1
18
dw__sis_subject_code
1
18
dw__sis_admin_department
1
18
dw__sis_department
1
19
dw__sis_course_description
1
19
dw__sis_subject_code
1
19
dw__sis_department
1
20
dw__space_supervisor_usage
1
20
dw__space_detail
1
20
dw__space_unit
1
20
dw__space_floor
1
20
dw__buildings
1
21
dw__space_supervisor_usage
1
21
dw__space_detail
1
21
dw__fclt_organization
1
21
dw__fclt_building
1
21
dw__space_unit
1
21
dw__space_floor
1
22
dw__tip_detail
1
22
dw__tip_material
1
22
dw__tip_subject_offered
1
23
dw__course_catalog_subject_offered
1
23
dw__subject_offered
1
23
dw__employee_directory
1
23
dw__academic_terms
1
24
dw__iap_subject_category
1
24
dw__iap_subject_session
1
24
dw__iap_subject_sponsor
1
24
dw__iap_subject_detail
1
25
dw__sis_course_description
1
25
dw__sis_subject_code
1
25
dw__sis_department
1
26
dw__academic_terms_all
1
26
dw__academic_term_parameter
1
26
dw__cis_course_catalog
1
27
dw__tip_detail
1
27
dw__tip_material_status
1
27
dw__tip_material
1
End of preview.

SQL Schema Retrieval

The evaluation benchmark from "Finding the Right Tables and Columns: A Benchmark and Corpus-Adaptive Embeddings for SQL Schema Retrieval" (Zeng, Yu, Mehta, Zhao, Samdani).

Task — schema linking as retrieval. Given a natural-language question over a database, retrieve the schema element(s) needed to answer it. Documents are schema elements: at table granularity, each document is a table schema (columns + types rendered as markdown, with sample rows); at column granularity, each document is a single column with its table context. Relevance R(q) = the schema elements referenced by the question's gold SQL (obtained by parsing table/column references from the ground-truth query). Retrieval is performed per database group (rank the schema at hand). Metrics: nDCG@10 and recall@10.

This recasts five text-to-SQL datasets as retrieval, spanning academic → enterprise → large live schemas — a step that pure text-to-SQL accuracy never exercises because it assumes the whole schema fits in context.

Subsets

Counts below are measured from this release (corpus docs = retrieval candidates at the subset's granularity; rel. = relevant query–document judgments).

Subset (this release) Source Granularity Corpus docs Queries Rel. judgments
spider Spider (academic, cross-domain) table 180 2,147 3,366
bird BIRD (realistic, value semantics) table 75 1,534 2,956
beaver BEAVER (private enterprise warehouses) table 463 209 928
livesqlbench_table LiveSQLBench (base) table 244 410 1,075
livesqlbench_large_table LiveSQLBench-Large table 971 332 901
livesqlbench_large_column LiveSQLBench-Large column 17,709 332 2,157

Underlying database sizes (from the paper's Table 1): Spider 40 DB / 785 col; BIRD 11 DB / 798 col; BEAVER 6 DB / 4,238 col; LiveSQLBench 22 DB / 1,942 col; LiveSQLBench-Large 18 DB / 17,708 col. Gold sets average 1.6–4.4 tables (table level) and up to 6.5 columns (column level) per query. The paper additionally studies two document representations (schema-metadata vs. value-only) for Spider/BIRD/BEAVER; this release provides the table/column collections used for evaluation.

Format (BEIR / MTEB retrieval layout)

<subset>/
  corpus.jsonl        # {"_id": "<schema-element id>", "title": "", "text": "<schema as markdown>"}
  queries.jsonl       # {"_id": "<qid>", "text": "<natural-language question>"}
  qrels/test.tsv      # query-id \t corpus-id \t score   (relevant judgments, score>0)

_id encodes the schema element as provided by the source: db__table for table-level subsets, and a column identifier (e.g. db__table__column) for the column-level subset.

Sources & citation

This benchmark repackages five public text-to-SQL datasets as retrieval; please cite this work and the original datasets, and follow each source's license/terms:

@inproceedings{zeng2025sqlschemaretrieval,
  title     = {Finding the Right Tables and Columns: A Benchmark and Corpus-Adaptive Embeddings for SQL Schema Retrieval},
  author    = {Zeng, Qingcheng and Yu, Puxuan and Mehta, Aman and Zhao, Fuheng and Samdani, Rajhans},
  year      = {2025},
  note      = {Update venue/URL on publication}
}
Downloads last month
17

Paper for pxyu/SQL-Schema-Retrieval