| { |
| "name": "prof_batch", |
| "process.type": "batch", |
| "timestamp": 123456, |
| "data.sources": [ |
| { |
| "name": "source", |
| "connector": { |
| "type": "avro", |
| "version": "1.7", |
| "config": { |
| "file.name": "src/test/resources/users_info_src.avro" |
| } |
| } |
| } |
| ], |
| "evaluate.rule": { |
| "rules": [ |
| { |
| "dsl.type": "spark-sql", |
| "out.dataframe.name": "prof", |
| "rule": "select count(*) as `cnt`, count(distinct `post_code`) as `dis-cnt`, max(user_id) as `max` from source", |
| "out": [ |
| { |
| "type": "metric", |
| "name": "prof" |
| } |
| ] |
| }, |
| { |
| "dsl.type": "spark-sql", |
| "out.dataframe.name": "grp", |
| "rule": "select post_code as `pc`, count(*) as `cnt` from source group by post_code", |
| "out": [ |
| { |
| "type": "metric", |
| "name": "post_group", |
| "flatten": "array" |
| } |
| ] |
| } |
| ] |
| }, |
| "sinks": [ |
| "CONSOLE", |
| "ELASTICSEARCH" |
| ] |
| } |