trying to now create a flat structure that will be...
# troubleshooting
g
trying to now create a flat structure that will be a unnested version of the prvious.
Copy code
CREATE OR REPLACE TABLE hive_catalog.iot.factory_iot_north_unnested (
    ts              BIGINT,
    siteId          INTEGER, 
    deviceId        INTEGER, 
    sensorId        INTEGER, 
    unit            STRING, 
    ts_human        STRING, 
    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
) ;