6

I have used the model designer to make a model in QGIS.
The model takes data different shapefiles, and runs a few algorithms.

The result is different layers loaded in an new project.
I manually store these layers in a geopackage.

Example of tablename:
week-37_high-detail-area

I would like to add a step to the model, so it stores the output as a new table in an existing geopackage. I would like the model to store the layer to the geopackage with the number of the week in the tablename of the geopackage.
Is it possible to add some sort of expression section in the tablename?

enter image description here

1 Answer 1

2

I have a model which extract raster pixels as points.

The output point layer is saved in the existing geopackage /home/bera/Desktop/gistest/testdatabase.gpkg

I set the output layer as the pre-calculated-value:

format( 'ogr:dbname=%1 table=output_week_%2 (geom)', '/home/bera/Desktop/gistest/testdatabase.gpkg', week(now()))

enter image description here

1
  • I have tried to replicate this but get the following error "OGR driver for '' not found (OGR error: )". Looks to me like it isn't picking which output format to use? Commented Jan 24, 2024 at 8:44

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.