cube
cube copied to clipboard
TO_TIMESTAMP failing when only date is provided
Failed SQL Query:
SELECT
SUM("total_active_pipeline")
FROM
"pipeline_period_coverage_metrics"
WHERE
"from_month" >= CAST(TO_TIMESTAMP('2025-10-09', 'YYYY-MM-DD') AS TIMESTAMP)
Returned error:
Error during rewrite: Can't detect Cube query and it may be not supported yet. Please check logs for additional information.
Logical Plan Cube compiled query:
SELECT
SUM("total_active_pipeline") FROM "pipeline_period_coverage_metrics"
WHERE
"from_month" >= CAST(str_to_date('2025-10-09', 'YYYY-MM-DD') AS TIMESTAMP)
Cube error:
TRACE [cubesql::compile::rewrite::analysis]
Can't evaluate expression: Execution("Error evaluating str_to_date('2025-10-09', '%Y-%m-%d'): input is not enough for unique date and time")
Tool GoodData Cloud
Additional context If time is included the request works:
SELECT
SUM("total_active_pipeline")
FROM
"pipeline_period_coverage_metrics"
WHERE
"from_month" >= CAST(TO_TIMESTAMP('2025-10-09 10:30', 'YYYY-MM-DD HH24:MI') AS TIMESTAMP)