Datasets:

Modalities:
Text
Formats:
parquet
Size:
< 1K
ArXiv:
License:
beaver-table / README.md
peterbaile's picture
Update README.md
86f2c4e verified
---
license: mit
configs:
- config_name: default
data_files:
- split: dw
path: data/dw-*
- split: nova
path: data/nova-*
- split: neutron
path: data/neutron-*
dataset_info:
features:
- name: db
dtype: string
- name: table_name
dtype: string
- name: column_names
dtype: string
- name: column_types
dtype: string
- name: example_rows
dtype: string
- name: example_columns
dtype: string
splits:
- name: dw
num_bytes: 157140
num_examples: 97
- name: nova
num_bytes: 172217
num_examples: 109
- name: neutron
num_bytes: 70285
num_examples: 175
download_size: 154931
dataset_size: 399642
---
# Dataset Card for `beaver-table`
[Homepage and leaderboard](https://beaverbench.github.io) |
[Github repository](https://github.com/beaverbench/beaver) |
[Paper](https://arxiv.org/abs/2409.02038)
Beaver is a holistic framework for evaluating performance on complex, private‑enterprise text‑to‑SQL tasks.
This repository includes the full collection of tables. Each table contains:
* **db**: ID of the database the table belongs to
* **table_name**: name of the table in the database
* **column_names**: names of the columns in the table
* **column_types**: data types of the columns in the table
* **example_rows**: example rows of the table
* **example_columns**: example values for each column in the table
## Getting started
We use MySQL as the execution engine for running SQL queries.
You can download the anonymized MySQL dump [here](https://huggingface.co/datasets/beaverbench/beaver-table/blob/main/beaver_db.zip).
A free MySQL installation is available [here](https://dev.mysql.com/downloads/mysql/).
After installing MySQL, import the dump files to your local MySQL using `mysql -u root -p < xxx.sql`.
```
from datasets import load_dataset
import json
domain = 'dw'
data = load_dataset('beaverbench/beaver-table')
json_fields = ['column_names', 'column_types', 'example_rows', 'example_columns']
for sample in data[domain]:
sample = {k: (json.loads(v) if k in json_fields else v) for k, v in sample.items()}
print(json.dumps(sample, indent=2))
```
## Citation
```
@article{chen2024beaver,
title={BEAVER: an enterprise benchmark for text-to-sql},
author={Chen, Peter Baile and Yang, Devin and Li, Weiyue and Wenz, Fabian and Zhang, Yi and Tatbul, Nesime and Cafarella, Michael and Demiralp, {\c{C}}a{\u{g}}atay and Stonebraker, Michael},
journal={arXiv preprint arXiv:2409.02038},
year={2024}
}
```