File size: 1,290 Bytes
6e41ce8
 
a5de60c
 
 
 
 
 
 
 
208dc11
 
 
8fc91b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
language:
- en
- zh
tags:
- sql
- text2sql
size_categories:
- 100K<n<1M
task_categories:
- text2text-generation
pretty_name: OGText2SQL
---

# Dataset Summary
**OGText2SQL** dataset was utilized in training the **OGSQL** model, this dataset comprises over 350,000 rows of text-to-SQL pairs. Through a series of data refining steps, including schema expansion, SQL refinement, and instruction generation using existing Language Models (LLMs), the dataset was meticulously processed to ensure quality and relevance.

# How to use it

> Python
```python
from datasets import load_dataset

dataset = load_dataset("OneGate/OGText2SQL")
```


> API
```shell
curl -X GET \
     "https://datasets-server.huggingface.co/rows?dataset=OneGate%2FOGText2SQL&config=default&split=train&offset=0&length=100"
```

# Dataset Structure
## Data Instances
Each data instance in this dataset represents a text-to-SQL entry where the instruction has been formatted with the table schema and question. The output is the SQL in SQlite dialect.

## Data Fields

- `context`: the instruction to generate SQL.
- `question`: the human input.
- `SQL`: the generated SQL query.
- `source`: the source dataset of the sample.

## Languages
The language of the data is mainly English, with other languages.