Closed MarkusZehner closed 7 months ago
Thanks @MarkusZehner! This doesn't seem to work with PostgreSQL yet, no idea when I'll get to it.
This is a very strange error, or am i missing something:
FAILED tests/test_drivers.py::test_archive_postgres - RuntimeError: ERROR: column data.cyclenumber does not exist
LINE 1: ...r SELECT data.acquisition_mode as acq_mode, bbox, data.cycle...
^
HINT: Perhaps you meant to reference the column "data.cycleNumber".
The dict that handles the shorter names has no entry for all-lowercase 'cyclenumber', however the check does append a 'data.' in front, which should only be done for the column names present in the dict. The names for the columns are drawn from the get_colnames, so they should exist in the data table.
Fixed!
Awesome! Thanks a lot @MarkusZehner. I quickly did a little change myself. Should be ready to go now. I'll merge it once the tests are finished.
Added a dict with shorter names in export2shp, using SQL to rename columns and switched to gdal.VectorTranslate for export. Postgres did not work locally, needs testing