George Leonard
04/30/2025, 7:23 PMCREATE 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
) ;