process_scenario#
- caf.ntem.build.process_scenario(connection, label, metadata_id, paths, id_sub)[source]#
Process data for a scenario and version and insert in into the database.
- Parameters:
connection (sqlalchemy.Connection) – The connection to the database to insert into.
label (FileType) – The scenario and version of the data.
metadata_id (int) – The id of the metadata for the data to insert.
paths (list[pathlib.Path]) – The paths to the data to unpack and insert. These should point to the NTEM access database files for each region that fall under the same metadata ID (i.e. same scenario and version).
id_sub (dict[int, int]) – Dictionary to map NTEM zone IDs to database IDs. This is used to replace the zone IDs in the data with the database IDs.