PUT /metadata/sources/dirwatch/confKeys/watch1
{
"path": "/Users/yisa/Downloads/Github/emqx/ekuiper/_build/watch",
"allowedExtension": ["txt"]
}
POST /streams
{
"sql":" CREATE stream watch () WITH (TYPE=\"dirwatch\",CONF_KEY=\"watch1\");"
}
POST /rules
{
"id": "rule1",
"sql": "SELECT * from watch",
"actions": [
{
"log": {
}
}
],
"options": {
"qos":1,
"checkpointInterval": "1s"
}
}
Create test.txt file in Dir
123
Recv Sink like below:
{"content":"MTIz","filename":"test.txt","modifyTime":1732241987}