0

I need to join seperate values from two different CSV sources in the QGIS model builder.

I have used the answer from Modeler does not allow choosing of CSV for joining in QGIS with the following code

SELECT *, make_point(0,0) AS geometry
FROM input1

What I do not understand is: Do I have to change input1 to input2 or something similar when joining two CSVs or is input1 okay for both steps ? "Szenario CSV" and "Sanierung 2040 mit heating age CSV" are my CSV sources. I do not get an error.

enter image description here

4
  • 1
    Maybe (SELECT *, make_point(0,0) AS geometry FROM input1) UNION ALL (SELECT *, make_point(0,0) AS geometry FROM input2) ? Commented Nov 13 at 12:46
  • I do not have the unterstanding what the compiler interprets: the connected input in the model builder ? this is what it looks like with no reference to other parts of the model. I have been running some tests and the join seems fine but I am not sure if this right or I've been "lucky". Commented Nov 13 at 13:02
  • 1
    If you only have one input data source to "Execute SQL" tool, it will always be named input1. But it is possible to select multiple inputs by clicking the three dots symbol. They will then be named input1, input2, ... by the order you drag and drop/arrange them in the input data sources dialogue. Commented Nov 13 at 14:25
  • I suspect you can use one "Execute SQL" to join both csv files. Commented yesterday

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.