<div dir="ltr"><div>Hi 
Harrissou,</div><div><br></div><div>
"PostgreSQL execute SQL" can not be input to another algorithm in Processing Modeler, because it has no output. It is only used to execute SQL directly in the database. <br></div><div><br></div><div>"PostgreSQL execute and load SQL" do the same, but load the result of the SQL query in QGIS, and this one already has the possibility to be used as input in another Modeler algorithm. The problem is just that it is loaded to QGIS, and my goal is to hardcode a PostGIS layer input to a Modeler algorithm. This is really easy with system based
 files, but I can't find an easy solution to PostGIS layers.</div><div><br></div><div>Thanks anyway Harrissou!</div><div><br></div><div>Best regards,</div><div>Pedro</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">DelazJ <<a href="mailto:delazj@gmail.com">delazj@gmail.com</a>> escreveu no dia quarta, 31/07/2019 à(s) 18:15:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Pedro,</div><div>Using "PostgreSQL execute SQL" <a href="https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/database.html#postgresql-execute-sql" target="_blank">https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/database.html#postgresql-execute-sql</a>? without the load part<br></div><div><br></div><div>Regards,</div><div>Harrissou<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 31 juil. 2019 à 18:31, Pedro Venâncio <<a href="mailto:pedrongvenancio@gmail.com" target="_blank">pedrongvenancio@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear all,<br><br>I'm developing a Processing Model and I want to run an algorithm (Union) on a specific PostGIS layer. The idea is to have this input layer hardcoded to the Union algorithm.<br><br>If this layer is stored in a system file (SHP, or any other vector layer format), it is simple, just pointing Union input field to that file. But as it is stored in PostgreSQL, I thought to use "PostgreSQL execute and load SQL" algorithm to call the layer and use it in Model, as input to Union.<br><br>In fact this works well, but when running the Model, the PostGIS layer is loaded to QGIS canvas. <br><br>I think this is happening because "PostgreSQL execute and load SQL" won’t create any new layer, and load the PostGIS layer itself, as a result of the query, just like it's explained in the docs:<br><br><a href="https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/database.html#postgresql-execute-and-load-sql" target="_blank">https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/database.html#postgresql-execute-and-load-sql</a><br><br>So, anyone have any hint to call a PostGIS layer and use it as hardcoded input to a Model algorithm, without python coding? <br><br>Thank you very much!<br><br>Best regards,<br>Pedro Venâncio</div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>
</blockquote></div>