Skip to content

Commit

Permalink
Merge pull request #134 from QGEP/2024-04-12-identifier-check
Browse files Browse the repository at this point in the history
2024-04-12-identifier-check
  • Loading branch information
ponceta authored Apr 25, 2024
2 parents 2455a6a + fa02355 commit ce05748
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Note that this currently only supports up to date QGEP and QWAT (1.5.6/1.3.6 res

### Installation

The tool requires **python** (3.6 or newer) and **java** to be available. Then, it can be installed like any other python library:
The tool requires
**python** (3.6 or newer) and
**java** to be available (see https://qgep.github.io/docs/admin-guide/interlis-io/index.html#java).

Then, it can be installed like any other python library:
```
pip install --upgrade qgepqwat2ili
```
Expand Down
27 changes: 26 additions & 1 deletion qgepqwat2ili/utils/ili2db.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,33 @@ def check_identifier_null():
('pipe_profile'),
#VSA-DSS
('catchment_area'),
('zone'),
('connection_object'),
('control_center'),
('hazard_source'),
('hydr_geometry'),
('hydraulic_char_data'),
('measurement_result'),
('measurement_series'),
('measuring_device'),
('measuring_point'),
('mechanical_pretreatment'),
('overflow'),
('overflow_char'),
('retention_body'),
('river_bank'),
('river_bed'),
('sector_water_body'),
('substance'),
('surface_runoff_parameters'),
('surface_water_bodies'),
('throttle_shut_off_unit'),
('waste_water_treatment'),
('water_catchment'),
('water_control_structure'),
('water_course_segment'),
('wwtp_energy_use'),
('zone'),

]:
cursor.execute(f"SELECT COUNT(obj_id) FROM qgep_od.{notsubclass} WHERE identifier is null;")
# use cursor.fetchone()[0] instead of cursor.rowcount
Expand Down

0 comments on commit ce05748

Please sign in to comment.