0

I am trying to create a VIEW on table

CREATE TEMPORARY VIEW `transform_3` AS
SELECT
    `first_name`            AS `first_name`,
    `id`                    AS `id`,
    `event_time`            AS `event_time`,
    3                       AS `ruleId`,
    JSON_OBJECT(
        KEY 'ruleId' VALUE 3,
        KEY 'ruleState' VALUE 'ACTIVE',
        KEY 'groupingKeyNames' VALUE JSON_ARRAY('beneficiaryId'),
        KEY 'unique' VALUE CAST(NULL AS STRING) NULL ON NULL, 
        KEY 'aggregateFieldName' VALUE 'paymentAmount'
    ) AS `violatedRule`
FROM `mdtest`;

I get a parser error when i add the last element 'aggregateFieldName'

[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.sql.parser.impl.ParseException: Encountered "," at line 8, column 179.
Was expecting: 
    ")" ...

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.