Commit b419ecd1 authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Added 3-character code to data unit IDs

parent be0700bc
Pipeline #28951 passed with stage
in 2 minutes and 51 seconds
......@@ -630,6 +630,8 @@ class DataUnitTilesHelper:
tile from data_unit.
"""
data_unit_full_id = "%s_%s" % (exposure_entity_code, data_unit.id)
sql_commands = {}
sql_commands["query"] = "SELECT COUNT(*) FROM %s"
......@@ -663,7 +665,7 @@ class DataUnitTilesHelper:
data_unit.data_unit_tiles["quadkey"].values[i],
str(aggregated_source_id),
occupancy_case,
data_unit.id,
data_unit_full_id,
)
)
exec_result = db_gde_tiles.cursor.fetchall()
......@@ -681,7 +683,7 @@ class DataUnitTilesHelper:
data_unit.data_unit_tiles["quadkey"].values[i],
str(aggregated_source_id),
occupancy_case,
data_unit.id,
data_unit_full_id,
)
)
elif exec_result[0][0] == 0: # No entry for this data-unit tile exists --> append
......@@ -693,7 +695,7 @@ class DataUnitTilesHelper:
str(aggregated_source_id),
occupancy_case,
exposure_entity_code,
data_unit.id,
data_unit_full_id,
data_unit.data_unit_tiles["size_data_unit_tile_area"].values[i],
data_unit.data_unit_tiles["size_data_unit_tile_built_up_area"].values[
i
......@@ -711,7 +713,7 @@ class DataUnitTilesHelper:
data_unit.data_unit_tiles["quadkey"].values[i],
str(aggregated_source_id),
occupancy_case,
data_unit.id,
data_unit_full_id,
)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment