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

fk_dataowner check not correct #176

Open
sjib opened this issue Nov 1, 2024 · 10 comments
Open

fk_dataowner check not correct #176

sjib opened this issue Nov 1, 2024 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@sjib
Copy link
Contributor

sjib commented Nov 1, 2024

          Thanks for plugin 1.6.4.

Testing exports (these was blocking me in the last days):
Export DSS_2015, no selection: no errors in the validation at the end, reachpoints are now exported with Abwassernetzelementref.
Strange message while exporting:
2024-10-17T18:46:54 SUCCESS Sucess : OK: Integrity checks organisation
2024-10-17T18:46:54 SUCCESS Sucess : OK: Integrity checks wastewater_structure
2024-10-17T18:46:54 SUCCESS Sucess : OK: Integrity checks identifiers not isNull
2024-10-17T18:46:55 SUCCESS Sucess : OK: Integrity checks fk_owner not isNull
2024-10-17T18:46:55 SUCCESS Sucess : OK: Integrity checks fk_operator not isNull
2024-10-17T18:46:55 INFO INFO: Missing fk_dataowner in schema qgep_od : Add missing fk_dataowner to get a valid INTERLIS export file when converting to Release 2020 (will bei MANDATORY). See qgep logs tab for details.
2024-10-17T18:46:55 INFO INFO: Missing fk_provider in schema qgep_od : Add missing fk_provider to get a valid INTERLIS export file when converting to Release 2020 (will bei MANDATORY). See qgep logs tab for details.
2024-10-17T18:50:40 SUCCESS Sucess : Data successfully exported to P:/Thun/Gemeinden/166-167 Unterlangenegg/qgep/exporte/qgep-export2024-10-17

First SUCCESS OK, then Info about missing fk_dataowner. I checked the XTF-File: there are as many as records exported, so I think this Info is fake

Originally posted by @urskaufmann in QGEP/QGEP#880 (comment)

@sjib
Copy link
Contributor Author

sjib commented Nov 4, 2024

@urskaufmann Should I just change the final message if fk_provider and / or fk_datawoner are missing?
Or should I also stop the export as with missing fk_owner / fk_operator?

What do the others think?

@sjib sjib changed the title fk_datawoner check not correct fk_dataowner check not correct Nov 4, 2024
@sjib
Copy link
Contributor Author

sjib commented Nov 4, 2024

And additional condition criteria would have to be added here if fk_provider and / or fk_dataowner are not complete

@urskaufmann
Copy link

I have now realized what the message is about... you have to really really read the text!

I would not stop the export.
I would place this Note at the end of the export. Not starting with "Missing..." but something like: When converting to release 2020, fk_dataowner/fk_provider will be mandatory, but are missing in this export.

@urskaufmann
Copy link

While migration to qgep / to tww, I get during export these messages / errors:

2025-01-23T10:48:02 INFO INFO: Missing identifiers in schema qgep_od : Add missing identifiers to get a valid INTERLIS export file. See qgep logs tab for details.
2025-01-23T10:48:02 WARNING ERROR: Missing MANDATORY fk_owner in schema qgep_od : Add missing MANDATORY fk_owner to get a valid INTERLIS export file. See qgep logs tab for details.

Where are these "qgep logs tab"? In the moment, when export stops, there are no export files written (and probably therefore no log files). I miss support to find the missing identifiers (can be in every DSS-tab) or missing dataowners or missing owners...

@sjib
Copy link
Contributor Author

sjib commented Jan 23, 2025

@urskaufmann It is not in a log file but in the tab "qgep" if you set the error level (in the settings of the plugin)

Image

There should be error messages if you change error level to "debug"

f"Number of datasets in class '{notsubclass}' without identifier could not be identified (TypeError: 'NoneType' object is not subscriptable). Automatically set class_identifier_count = 0"

and (this should already show up with level "info"

f"Number of datasets in class '{notsubclass}' without identifier : {class_identifier_count}"

@sjib sjib added the documentation Improvements or additions to documentation label Jan 23, 2025
@sjib
Copy link
Contributor Author

sjib commented Jan 23, 2025

Here how you kind find the logging in the "qgep" Tab (there is also a QGEP Tab sometimes - that is a little bit confusing)

Image

@sjib
Copy link
Contributor Author

sjib commented Jan 23, 2025

There is an error for fk_provider - there we have an error in the code - this line should have fk_provider not fk_dataowner

        f"Number of datasets in class '{notsubclass}' without fk_dataowner : {class_fk_provider_count}"

f"Number of datasets in class '{notsubclass}' without fk_dataowner : {class_fk_provider_count}"

@sjib
Copy link
Contributor Author

sjib commented Jan 23, 2025

And here for fk_dataowner

Image

@sjib
Copy link
Contributor Author

sjib commented Jan 23, 2025

And fk_provider (with wrong message)

Image

@sjib
Copy link
Contributor Author

sjib commented Jan 23, 2025

  • Check also for identifer / fk_* empty

SELECT COUNT(obj_id) FROM qgep_od.wastewater_structure WHERE identifier is null or identifier = '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants