Skip to content

Commit

Permalink
unnest column description
Browse files Browse the repository at this point in the history
  • Loading branch information
wongjingping committed Oct 5, 2023
1 parent 54232a5 commit 5bb96c7
Show file tree
Hide file tree
Showing 7 changed files with 386 additions and 495 deletions.
102 changes: 42 additions & 60 deletions academic/academic.json

Large diffs are not rendered by default.

241 changes: 111 additions & 130 deletions advising/advising.json

Large diffs are not rendered by default.

281 changes: 127 additions & 154 deletions atis/atis.json

Large diffs are not rendered by default.

69 changes: 29 additions & 40 deletions geography/geography.json
Original file line number Diff line number Diff line change
@@ -1,174 +1,163 @@
{
"status": "success",
"table_metadata": {
"city": [
{
"data_type": "bigint",
"column_name": "population",
"column_description": ["The population of the city"]
"column_description": "The population of the city"
},
{
"data_type": "text",
"column_name": "city_name",
"column_description": ["The name of the city"]
"column_description": "The name of the city"
},
{
"data_type": "text",
"column_name": "country_name",
"column_description": ["The name of the country where the city is located"]
"column_description": "The name of the country where the city is located"
},
{
"data_type": "text",
"column_name": "state_name",
"column_description": ["The name of the state where the city is located"]
"column_description": "The name of the state where the city is located"
}
],
"lake": [
{
"data_type": "double precision",
"column_name": "area",
"column_description": ["The area of the lake in square kilometers"]
"column_description": "The area of the lake in square kilometers"
},
{
"data_type": "text",
"column_name": "lake_name",
"column_description": ["The name of the lake"]
"column_description": "The name of the lake"
},
{
"data_type": "text",
"column_name": "country_name",
"column_description": ["The name of the country where the lake is located"]
"column_description": "The name of the country where the lake is located"
},
{
"data_type": "text",
"column_name": "state_name",
"column_description": ["The name of the state where the lake is located (if applicable)"]
"column_description": "The name of the state where the lake is located (if applicable)"
}
],
"river": [
{
"data_type": "bigint",
"column_name": "length",
"column_description": ["The length of the river in meters"]
"column_description": "The length of the river in meters"
},
{
"data_type": "text",
"column_name": "river_name",
"column_description": ["The name of the river. Names exclude the word 'river' e.g. 'Mississippi' instead of 'Mississippi River'"]
"column_description": "The name of the river. Names exclude the word 'river' e.g. 'Mississippi' instead of 'Mississippi River'"
},
{
"data_type": "text",
"column_name": "country_name",
"column_description": ["The name of the country the river flows through"]
"column_description": "The name of the country the river flows through"
},
{
"data_type": "text",
"column_name": "traverse",
"column_description": ["The cities or landmarks the river passes through. Comma delimited, eg `new york,albany,boston`"]
"column_description": "The cities or landmarks the river passes through. Comma delimited, eg `new york,albany,boston`"
}
],
"state": [
{
"data_type": "bigint",
"column_name": "population",
"column_description": ["The population of the state"]
"column_description": "The population of the state"
},
{
"data_type": "double precision",
"column_name": "area",
"column_description": ["The area of the state in square kilometers"]
"column_description": "The area of the state in square kilometers"
},
{
"data_type": "double precision",
"column_name": "density",
"column_description": ["The population density of the state in people per square kilometer"]
"column_description": "The population density of the state in people per square kilometer"
},
{
"data_type": "text",
"column_name": "state_name",
"column_description": ["The name of the state"]
"column_description": "The name of the state"
},
{
"data_type": "text",
"column_name": "country_name",
"column_description": ["The name of the country the state belongs to"]
"column_description": "The name of the country the state belongs to"
},
{
"data_type": "text",
"column_name": "capital",
"column_description": ["The name of the capital city of the state"]
"column_description": "The name of the capital city of the state"
}
],
"highlow": [
{
"data_type": "text",
"column_name": "state_name",
"column_description": ["The name of the state"]
"column_description": "The name of the state"
},
{
"data_type": "text",
"column_name": "highest_elevation",
"column_description": ["The highest elevation point in the state in meters above sea level"]
"column_description": "The highest elevation point in the state in meters above sea level"
},
{
"data_type": "text",
"column_name": "lowest_point",
"column_description": ["The lowest elevation point in the state"]
"column_description": "The lowest elevation point in the state"
},
{
"data_type": "text",
"column_name": "highest_point",
"column_description": ["The highest point in the state"]
"column_description": "The highest point in the state"
},
{
"data_type": "text",
"column_name": "lowest_elevation",
"column_description": ["The lowest point in the state in meters above sea level"]
"column_description": "The lowest point in the state in meters above sea level"
}
],
"mountain": [
{
"data_type": "bigint",
"column_name": "mountain_altitude",
"column_description": ["The altitude of the mountain in meters"]
"column_description": "The altitude of the mountain in meters"
},
{
"data_type": "text",
"column_name": "mountain_name",
"column_description": ["The name of the mountain"]
"column_description": "The name of the mountain"
},
{
"data_type": "text",
"column_name": "country_name",
"column_description": ["The name of the country where the mountain is located"]
"column_description": "The name of the country where the mountain is located"
},
{
"data_type": "text",
"column_name": "state_name",
"column_description": ["The name of the state or province where the mountain is located (if applicable)"]
"column_description": "The name of the state or province where the mountain is located (if applicable)"
}
],
"border_info": [
{
"data_type": "text",
"column_name": "state_name",
"column_description": ["The name of the state that shares a border with another state or country."]
"column_description": "The name of the state that shares a border with another state or country."
},
{
"data_type": "text",
"column_name": "border",
"column_description": ["The name of the state that shares a border with the state specified in the state_name column."]
"column_description": "The name of the state that shares a border with the state specified in the state_name column."
}
]
},
"glossary": "",
"table_descriptions": {
"city": "The \"city\" table contains information about cities, including their population, name, country, and state. This table can be joined with other tables such as \"lake\", \"river\", \"state\", \"highlow\", \"mountain\", and \"border_info\" to gather additional information about the cities, such as their proximity to lakes, rivers, mountains, or borders.",
"lake": "The \"lake\" table contains information about lakes, including their area, name, country, and state (if applicable). This table can be joined with other tables such as \"city\", \"river\", \"state\", \"highlow\", \"mountain\", and \"border_info\" to gather additional information about the lakes.",
"river": "The \"river\" table contains information about rivers, including their length, name, the country they flow through, and the cities or landmarks they pass through. This table can be joined with other tables such as \"city\", \"lake\", \"state\", and \"mountain\" to gather additional information about the rivers.",
"state": "The \"state\" table contains information about different states, including their population, area, population density, state name, country name, and capital city. This table can be joined with other tables such as \"city\", \"lake\", \"river\", \"highlow\", \"mountain\", and \"border_info\" to gather additional information about the states.",
"highlow": "The \"highlow\" table contains information about the highest and lowest elevations and points in each state. It can be joined with the \"city\", \"lake\", \"state\", \"mountain\", and \"border_info\" tables to retrieve additional information about each state.",
"mountain": "The \"mountain\" table contains information about mountains, including their altitude, name, country, and state (if applicable). This table can be joined with other tables such as \"city\", \"lake\", \"river\", \"state\", \"highlow\", and \"border_info\" to gather additional information about the mountains.",
"border_info": "The \"border_info\" table contains information about the borders of states. It includes the name of a state and the name of the state that shares a border with it. This table can be joined with other tables such as \"city\", \"lake\", \"state\", \"highlow\", or \"mountain\" to gather additional information about the borders."
}
}
31 changes: 12 additions & 19 deletions restaurants/restaurants.json
Original file line number Diff line number Diff line change
@@ -1,77 +1,70 @@
{
"status": "success",
"table_metadata": {
"location": [
{
"data_type": "bigint",
"column_name": "restaurant_id",
"column_description": ["Unique identifier for each restaurant"]
"column_description": "Unique identifier for each restaurant"
},
{
"data_type": "bigint",
"column_name": "house_number",
"column_description": ["The number assigned to the building where the restaurant is located"]
"column_description": "The number assigned to the building where the restaurant is located"
},
{
"data_type": "text",
"column_name": "street_name",
"column_description": ["The name of the street where the restaurant is located"]
"column_description": "The name of the street where the restaurant is located"
},
{
"data_type": "text",
"column_name": "city_name",
"column_description": ["The name of the city where the restaurant is located"]
"column_description": "The name of the city where the restaurant is located"
}
],
"geographic": [
{
"data_type": "text",
"column_name": "city_name",
"column_description": ["The name of the city"]
"column_description": "The name of the city"
},
{
"data_type": "text",
"column_name": "county",
"column_description": ["The name of the county"]
"column_description": "The name of the county"
},
{
"data_type": "text",
"column_name": "region",
"column_description": ["The name of the region"]
"column_description": "The name of the region"
}
],
"restaurant": [
{
"data_type": "bigint",
"column_name": "id",
"column_description": ["Unique identifier for each restaurant"]
"column_description": "Unique identifier for each restaurant"
},
{
"data_type": "real",
"column_name": "rating",
"column_description": ["The rating of the restaurant on a scale of 0 to 5"]
"column_description": "The rating of the restaurant on a scale of 0 to 5"
},
{
"data_type": "text",
"column_name": "name",
"column_description": ["The name of the restaurant"]
"column_description": "The name of the restaurant"
},
{
"data_type": "text",
"column_name": "food_type",
"column_description": ["The type of food served at the restaurant"]
"column_description": "The type of food served at the restaurant"
},
{
"data_type": "text",
"column_name": "city_name",
"column_description": ["The city where the restaurant is located"]
"column_description": "The city where the restaurant is located"
}
]
},
"glossary": "",
"table_descriptions": {
"location": "The \"location\" table is used to store information about the location of restaurants. It contains columns such as \"restaurant_id\" to uniquely identify each restaurant, \"house_number\" to represent the number assigned to the building where the restaurant is located, \"street_name\" to store the name of the street, and \"city_name\" to store the name of the city. This table can be joined with the \"geographic\" and \"restaurant\" tables to retrieve additional information about the restaurants or to perform location-based queries.",
"geographic": "The \"geographic\" table is used to store information about cities, counties, and regions. It can be joined with the \"location\" table, the \"geographic\" table itself, or the \"restaurant\" table.",
"restaurant": "The \"restaurant\" table is used to store information about different restaurants. It contains columns for the unique identifier of each restaurant, the rating of the restaurant, the name of the restaurant, the type of food served at the restaurant, and the city where the restaurant is located. This table can be joined with the \"location\", \"geographic\", or \"restaurant\" tables."
}
}
Loading

0 comments on commit 5bb96c7

Please sign in to comment.