规则查询语句:
SELECT topic(1) as productKey, attribute('deviceidkey') as deviceidkey, attribute('productid') as product_id, deviceName() as deviceName, attribute('tag') as tag, attribute('coordinate') as gprs_gd, items.temper.value as temperature, items.humidity.value as humidity, items.rain.value as rain, items.PM25.value as PM25, items.noise.value as noise, items.liquidLevel.value as liquidLevel,items.wasteLevel.value as wasteLevel, items.valvePosition.value as valvePosition, items.extendParam.value as extendParam, items.voltage.value as voltage, items.voltage1.value as voltage1, items.pwrMode.value as pwrMode, items.virtualDev.value as virtualDev, items.ctrlMode.value as ctrlMode, to_base64(*) as baseContentAli, timestamp('yyyy-MM-dd HH:mm:ss') as time FROM "/a1ttYz/+/thing/event/property/post"