Datasets:

Modalities:
Text
Formats:
json
ArXiv:
Libraries:
Datasets
pandas
License:
File size: 3,133 Bytes
d5522ff
 
 
b9a2979
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22b28d3
 
b9a2979
 
 
c515efa
4964aa1
0544355
b9a2979
 
 
 
 
 
 
 
c515efa
4964aa1
b9a2979
c515efa
0544355
db69992
 
 
 
 
 
 
b9a2979
c515efa
0544355
b9a2979
db69992
 
 
 
 
 
 
b9a2979
c515efa
0544355
db69992
 
 
 
 
 
c515efa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
license: cc-by-sa-3.0
---
# sql-create-context-v2 Dataset

## Overview

The `sql-create-context-v2` dataset enhances the original dataset built from WikiSQL and Spider, focusing on text-to-SQL tasks with a special emphasis on reducing hallucination of column and table names. This version introduces a JSONL format for more efficient data processing and iteration, alongside a structured approach to representing SQL queries in the dataset entries.

### Key Enhancements

- **Dataset Format:** Transitioned to JSON Lines (JSONL) format for improved handling of large datasets and streamlined processing of individual records.
- **Structured Query Representation:** Each SQL query answer is now encapsulated within an object keyed by `SQL_Query`, facilitating clearer separation between the query text and other metadata.

## Sample Entries

```json
{
  "question": "Please show the themes of competitions with host cities having populations larger than 1000.",
  "context": "CREATE TABLE city (City_ID VARCHAR, Population INTEGER); CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR)",
  "answer": {"SQL_Query": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"}
},
{
  "question": "Please show the different statuses of cities and the average population of cities with each status.",
  "context": "CREATE TABLE city (Status VARCHAR, Population INTEGER)",
  "answer": {"SQL_Query": "SELECT Status, AVG(Population) FROM city GROUP BY Status"}
}

```

Citing this Work
If you use the sql-create-context-v2 dataset, please cite the following in addition to the original works:



```bibtex
@misc{sql-create-context-v2_2024,
  title   = {sql-create-context-v2 Dataset},
  author  = Rama Chetan Atmudi,
  year    = {2024},
  url     = {https://huggingface.co/datasets/ramachetan22/sql-create-context-v2},
  note    = {Enhancements and modifications to the original sql-create-context dataset for improved usability and processing.}
}
```


Datasets Used to Create This Dataset

```bibtex
@misc{b-mc2_2023_sql-create-context,
  title   = {sql-create-context Dataset},
  author  = {b-mc2}, 
  year    = {2023},
  url     = {https://huggingface.co/datasets/b-mc2/sql-create-context},
  note    = {This dataset was created by modifying data from the following sources: \cite{zhongSeq2SQL2017, yu2018spider}.},
}
```

```bibtex
Datasets used to create this dataset
@article{zhongSeq2SQL2017,
  author  = {Victor Zhong and Caiming Xiong and Richard Socher},
  title   = {Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning},
  journal = {CoRR},
  volume  = {abs/1709.00103},
  year    = {2017}
}
```

```bibtex
@article{yu2018spider,
  title   = {Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
  author  = {Yu, Tao and Zhang, Rui and Yang, Kai and Yasunaga, Michihiro and Wang, Dongxu and Li, Zifan and Ma, James and Li, Irene and Yao, Qingning and Roman, Shanelle and others},
  journal = {arXiv preprint arXiv:1809.08887},
  year    = {2018}
}
```