Describe the bug
During the renew cycle, Cube can fail when a SQL API-generated query contains a TIMESTAMP WITH TIME ZONE literal using an IANA timezone name such as America/Los_Angeles. The query is pushed down with the raw timestamp string, and Snowflake rejects it:
Error during renew cycle
Timestamp '2026-06-14T00:00:00 America/Los_Angeles' is not recognized
To Reproduce
Steps to reproduce the behavior:
- Connect to Cube through the SQL API.
- Run a query with a pushed-down timestamp filter using an IANA timezone name, for example:
SELECT
customer_gender
FROM KibanaSampleDataEcommerce
WHERE
order_date >= TIMESTAMP WITH TIME ZONE '2026-06-14T00:00:00 America/Los_Angeles'
AND LOWER(customer_gender) = 'male'
GROUP BY 1;
- Use a Snowflake-backed Cube deployment.
- See an error similar to:
Error: Timestamp '2026-06-14T00:00:00 America/Los_Angeles' is not recognized
Expected behavior
Cube SQL should generate a valid timestamp-with-time-zone literal or equivalent downstream SQL. For example, the named timezone should be normalized to a numeric offset:
timestamptz '2026-06-14T00:00:00.000-07:00'
rather than passing the raw America/Los_Angeles string into a timestamp cast.
Screenshots
N/A
Minimally reproducible Cube Schema
cube(`Orders`, {
sql: `
select 1 as id, '2026-06-14 00:00:00' as created_at, 'male' as gender
UNION ALL
select 2 as id, '2026-06-15 00:00:00' as created_at, 'female' as gender
`,
measures: {
count: {
type: `count`,
},
},
dimensions: {
createdAt: {
sql: `created_at`,
type: `time`,
},
gender: {
sql: `gender`,
type: `string`,
},
},
});
Version:
1.6.57
Additional context
This appears in the SQL API path when the planner cannot fold the timestamp string into a timestamp literal. The wrapper then emits CAST($1 AS TIMESTAMP) and keeps the named timezone string as the parameter value, which Snowflake does not accept.
Describe the bug
During the renew cycle, Cube can fail when a SQL API-generated query contains a
TIMESTAMP WITH TIME ZONEliteral using an IANA timezone name such asAmerica/Los_Angeles. The query is pushed down with the raw timestamp string, and Snowflake rejects it:To Reproduce
Steps to reproduce the behavior:
Expected behavior
Cube SQL should generate a valid timestamp-with-time-zone literal or equivalent downstream SQL. For example, the named timezone should be normalized to a numeric offset:
rather than passing the raw
America/Los_Angelesstring into a timestamp cast.Screenshots
N/A
Minimally reproducible Cube Schema
Version:
1.6.57
Additional context
This appears in the SQL API path when the planner cannot fold the timestamp string into a timestamp literal. The wrapper then emits
CAST($1 AS TIMESTAMP)and keeps the named timezone string as the parameter value, which Snowflake does not accept.