CREATE STABLE IF NOT EXISTS device_log ( ts TIMESTAMP, id NCHAR(50), product_key NCHAR(50), device_name NCHAR(50), type NCHAR(50), identifier NCHAR(255), content NCHAR(1024), report_time TIMESTAMP ) TAGS ( device_key NCHAR(50) ) INSERT INTO device_log_${deviceKey} (ts, id, product_key, device_name, type, identifier, content, report_time) USING device_log TAGS ('${deviceKey}') VALUES ( NOW, #{id}, #{productKey}, #{deviceName}, #{type}, #{identifier}, #{content}, #{reportTime} )