https://pinot.apache.org/ logo
n

Neil Teng

05/26/2021, 7:16 PM
Hi there, anyone know what should be the schema for such time format? 2021-05-19T180823.583Z Had tried but no luck
Copy code
{
      "name": "date",
      "dataType": "STRING",
      "format": "1:SIMPLE_DATE_FORMAT:yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
      "granularity": "1:MILLISECONDS"
    },
m

Mayank

05/26/2021, 7:27 PM
@Neha Pawar ^^
n

Neha Pawar

05/26/2021, 8:01 PM
looks right. I’ve used this in the past successfully
Copy code
"format": "1:HOURS:SIMPLE_DATE_FORMAT:yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
what fails?
j

Jackie

05/26/2021, 8:04 PM
I think @Neil Teng missed the unit part
👍 1
We should remove the unit part for
SIMPLE_DATE_FORMAT
because it is ignored anyway
n

Neil Teng

05/26/2021, 8:08 PM
this is the error msg
"Cannot add invalid schema: promises. Reason: Unit: SIMPLE_DATE_FORMAT must belong to enum TimeUnit or DateTimeTransformUnit" while sending request: http://pinot-controller:9000/schemas to controller: 9c91ad50509f, version: Unkno
OK, let me try add the unit part first
added the unit solved the problem, thanks. it is a bug of my code.