Skip to content

Commit

Permalink
cratedb_toolkit.datasets: Add DDL schema for The Weather Dataset: Cities
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Mar 7, 2024
1 parent 69d517c commit f438f61
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion cratedb_toolkit/datasets/kaggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from cratedb_toolkit.datasets.store import registry

the_weather_dataset_daily = Dataset(
title="The Weather Dataset",
title="The Weather Dataset: Daily Weather",
reference="kaggle://guillemservera/global-daily-climate-data/daily_weather.parquet",
documentation="https://www.kaggle.com/datasets/guillemservera/global-daily-climate-data",
ddl="""
Expand All @@ -27,4 +27,23 @@
)


the_weather_dataset_cities = Dataset(
title="The Weather Dataset: Cities",
reference="kaggle://guillemservera/global-daily-climate-data/cities.csv",
documentation="https://www.kaggle.com/datasets/guillemservera/global-daily-climate-data",
ddl="""
CREATE TABLE IF NOT EXISTS {table} (
"station_id" TEXT,
"city_name" TEXT,
"country" TEXT,
"state" TEXT,
"iso2" TEXT,
"iso3" TEXT,
"loc" GEO_POINT
)
""",
)


registry.add(the_weather_dataset_daily)
registry.add(the_weather_dataset_cities)

0 comments on commit f438f61

Please sign in to comment.