[root@ldp ~]# pflock luftdatenpumpe stations --network=ldi --source=postgresql://luftdatenpumpe@localhost/weatherbase --target=json.flex+stream://sys.stdout --target-fieldmap='key=station_id,name=road_and_name_and_id' | safewrite /tmp/test.json
pflock is running command: luftdatenpumpe stations --network=ldi --source=postgresql://luftdatenpumpe@localhost/weatherbase --target=json.flex+stream://sys.stdout --target-fieldmap=key=station_id,name=road_and_name_and_id
2019-09-05 16:32:52,520 [luftdatenpumpe.commands ] INFO : Acquiring list of stations from network "ldi" with source "postgresql://luftdatenpumpe@localhost/weatherbase"
2019-09-05 16:32:52,700 [luftdatenpumpe.target.rdbms ] INFO : PostGIS version: POSTGIS="2.5.2 r17328" [EXTENSION] PGSQL="110" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 1.11.4, released 2016/01/25" LIBXML="2.9.1" LIBJSON="0.11" RASTER
2019-09-05 16:32:52,988 [luftdatenpumpe.commands ] INFO : Acquired #2195 stations
2019-09-05 16:32:52,989 [luftdatenpumpe.commands ] INFO : Will publish data to ['json.flex+stream://sys.stdout']
2019-09-05 16:32:52,989 [luftdatenpumpe.engine ] INFO : Configuring data sink "json.flex+stream://sys.stdout" with domain "stations"
2019-09-05 16:32:52,989 [luftdatenpumpe.engine ] INFO : Emitting to target data sinks, this might take some time
Traceback (most recent call last):
File "/opt/luftdatenpumpe/bin/luftdatenpumpe", line 10, in <module>
sys.exit(run())
File "/opt/luftdatenpumpe/lib/python3.6/site-packages/luftdatenpumpe/commands.py", line 161, in run
run_engine(options)
File "/opt/luftdatenpumpe/lib/python3.6/site-packages/luftdatenpumpe/commands.py", line 302, in run_engine
engine.process(data)
File "/opt/luftdatenpumpe/lib/python3.6/site-packages/luftdatenpumpe/engine.py", line 79, in process
target.flush(final=True)
File "/opt/luftdatenpumpe/lib/python3.6/site-packages/luftdatenpumpe/target/stream.py", line 19, in flush
self.handle.write(self.formatter(self.buffer))
File "/opt/luftdatenpumpe/lib/python3.6/site-packages/luftdatenpumpe/target/json.py", line 44, in formatter
value = station[str(key_right)]
KeyError: 'road_and_name_and_id'
Writing to /tmp/test.json failed