... got the following to execute. ```CREATE OR REP...
# troubleshooting
g
... got the following to execute.
Copy code
CREATE OR REPLACE TABLE hive_catalog.iot.factory_iot_north (
    ts              BIGINT,
    metadata        ROW<
        siteId          INTEGER,
        deviceId        INTEGER,
        sensorId        INTEGER,
        unit            STRING,
        ts_human        STRING,
        location        ROW<
            latitude        DOUBLE,
            longitude       DOUBLE
        >,
        deviceType      STRING
    >,
    measurement         DOUBLE,
    event_time          AS TO_TIMESTAMP_LTZ(ts, 3),
    WATERMARK FOR event_time AS event_time - INTERVAL '5' SECOND
)
WITH (
    'connector'                     = 'kafka',
    'topic'                         = 'factory_iot_north',
    'properties.bootstrap.servers'  = 'broker:9092',
    'properties.group.id'           = 'devlab0',
    'scan.startup.mode'             = 'earliest-offset',
    'format'                        = 'json',
    'json.fail-on-missing-field'    = 'false',
    'json.ignore-parse-errors'      = 'true'
);