Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Query
- {
- "from": 0,
- "size": 15,
- "sort": {},
- "type": "leftJoin",
- "by": [
- {
- "events": "brand"
- },
- {
- "events": "currency"
- }
- ],
- "queries": [
- {
- "aggregations": [
- {
- "dimension": {
- "alias": "brand",
- "field": "attributes.brand.string"
- },
- "aggregation": {
- "type": "category"
- }
- },
- {
- "dimension": {
- "alias": "currency",
- "field": "attributes.currency.string"
- },
- "aggregation": {
- "type": "category"
- }
- },
- {
- "alias": "fc",
- "dimension": {
- "cubeId": "financial_transactions",
- "field": "type"
- },
- "aggregation": {
- "type": "category"
- }
- }
- ],
- "measures": [
- {
- "type": "children",
- "agg_id": "fc",
- "operation": "count",
- "dimension": {
- "cubeId": "financial_transactions",
- "field": "amount.amount"
- }
- }
- ],
- "filters": [
- {
- "operation": "in",
- "dimension": {
- "cubeId": "events",
- "field": "attributes.brand.string"
- },
- "value": [
- "brand1",
- "brand2",
- "ASIANTRIALUSD"
- ]
- }
- ],
- "flatResults": true,
- "type": "sliceAndDice",
- "cube": "events"
- }
- ]
- }
- // Response
- {
- "series": [
- {
- "brand": "brand2",
- "currency": "USD",
- "fc.DEPOSIT": 96,
- "fc.WITHDRAW_DIRECT": 96
- },
- {
- "brand": "brand1",
- "currency": "USD",
- "fc.DEPOSIT": 48,
- "fc.WITHDRAW_DIRECT": 48
- }
- ],
- "meta": {
- "total": 2,
- "from": 0,
- "size": 2
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement