github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/create_point.en.md (about)

     1  ### `create_point()` {#fn-create-point}
     2  
     3  Function prototype: `fn create_point(name, tags, fields, ts = 0, category = "M", after_use = "")`
     4  
     5  Function description: Create new data and output. This function does not work with central Pipeline.
     6  
     7  Function parameters:
     8  
     9  - `name`: point name, which is regarded as the name of the metric set, log source, etc.
    10  - `tags`: data tags
    11  - `fields`: data fields
    12  - `ts`: optional parameter, unix nanosecond timestamp, defaults to current time
    13  - `category`: optional parameter, data category, supports category name and name abbreviation, such as metric category can be filled with `M` or `metric`, log is `L` or `logging`
    14  - `after_use`: optional parameter, after the point is created, execute the specified pl script on the created point; if the original data type is L, the created data category is M, and the script under the L category is executed at this time
    15  
    16  Example:
    17  
    18  ```py
    19  # input
    20  '''
    21  {"a": "b"}
    22  '''
    23  fields = load_json(_)
    24  create_point("name_pt", {"a": "b"}, fields)
    25  ```