[QGIS-Developer] Thoughts on using processing models for ETL tasks

Nyall Dawson nyall.dawson at gmail.com
Sat Jun 9 00:06:08 PDT 2018


On Fri, 8 Jun 2018 at 18:49, johnrobot <johnrobot at gmail.com> wrote:
>
> Hi
> I have been testing building models in Processing and I have some additional
> thoughts.

*snip* - selective answers below

> - How about support for duplicating a model in the model list? I can imagine
> that I would like to create similar models somewhere down the road.

You can edit the model and save as a new one from the modeler dialog.

> - In the algortihm for dropping attributes, it seems that I manually have to
> enter the attributes to remove. The drop down list is empty. Is this
> intended? I would prefer a list/window where I can select one or more
> attributes to drop.

Yes, this is intended. When you are designing a model the child
algorithm's don't know which layer they will be operating on, or what
attributes will be present in those layers. So you need to manually
enter things like this.

> - When writing to a SHP file that already exists, I get a Python error. When
> I remove the file and run the model again, it works as expected.

What's the Python error? Is this 2.x or 3.0? (If 2.x, use 3.0 -
modeler is much stabler in 3.0).

> - How do I write to multiple data sets in the same model? For me, it is not
> uncommon that I want to create for example SHP and excel output in the same
> job, but I donĀ“t see how to create more than one output file.

Try adding a "drop geometries" step to your model, so that the model
has one output before the drop geometry and one for the result of the
dropped geometry (for the excel output).

> - When I write features with a geometry to an excel file, I get a Python
> error and the result is emty.

What's the error?

Nyall


More information about the QGIS-Developer mailing list