| { |
| "name": "prof_batch", |
| "process.type": "batch", |
| "data.sources": [ |
| { |
| "name": "source", |
| "connector": { |
| "type": "file", |
| "config": { |
| "format": "avro", |
| "paths": [ |
| "src/test/resources/users_info_src.avro" |
| ] |
| }, |
| "pre.proc": [ |
| "select * from this where user_id < 10014" |
| ] |
| } |
| } |
| ], |
| "measures": [ |
| { |
| "name": "query_measure1", |
| "type": "sparkSQL", |
| "data.source": "source", |
| "config": { |
| "expr": "select user_id, count(*) as cnt from source group by user_id", |
| "bad.record.definition": "cnt > 1" |
| }, |
| "out": [ |
| { |
| "type": "metric", |
| "name": "sql_metric", |
| "flatten": "map" |
| } |
| ] |
| }, |
| { |
| "name": "query_measure2", |
| "type": "sparkSQL", |
| "data.source": "source", |
| "config": { |
| "expr": "select post_code, count(*) as cnt from source group by post_code order by cnt desc", |
| "bad.record.definition": "cnt > 1" |
| }, |
| "out": [ |
| { |
| "type": "metric", |
| "name": "sql_metric", |
| "flatten": "map" |
| } |
| ] |
| } |
| ], |
| "sinks": [ |
| "CONSOLESink", |
| "customSink" |
| ] |
| } |