Hi, I have some different opinions.
> Actually, I named the hive table as deviceId. As you have implemented it, I think it is ok and is a choice to do the schema mapping. But is the schema mapping really general? I think, a storage group as a table, and the table schema as (timestamp, device_name, measurement1, measurement2, ...) is better, and is the same with what we do when integrating with Spark (and maybe the Calcite in the future). > Now, I solve it by transforming the 'root.baic2.WWS.leftfrontdoor.plc1' to 'root/baic2/WWS/leftfrontdoor/plc1' manually when creating the table and then when I get the table name from 'properties' in the code, I replace all '/' with '.' Well, it is a common issue for those languages who has escape character (EC). For example, Java uses "\" as EC, so how about the case that users want to use the original meaning of "\", rather than considering it as an EC? It is simple, "\\". Maybe we can do like this. > I think we should have some restrictions for the store group name, device name and sensor name in IoTDB. I agree with that, but some correction for the description: "we should have some restrictions for the store group name, device name and sensor name in IoTDB if users want to use the schema with Hive in the future." Best, Best, ----------------------------------- Xiangdong Huang School of Software, Tsinghua University 黄向东 清华大学 软件学院 田原 <[email protected]> 于2019年10月18日周五 下午4:30写道: > Hi, > > > While working on the hive-connector, I still had another question. > Actually, I named the hive table as deviceId. However, the deviceId saved > in tsfile metadata also contains the storage group name, i.e,. > 'root.baic2.WWS.leftfrontdoor.plc1' and > 1) hive table name can't contains '.' > 2) still the 'case insensitive' problem the deviceId may have uppercase > letters > > > Now, I solve it by transforming the 'root.baic2.WWS.leftfrontdoor.plc1' to > 'root/baic2/WWS/leftfrontdoor/plc1' manually when creating the table and > then when I get the table name from 'properties' in the code, I replace all > '/' with '.' > > > It won't work when there exits '/' in the deviceId. So, anyone have better > solutions? > > > Or, I think we should have some restrictions for the store group name, > device name and sensor name in IoTDB. What do you think?
