NYCPlanning / db-data-library

📚 Data Library
https://nycplanning.github.io/db-data-library/library/index.html
MIT License
0 stars 1 forks source link

gdal vectortranslate sql issues #398

Closed fvankrieken closed 1 year ago

fvankrieken commented 1 year ago

So a fairly innocuous looking change was made here

https://github.com/NYCPlanning/db-data-library/commit/3803454a7edf724c7d48440297885e615193c7d1#diff-5a31bf7a3838bfb58f602bce217962045a1c1dde0f950dc28c397c7a6909ef5eR128

As far as I can tell, we only have one dataset that actually uses this functionality

https://github.com/NYCPlanning/db-pluto/actions/workflows/input_numbldgs.yml

And has been failing since this change. Testing locally, reverting to sqlite work. Looking at gdal docs the SQLDialect option in VectorTranslate might only support the native "OGR SQL" and sqlite. So it might just be falling back to ogr which might not support group by clauses? Running with ogr sql has same error as when specifying postgresql.

This is a tough one to google.

@damonmcc I think it'd be best to just revert that line to sqlite