Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-163

Support create device template and create device.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      In the present version, it is a little trouble some to create a set timeseries that has the same measurements. On the other hand, although we use the conception "device" in the code, it is not properly abstracted.

      Expected usage:

      Using IoTDB in a more relational way:

      CREATE DEVICE TEMPLATE vehicle (speed DOUBLE PLAIN, direction DOUBLE PLAIN, temperature DOUBLE PLAIN, fuel DOUBLE PLAIN)

      If all datatypes(or encodings) are the same, you can write the equal form:

      CREATE DEVICE TEMPLATE vehicle MEASUREMENTS (speed, direction, temperature, fuel) DATATYPE DOUBLE ENCODING PLAIN

      Then you will be able to create time series in an easier way:

      CREATE DEVICE (vehicle) root.sg1.vehicle1

      Which equals:

      CREATE TIMESERIES root.sg1.vehicle1.speed WITH DATATYPE=DOUBLE,ENCODING=PLAIN

      CREATE TIMESERIES root.sg1.vehicle1.direction WITH DATATYPE=DOUBLE,ENCODING=PLAIN

      CREATE TIMESERIES root.sg1.vehicle1.fuel WITH DATATYPE=DOUBLE,ENCODING=PLAIN

      CREATE TIMESERIES root.sg1.vehicle1.temperature WITH DATATYPE=DOUBLE,ENCODING=PLAIN

      I ** hope this will narrow the gap of using IoTDB and traditional relation databases.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jt2594838 Tian Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m