You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "gongning (Jira)" <ji...@apache.org> on 2022/05/01 14:59:00 UTC

[jira] [Created] (IOTDB-3056) Triggers support multi-level documents

gongning created IOTDB-3056:
-------------------------------

             Summary: Triggers support multi-level documents
                 Key: IOTDB-3056
                 URL: https://issues.apache.org/jira/browse/IOTDB-3056
             Project: Apache IoTDB
          Issue Type: New Feature
          Components: Core/Engine
            Reporter: gongning


CREATE TRIGGER <TRIGGER-NAME>
(BEFORE | AFTER) INSERT
ON <FULL-PATH>
AS <CLASSNAME>
WITH (
<KEY-1>=<VALUE-1>, 
<KEY-2>=<VALUE-2>, 
...
)

 

TRIGGER-NAME is a globally unique ID of the trigger, which is case sensitive.

At present, the trigger can listen to all data insertion operations on the time series. The hook can be called BEFORE or AFTER the data is inserted.

FULL-PATH can be a time-series (measurement) path such as root.sg1.d1.s1, a device path such as root.sg1.d1, a storage group path such as root.sg1, or even a non-measurement path with business semantic such as root.sg1.x.

CLASSNAME is the full class name of the trigger.

Note

CLASSNAME, KEY and VALUE in the attributes need to be quoted in single or double quotes.
Only one trigger can be registered per full-path.
When multiple prefix paths of a path are registered with triggers, for example, trigger trigger-sg1d1s1 is registed on root.sg1.d1, trigger trigger-sg1d1 is registed on root.sg1.d1, and trigger trigger-sg1 is registed on root.sg1. When inserting data to root.sg1.d1.s1, triggers will be triggered in the following order: trigger-sg1d1s1 -> trigger-sg1d1 -> trigger-sg1.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)