Neer Shay
02/08/2021, 9:57 AM"dateTimeFieldSpecs": [
{
"name": "ts",
"dataType": "STRING",
"format": "1:SECONDS:SIMPLE_DATE_FORMAT:\"yyyy-MM-dd HH:mm:ss\"",
"granularity": "1:MINUTES"
}
]
In Superset, I must define the string format in the Python way for it to parse correctly:
%Y-%m-%d %H:%M:%S
When I try creating a chart, I get this error:
Apache Pinot Error
unsupported format character 'Y' (0x59) at index 58
This may be triggered by:
Issue 1002 - The database returned an unexpected error.
Because the query gets translated to this (note that if I remove the "DATETIMECONVERT" and simply use "ts" column it works fine):
SELECT DATETIMECONVERT(ts, '1:SECONDS:SIMPLE_DATE_FORMAT:%Y-%m-%d %H:%M:%S', '1:SECONDS:SIMPLE_DATE_FORMAT:%Y-%m-%d %H:%M:%S', '1:DAYS'),
AVG(metric) AS "AVG_1"
FROM schema.table
WHERE ts >= '2021-02-01 00:00:00'
AND ts < '2021-02-08 00:00:00'
GROUP BY DATETIMECONVERT(ts, '1:SECONDS:SIMPLE_DATE_FORMAT:%Y-%m-%d %H:%M:%S', '1:SECONDS:SIMPLE_DATE_FORMAT:%Y-%m-%d %H:%M:%S', '1:DAYS')
LIMIT 50000;
Has anyone encountered something similar? What is the solution?Xiang Fu
yyyy-MM-dd HH:mm:ss
not %Y-%m-%d %H:%M:%S
Xiang Fu
Neer Shay
02/08/2021, 10:55 AMSELECT ts,
AVG(metric) AS "AVG_1"
FROM schema.table
WHERE ts >= '2021-02-01 00:00:00'
AND ts < '2021-02-08 00:00:00'
GROUP BY ts
LIMIT 50000;
3. See filter in the queryXiang Fu
Xiang Fu
Neer Shay
02/08/2021, 5:02 PMNeer Shay
02/08/2021, 5:07 PMXiang Fu
Xiang Fu
Neer Shay
02/09/2021, 8:12 AMXiang Fu