Closed tabeckers closed 4 years ago
When this process is finished, the data.premise table can be dropped.
All materialized views were created. They will be populated over the weekend, since this operation will take a very long time and locks the data at its first run.
See #194
I'll review
The CAT column (category) was set to 1
for every subquery in both the foundation_indicative
and foundation_risk
materialized views. This would mean that every foundation would have the same type and the same risk. This error was due to copy-paste behaviour without proper double checking.
All categories have been updated to their correct values.
Also, the formatter of DBeaver or PgAdmin has removed ALL comments and has reformatted the entire query. It seems that as of now there isn't that much we can do about this.
The CAT column should be mapped to an enum. For the foundation type (foundation_indicative
) this was done using a temporary enum: data.foundation_type_temp
. This can be mapped from the integer value in the foundation_indicative
view using the function data.map_foundation_temp()
.
The CAT column of the view foundation_risk
will be converted to an enum, since we already know the amount of foundation risk levels (A, B, C, D, E).
The geocoder has been expanded with a new table for country, municipality, district and neighborhood. The geocoder.building
table will reference the geocoder.district
table. The process of doing so is contained in issue #209.
These new tables have to be references from our views and materialized views in the data
schema.
All relevant tables have bene processed, all references have been corrected and the entire data
schema has been cleaned up. This is ready for review.
All queries should be stored in text format in the shared drive. These versions of the materialized views should contain all comments, formatting and explanations. The same format as the old documented views should be used (also present in the drive).
The views and materialized views in the data namespace have to be updated. They still refer to old building ids and old tables. Comments and descriptions have to be added for each view and materialized views. Some views should also be materialized.