Contains GRETL jobs for publishing data to OEREB-Kataster | Read-only mirror of https://github.com/sogis/oereb-gretljobs — Kanton Solothurn. Issues & pull requests at the source.
  • Groovy 54.6%
  • Shell 29.8%
  • PLpgSQL 15.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andreas Schmid 207a574a98 Switch to new GRETL group names
So in gretl_job_generator.groovy the group name can be set directly again
2026-07-09 15:48:04 +02:00
development_dbs Merge branch 'main' into oerebv2_publikation_kommunal 2023-11-02 16:49:16 +01:00
oerebv2_av [oerebv2_av] Fusion Kriegstetten triggers aktivieren 2026-01-28 13:38:11 +01:00
oerebv2_belastete_standorte Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
oerebv2_bundesdaten Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_bundesgesetze Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_bundeskonfiguration Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_einzelschutz_archaeologie Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
oerebv2_einzelschutz_denkmal Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
oerebv2_einzelschutz_geotop delete wrongly pushed data xtf 2023-07-31 17:55:20 +02:00
oerebv2_einzelschutz_naturreservat delete wrongly pushed data xtf 2023-07-31 17:55:20 +02:00
oerebv2_gewaesserraum Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
oerebv2_grundwasserschutz delete wrongly pushed data xtf 2023-07-31 17:55:20 +02:00
oerebv2_konfiguration_gesetze Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_konfiguration_grundbuchkreis Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_konfiguration_logo Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_konfiguration_text Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_konfiguration_themen [oerebv2_konfiguration_themen] Änderung Filename without date at the end 2025-08-29 09:35:05 +02:00
oerebv2_konfiguration_verfuegbarkeit Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_konfiguration_zustaendigestellen Provide node label as env var 2024-04-22 07:49:28 +02:00
oerebv2_naturgefahren [oerebv2_naturgefahren] neues Thema Naturgefahren 2025-08-08 17:23:26 +02:00
oerebv2_nutzungsplanung [oerebv2_nutzungsplanung] Änderung mit Vorwirkung 2024-09-20 17:40:40 +02:00
oerebv2_nutzungsplanung_kanton Update insert_oereb_nutzungsplanung_tables.sql 2023-08-02 15:19:25 +02:00
oerebv2_planungszonen Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
oerebv2_plzo [oerebv2_plzo] rename file 2024-09-16 08:56:48 +02:00
oerebv2_plzo_manueller_import Update build.gradle 2024-05-21 11:18:19 +02:00
oerebv2_waldgrenzen Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
oerebv2_waldreservate Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
.gitignore [oereb_waldgrenzen] Datenumbau (ohne wms tables update) 2022-01-04 15:06:06 +01:00
DEVELOP.md [oerebv2_konfiguration_themen] Änderung Filename without date at the end 2025-08-29 09:35:05 +02:00
docker-compose.yml Update GRETL tag to 2.2.617 (like in sogis/gretljobs) 2024-09-18 08:36:19 +02:00
gretl_job_generator.groovy Switch to new GRETL group names 2026-07-09 15:48:04 +02:00
Jenkinsfile Provide node label as env var 2024-04-22 07:49:28 +02:00
LICENSE Initial commit 2022-01-03 08:59:22 +01:00
README.md [oerebv2_einzelschutz_archaeologie] finished v1.0] 2023-05-11 08:16:26 +02:00
start-gretl.sh Update description of docker run command 2023-03-20 09:00:05 +01:00

oereb-gretljobs

Contains GRETL jobs for publishing data to OEREB-Kataster

Job types

There are two different types of jobs in this repository:

  • Jobs that allow for a review of the data before they are published to the live schema; all of these jobs are started manually only. A possible name for this kind of job might be "PLR topic jobs.
  • Jobs that import data directly into the stage and live schema at the same time; some of these jobs are even started automatically every day. These jobs could be called "base data job" or similar.

PLR topic jobs

This is the default job type. It uses the default Jenkinsfile, which first imports the data into the stage schema, then asks the user for a review of the data, and finally imports the data into the live schema. Furthermore, the GRETL Job generator script makes sure for this job type that all job runs are being kept forever ('logRotator.numToKeep':'unlimited'), and that the user can add a description for each job run ('parameters.stringParam':'buildDescription;...'). Therefore, these jobs just need the authorization.permissions property in their job.properties file.

Base data jobs

These jobs need a special Jenkinsfile. However, it's a much simpler one (e.g. oerebv2_av/Jenkinsfile). It needs to be placed directly in the job folder.

The job runs of these jobs don't need to be kept forever, and they don't need a description. In order to override the defaults, they need the following properties in their job.properties file:

logRotator.numToKeep=15
parameters.stringParam=none

The jobs that automatically must run once a day need the following additional property:

triggers.cron=H H(1-3) * * *

Running a GRETL job locally using the GRETL wrapper script

For running a GRETL job using the GRETL wrapper script, see the start-gretl.sh command example below. Set any DB connection parameter environment variables before running the command.

./start-gretl.sh --docker-image sogis/gretl:latest --docker-network [network-name] --job-directory $PWD/oerebv2_einzelschutz_archaeologie [taskName]

./start-gretl.sh --docker-image sogis/gretl:latest --docker-network host --job-directory $PWD/oerebv2_einzelschutz_archaeologie validateData

If you want to set up development databases for developing new GRETL jobs, use the following docker-compose command before running your GRETL job in order to prepare the necessary DBs.

Start two DBs ("oereb" and "edit"), import data required for the data transformation (the so called legal basis data and some more files) into the "oereb" DB, and import demo data into the "edit" DB.

XTF files that are not available in this repo (Geotope, Denkmalschutz) contain not public data and are downloaded from a private S3 bucket.

Setup development environment for the various themes: see DEVELOP.md

Set environment variables containing the DB connection parameters and names of other resources:

export ORG_GRADLE_PROJECT_dbUriEdit="jdbc:postgresql://edit-db/edit"
export ORG_GRADLE_PROJECT_dbUserEdit="gretl"
export ORG_GRADLE_PROJECT_dbPwdEdit="gretl"
export ORG_GRADLE_PROJECT_dbUriOerebV2="jdbc:postgresql://oereb-db/oereb"
export ORG_GRADLE_PROJECT_dbUserOerebV2="gretl"
export ORG_GRADLE_PROJECT_dbPwdOerebV2="gretl"
export ORG_GRADLE_PROJECT_geoservicesHostName="geo-t.so.ch"
export ORG_GRADLE_PROJECT_gretlEnvironment="dev"
export ORG_GRADLE_PROJECT_awsAccessKeyAgi="xy"
export ORG_GRADLE_PROJECT_awsSecretAccessKeyAgi="yx"
export ORG_GRADLE_PROJECT_awsAccessKeyAda="foo"
export ORG_GRADLE_PROJECT_awsSecretAccessKeyAda="bar"