Skip to content

Commit

Permalink
Add res and oth tables to create queries
Browse files Browse the repository at this point in the history
  • Loading branch information
bereba committed Jan 20, 2025
1 parent c72d4ad commit 34db71b
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions pylovo/config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
LOG_LEVEL = "INFO"

CSV_FILE_LIST = [
{"path": os.path.join(".", "raw_data", "equipment_data.csv"), "table_name": "betriebsmittel"},
{"path": os.path.join(".", "raw_data", "postcode.csv"), "table_name": "postcode"},
{"path": os.path.join("raw_data", "equipment_data.csv"), "table_name": "betriebsmittel"},
{"path": os.path.join("raw_data", "postcode.csv"), "table_name": "postcode"},
]

CLUSTERING_PARAMETERS = ["version_id",
Expand Down Expand Up @@ -56,6 +56,34 @@

# Database schema - table structure
CREATE_QUERIES = {
"res": """CREATE TABLE IF NOT EXISTS public.res
(
ogc_fid integer,
osm_id varchar(80),
area numeric(23, 15),
use varchar(80),
comment varchar(80),
free_walls numeric(18),
building_t varchar(80),
occupants numeric(23, 15),
floors numeric(18),
constructi varchar(80),
refurb_wal numeric(23, 15),
refurb_roo numeric(23, 15),
refurb_bas numeric(23, 15),
refurb_win numeric(23, 15),
geom geometry(MultiPolygon,3035)
)""",
"oth": """CREATE TABLE IF NOT EXISTS public.oth
(
ogc_fid integer,
osm_id varchar(80),
area numeric(23, 15),
use varchar(80),
comment varchar(80),
free_walls numeric(18),
geom geometry(MultiPolygon,3035)
)""",
"betriebsmittel": """CREATE TABLE IF NOT EXISTS public.betriebsmittel
(
name character varying(100) COLLATE pg_catalog."default" NOT NULL,
Expand Down

0 comments on commit 34db71b

Please sign in to comment.