Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024-04-12-identifier-check #134

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading