opengeos / open-buildings

Tools for working with open building datasets
https://opengeos.github.io/open-buildings
Other
124 stars 17 forks source link

Fix add column #61

Open FlorisCalkoen opened 7 months ago

FlorisCalkoen commented 7 months ago

Hi @cholmes, a small PR to keep scripts updated with new overture releases. Ideally we work towards a package that can almost be used in a CI workflow to postprocess Overture releases so that they are optimized for cloud-native workflows.

In the feb release there was a column called "names" that broke the def process_parquet_file() :

 # NOTE: exclude names column because it's all NULL and causes InternalException: INTERNAL Error: Attempted to dereference unique_ptr that is NULL!
con.execute(f"CREATE OR REPLACE TABLE buildings AS SELECT * EXCLUDE(names) FROM read_parquet('{input_parquet_path}')")

Also I have adjusted the filepaths in the add_columns.py so that they match with the bash script in https://github.com/opengeos/open-buildings/pull/60