[Qgis-user] Loading filtered database table as temp layer

Michael Gieding michael.gieding at live.de
Mon May 3 11:12:16 PDT 2021


Hallo erverybody,

I'm looking for a solution where users can load the output of a sql statement from PostgreSQL as temporary layer.
The tool should be as easy as possible, as the target group is not very experienced in QGIS. Means there should be some
defined fields to enter values for filtering and an ok-button to create the desired layer.

One idea I tried, is to create a workflow in the graphical modelbuilder in QGIS. In the moment it works to create a new layer
with the desired SQL-statement. I used the algorithms "PostgreSQL SQL execute and load" --> "Load Layer to project".
But I can't find an option to load the output of the statement as a temporary. The result is like a loaded statement from
the database manager. So the users would work with the original data within the database.
Does anyone has got an idea to achieve this? Maybe I've overseen something.

Of course a separate plugin would do the thing, but with my skills it's way more difficult to achieve.
So I would be happy to solve the problem the "easy way".

Any (other) hint is welcome.


Many thanks in advance.

Michael Gieding


More information about the Qgis-user mailing list