Trying to run a fairly simply query, borrowing fro...
# troubleshooting
n
Trying to run a fairly simply query, borrowing from the docs, and anytime I try to do any sort of grouping on the date field I get an error. Grouping for others works. Thanks in advance!
Copy code
SELECT COUNT(*)
FROM mytable
GROUP BY DATETIMECONVERT(item_date, '1:DAYS:SIMPLE_DATE_FORMAT:yyyy-MM-dd', '1:WEEKS:EPOCH', '1:WEEKS')
error
Copy code
"errorCode": 200,
    "message": "QueryExecutionError:\norg.apache.pinot.core.query.exception.BadQueryRequestException: Caught exception while initializing transform function: datetimeconvert\n\tat org.apache.pinot.core.operator.transform.function.TransformFunctionFactory.get(TransformFunctionFactory.java:207)\n\tat
table date config
Copy code
"dateTimeFieldSpecs": [
    {
      "name": "item_date",
      "dataType": "STRING",
      "format": "1:DAYS:SIMPLE_DATE_FORMAT:yyyy-MM-dd",
      "granularity": "1:DAYS"
    }
  ]
x
Copy code
DATETIMECONVERT
doesn’t support week,
use dateTrunc
n
That’s got a week example? will make a note to update that
x
I think it’s wrong 😞
n
thanks for the quick response!
x
I will fix the doc
n
I can do that, going to go through and do a couple of things
x
sure
thanks!
n
np thanks for your help