-
Notifications
You must be signed in to change notification settings - Fork 3
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
qgepdss/export.py - rohrprofil_geometry etc. add if filtered #144
qgepdss/export.py - rohrprofil_geometry etc. add if filtered #144
Conversation
@urskaufmann Can you copy this adaption to your installation and test? If ok I will work on other missing classes. |
not ok. Sorry, the "correct" error is here: Ein Fehler trat bei der Ausführung von Python-Code auf: sqlalchemy.exc.InvalidRequestError: Don't know how to join to . Please use the .select_from() method to establish an explicit left side, as well as providing an explcit ON clause if not present already to help resolve the ambiguity. Python-Version: 3.9.18 (heads/master:5eba59e, Feb 1 2024, 20:02:10) [MSC v.1929 64 bit (AMD64)] |
@urskaufmann rohrprofil_geometrie is not directly connected with reach - I have to adjust the join: |
Add whole line of references to wastewater_networkelement
@urskaufmann Can you test again with the updated join statement? |
I used this example as role model for a join with several classes:
|
There is another error. Seems that the pipe_profile - code now works. Ein Fehler trat bei der Ausführung von Python-Code auf: sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation) insert or update on table "anschlussobjekt" violates foreign key constraint "anschlussobjekt_abwassernetzelementref_fkey" DETAIL: Key (abwassernetzelementref)=(546) is not present in table "abwassernetzelement". (Background on this error at: http://sqlalche.me/e/13/gkpj) The above exception was the direct cause of the following exception: Traceback (most recent call last): (Background on this error at: http://sqlalche.me/e/13/gkpj) |
@urskaufmann The reason is, that we do not have defined a filter criteria for Anschlussobjekte and subclasses:
With the current configuration all Anschlussobjekt (Brunnen, Einzelflaechen, Gebaeude, Reservoir) will be exported, even if they are not attached to a selected Abwassernetzelement. |
then nobody will be able to export a dss-selection if there are this filter missing, because the unfiltered records will in most cases have foregin keys to elements, that are not in the selection, and there we will get always an error. If the export of a selection should be an option, then all this filter have to be set. |
to review if or_ statement is correct
…s://github.com/QGEP/qgepqwat2ili into 2024-05-14-add-missing-filters-interlis-export
Missing filter for selection in INTERLIS export configuration:
First test to solve QGEP/QGEP#856