| { |
| "head":{ |
| "type":"apache_drill_logical_plan", |
| "version":"1", |
| "generator":{ |
| "type":"manual", |
| "info":"na" |
| } |
| }, |
| "storage":[ |
| { |
| "type":"text", |
| "file": "local://logs/*.log", |
| "compress":"gzip", |
| "line-delimiter":"\n", |
| "record-maker":{ |
| "type":"first-row", |
| "delimiter":"," |
| }, |
| "enabled": true |
| }, |
| { |
| "type":"mongo", |
| "name":"users", |
| "connection":"mongodb://blue:red@localhost/users", |
| "enabled": true |
| }, |
| { |
| "type":"mysql", |
| "name":"mysql", |
| "connection":"jdbc:mysql://localhost/main", |
| "enabled": true |
| } |
| ], |
| "query":[ |
| { |
| "@id": 1 , |
| "op":"scan", |
| "memo":"initial_scan", |
| "storageengine":"local-logs", |
| "selection": {} |
| }, |
| { |
| "@id": 2 , |
| "input": 1 , |
| "memo":"transform1", |
| "op":"transform", |
| "transforms":[ |
| { |
| "ref":"userId", |
| "expr":"regex_like('activity.cookie', \"persistent=([^;]*)\")" |
| }, |
| { |
| "ref":"session", |
| "expr":"regex_like('activity.cookie', \"session=([^;]*)\")" |
| } |
| ] |
| }, |
| { |
| "@id": 3 , |
| "input": 2 , |
| "memo":"transform2", |
| "op":"transform", |
| "transforms":[ |
| { |
| "ref":"userId", |
| "expr":"regex_like('activity.cookie', \"persistent=([^;]*)\")" |
| }, |
| { |
| "ref":"session", |
| "expr":"regex_like('activity.cookie', \"session=([^;]*)\")" |
| } |
| ] |
| }, |
| { |
| "@id": 7 , |
| "input": 3 , |
| "op":"sequence", |
| "do":[ |
| { |
| "op":"transform", |
| "memo":"seq_transform", |
| "transforms":[ |
| { |
| "ref":"happy", |
| "expr":"regex_like('ep2', \"dink\")" |
| } |
| ] |
| } |
| , |
| { |
| "op":"transform", |
| "memo":"last_transform", |
| "transforms":[ |
| { |
| "ref":"abc", |
| "expr":"123" |
| } |
| ] |
| } |
| ] |
| }, |
| { |
| "@id": 10, |
| "input": 3, |
| "op":"transform", |
| "memo":"t3", |
| "transforms":[ |
| { |
| "ref":"happy", |
| "expr":"regex_like('ep2', \"dink\")" |
| } |
| ] |
| }, |
| { |
| "@id":12, |
| "op":"join", |
| "type": "inner", |
| "left":"7", |
| "right":"10", |
| "conditions": [{"relationship":"==", "left": "1", "right": "1" }] |
| } |
| , |
| { |
| "input": 12, |
| "op": "store", |
| "memo": "output sink", |
| "target": { |
| "file": "console:///stdout" |
| } |
| } |
| ] |
| } |