Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 780 Bytes

usage.md

File metadata and controls

57 lines (43 loc) · 780 Bytes

Getting Started

Create Conf for dirwatch Source

PUT /metadata/sources/dirwatch/confKeys/watch1

{
    "path": "/Users/yisa/Downloads/Github/emqx/ekuiper/_build/watch",
    "allowedExtension": ["txt"]
}

Create Stream for dirwatch Source

POST /streams

{
    "sql":" CREATE stream watch () WITH (TYPE=\"dirwatch\",CONF_KEY=\"watch1\");"
}

Create Rule for dirwatch Source

POST /rules

{
  "id": "rule1",
  "sql": "SELECT * from watch",
  "actions": [
    {
      "log": {
      }
    }
  ],
  "options": {
    "qos":1,
    "checkpointInterval": "1s"
  }
}

Create File in dir

Create test.txt file in Dir

123

Recv Sink like below:

{"content":"MTIz","filename":"test.txt","modifyTime":1732241987}