CREATE VIEW default.test
AS
WITH
toDateTime({from:String}, 'Asia/Seoul') AS FROM,
date_add(FROM, INTERVAL 1 MINUTE) AS TO,
{target_id:String} AS TARGET_ID
SELECT FROM, TO, TARGET_ID
Debug
Result
CREATE VIEW default.test
AS
WITH
toDateTime({from:String}, 'Asia/Seoul') AS FROM,
date_add(FROM, INTERVAL 1 MINUTE) AS TO,
{target_id:String} AS TARGET_ID
SELECT FROM, TO, TARGET_ID
;
SELECT *
FROM system.query_log
WHERE
event_date = '2024-09-10'
AND event_time >= toDateTime('2024-09-10 16:14:00', 'Asia/Seoul')
AND user = 'admin'
;
Description
Occasionally, when creating a parameterized view, the query does not get parsed correctly.
Create Parameterized View Statement
Debug
Result