Bug report #16129

Processing : execute sql alg does not work with input2 ... inputN parameters

Added by jd lom almost 3 years ago. Updated about 1 year ago.

Status:Open
Priority:Normal
Assignee:-
Category:Processing/QGIS
Affected QGIS version:3.5(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24041

Description

In ExecuteSQL.py, the layerIdx variable is not incremented.

Best regards,


Related issues

Duplicated by QGIS Application - Bug report #20667: 'execute sql' as part of a model does not recognize the i... Closed 2018-11-29

History

#1 Updated by jd lom almost 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed
  • Target version changed from Version 2.18 to Version 3.0

#2 Updated by Pieter Brusselman about 1 year ago

Hi,

I would like to re-open this issue. According to this question https://gis.stackexchange.com/questions/280080/execute-sql-in-qgis-graphical-modeler I tried the last version of QGIS (3.4.1) and the same problem still occure.

Best regards,

#3 Updated by Giovanni Manghi about 1 year ago

  • Description updated (diff)

Pieter Brusselman wrote:

Hi,

I would like to re-open this issue. According to this question https://gis.stackexchange.com/questions/280080/execute-sql-in-qgis-graphical-modeler I tried the last version of QGIS (3.4.1) and the same problem still occure.

Best regards,

sure you are using the latest version of Processing? give it a try by using a new/clean profile, thanks.

#4 Updated by Pieter Brusselman about 1 year ago

I did a clean install. But the problem still persists.

using following query as last step in a model:

select * from input2 where ws_oidn in
(select ws_oidn from input1)

I get this error:

Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\qgis\ExecuteSQL.py", line 157, in processAlgorithm
raise QgsProcessingException(vLayer.dataProvider().error().message())
_core.QgsProcessingException: <p><b>virtual:</b> Cannot find layer output_195dc533_45e8_46ac_a3fd_b5a545eae3f9

Error encountered while running Execute SQL
Error encountered while running Execute SQL
Execution failed after 1.47 seconds

#5 Updated by Giovanni Manghi about 1 year ago

Pieter Brusselman wrote:

I did a clean install.

clean profile: settings > user profiles > new profile

#6 Updated by Pieter Brusselman about 1 year ago

Giovanni Manghi wrote:

Pieter Brusselman wrote:

I did a clean install.

clean profile: settings > user profiles > new profile

I created a new profile like you suggested, but I get the same error

#7 Updated by Jürgen Fischer about 1 year ago

  • Duplicated by Bug report #20667: 'execute sql' as part of a model does not recognize the input of a previous algorithm added

#8 Updated by Jürgen Fischer about 1 year ago

  • Status changed from Closed to Reopened
  • Assignee deleted (Hugo Mercier)
  • Resolution deleted (fixed/implemented)

#9 Updated by roland gutzinger about 1 year ago

I've got the same problem under linux as well as under windows. In 3.4 and 3.5.

#10 Updated by Giovanni Manghi about 1 year ago

  • Affected QGIS version changed from master to 3.5(master)
  • Status changed from Reopened to Open
  • Operating System deleted (All)

Also available in: Atom PDF