soda-java
soda-java copied to clipboard
Support SODA API version 2.1
I am trying to run the following query:
def soql = new SoqlQueryBuilder()
.addSelectPhrase("count(*)")
.setWhereClause(":updated_at>'${dateString}'")
.build();
soda-java currently generates the following url:
https://data.cityofnewyork.us/resource/fhrw-4uyv.json?$select=count(*)&$where=:updated_at%3E%272018-05-08T21:19:25Z%27&$$version=2.0
which returns
{"message":"Invalid SoQL query","errorCode":"query.soql.invalid","data":{}}
Seems that this particular query is not supported by API version 2.0. Changing version to 2.1 results in a successful response.
The API SODA_VERSION is set here: https://github.com/socrata/soda-java/blob/75f89c952816376c3df5b7795ef53705fc19c7bb/src/main/java/com/socrata/api/HttpLowLevel.java#L633
Are there any plans to bump SODA_VERSION to 2.1?