CREATE STABLE IF NOT EXISTS product_${code} (ts TIMESTAMP, line NCHAR(32),val NCHAR(32),msg_id
NCHAR(64),reserve NCHAR(64),origin_time TIMESTAMP) TAGS (guid NCHAR(32))
CREATE TABLE IF NOT EXISTS device_${code}_${guid} using product_${code} TAGS (#{guid})
INSERT INTO device_${code}_${guid} (ts, line, val, msg_id,reserve, origin_time)
VALUES (#{ts}, #{line}, #{val}, #{msgId}, #{reserve}, #{originTime})
INSERT INTO device_${code}_${guid} (ts, line, val, msg_id, reserve, origin_time) VALUES
(#{item.ts}, #{item.line}, #{item.val}, #{item.msgId}, #{item.reserve}, #{item.originTime})
INSERT INTO original_${code}_${guid} (ts, raw_str,msg_id)
VALUES (#{ts}, #{rawStr}, #{msgId})