IoTDB Permissions
MRS supports users, user groups, and roles. Permissions must be assigned to roles and then roles are bound to users or user groups. Users can obtain permissions only by binding a role or joining a group that is bound with a role.
In security mode, you need to manage IoTDB permissions and add the created user to the iotdbgroup user group. In normal mode, IoTDB permission management is not required.
IoTDB Permission List
The Name column in Table 1 lists the permissions supported by open-source IoTDB. If an MRS user needs to use corresponding permissions to perform operations, grant the permissions to the user on Manager by referring to the Required Permission column in Table 1. For details, see Creating an IoTDB Role.
Name |
Description |
Required Permission |
Example |
---|---|---|---|
CREATE_DATABASE |
Used for creating a database, including setting permissions for the database and setting or canceling its time to live (TTL). |
Create databases |
Eg1: create database root.ln; Example 2: set ttl to root.ln 3600000; Example 3: unset ttl to root.ln; |
CREATE_TIMESERIES |
Used for creating a time series. |
Create |
Example 1: Creating a time series create timeseries root.ln.wf02.status with datatype=BOOLEAN,encoding=PLAIN; Example 2: Creating an aligned time series create aligned timeseries root.ln.device1(latitude FLOAT encoding=PLAIN compressor=SNAPPY, longitude FLOAT encoding=PLAIN compressor=SNAPPY); |
INSERT_TIMESERIES |
Used for inserting data. |
Write |
Example 1: insert into root.ln.wf02(timestamp,status) values(1,true); Example 2: insert into root.sg1.d1(time, s1, s2) aligned values(1, 1, 1); |
ALTER_TIMESERIES |
Used for modifying a time series, and adding attributes and tags. |
Alter |
Example 1: alter timeseries root.turbine.d1.s1 ADD TAGS tag3=v3, tag4=v4; Example 2: ALTER timeseries root.turbine.d1.s1 UPSERT ALIAS=newAlias TAGS(tag2=newV2, tag3=v3) ATTRIBUTES(attr3=v3, attr4=v4); |
READ_TIMESERIES |
Used for querying data. |
Read |
Example 1: show storage group; Example 2: show child paths root.ln, show child nodes root.ln; Example 3: show devices; Example 4: show timeseries root.**; Example 5: show all ttl; Example 6: Querying data select * from root.ln.**; Example 7: Querying performance tracing tracing select * from root.**; Example 8: Querying the UDF select example(*) from root.sg.d1; Example 9: Querying statistics count devices; |
DELETE_TIMESERIES |
Used for deleting data or time series. |
Delete |
Example 1: Deleting a time series delete timeseries root.ln.wf01.wt01.status; Example 2: Deleting data delete from root.ln.wf02.wt02.status where time < 10; |
DELETE_DATABASE |
Used for deleting databases. |
IoTDB Admin Privilege |
Eg: delete database root.ln; |
CREATE_FUNCTION |
Used for registering a UDF. |
IoTDB Admin Privilege |
Example: create function example AS 'org.apache.iotdb.udf.UDTFExample'; |
DROP_FUNCTION |
Used for dropping a UDF. |
IoTDB Admin Privilege |
Example: drop function example; |
UPDATE_TEMPLATE |
Used for creating, deleting, and modifying metadata templates. |
IoTDB Admin Privilege |
Example 1: create schema template t1(s1 int32); |
READ_TEMPLATE |
Used for viewing all metadata templates and metadata template content. |
IoTDB Admin Privilege |
Example 1: show schema templates; Example 2: show nodes in template t1; |
APPLY_TEMPLATE |
Used for attaching, detaching, and activating a metadata template. |
IoTDB Admin Privilege |
Example 1: set schema template t1 to root.sg.d; Example 2: create timeseries of schema template on root.sg.d; |
READ_TEMPLATE_APPLICATION |
Used for viewing the path for attaching or activating the metadata template. |
IoTDB Admin Privilege |
Example 1: show paths set schema template t1; Example 2: show paths using schema template t1; |
FLUSH_DATA |
Used for running the flush command to write the memory data to the disk. |
IoTDB administrator privilege |
Example: flush |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot