BuildReport

Prev Next

Builds a dashboard from repeated calculations of a base report, changing dimension each time.

KeyValue(s)Description
method"BuildReport"
type"ReportType"Required.  Supported report types:
  • IndexDashboard - creates a dashboard of repeated Index Profile reports
name"ReportName"Required.  Report Name
fields[][
"table1.field1"
"table2.field2"
"..."
]
Provide one of either fields[] or template
template"TemplateName"Provide one of either fields[] or template
colsColumnCountThe number of columns to add to the dashboard.
Supported for:
  • IndexDashboard 
    • 2 - 2 column dashboard
    • 3 - 3 column dashboard
state{}"state":{
"displayMode":displayType
}
Optional.  Display options to be applied to each report.
  • displayMode:
    • 0 - Grid Only
    • 1 - Chart Only
    • 2 - Chart and grid (default)
  • heatMapState
    • 0 - Heatmap off
    • 1 - Heatmap on
baseSet{}datasetObject
Base Filter
See Dataset for more details
dataSet{}datasetObjectTarget Filter
See Dataset for more details
api{}
API properties are specific to the report type:
  • IndexDashboard
    • sortMode
      • 0 - No sort (default)
      • 1 - Ascending Label
      • 2 - Descending Label
      • 3 - Ascending Value (sortColumn)
      • 4 - Descending Value (sortColumn)
    • sortColumn
      • 0 - Base
      • 1 - Target
      • 2 - Index
      • -1 - No Sort (default)
    • includeIndexTargetRows
secondaryProcess{}secondaryProcess objectOptional
NOTE: secondaryProcess{} must be INSIDE the api{} object
versionversionNoOptional.  If omitted, default is 2
Used to control the slot-height of the generated dashboard.
  • 18 - slot height matches that of an 18x8 dashboard
  • 4 - slot height matches that of a 4x6 dashboard
  • 5 - slot height matches that of a 3-column profiling dashboard
  • 3 - slot height matches that of a 4x4 dashboard
  • 2 - slot height matches that for a 2x2 dashboard


{
  "method": "BuildReport",
  "type": "IndexDashboard",
  "name": "built index dashboard - list",
  "fields": [
    "10pctclienttrans.CARD_BRAND",
    "10pctclienttrans.CARD_PRESENT_INDICATOR",
    "10pctclienttrans.CARD_TYPE",
    "10pctclienttrans.CATEGORY_LEVEL_1",
    "10pctclienttrans.CATEGORY_LEVEL_2",
    "10pctclienttrans.CATEGORY_LEVEL_3"
  ],
  "cols": 2,
  "state": {
    "displayMode": 0
  },
  "api": {
    "sortMode": 0,
    "includeEmptyIndexTargetRows": false
  },
  "project": "Aggregator",
  "dataSet": {
    "logic": "or",
    "name": "MERCHANT_STATE_CA",
    "strict": true,
    "set": [
      {
        "logic": "and",
        "stype": "FIELD",
        "entity": {
          "type": "field",
          "name": "10pctclienttrans.MERCHANT_STATE",
          "table": "10pctclienttrans",
          "valueFilter": []
        },
        "op": "=",
        "values": [
          "CA"
        ]
      }
    ]
  }
}


Sample Report Templates:

IndexDashboard

The following will create a dashboard of index profiles for every field in the supplied template.  All defaults are used.

{
  "method": "BuildReport",
  "type": "IndexDashboard",
  "name": "Sample BuildReport",
  "template": "client_small",
  "cols": 3,  
  "project": "WORKFLOW_AudienceCreation"
}

The following uses the fields[] option and alters some default display and API settings:

{
  "method": "BuildReport",
  "type": "IndexDashboard",
  "name": "Sample BuildReport 2",
  "fields": [
    "Client_XXX.a_gender_code",
    "Client_XXX.a_networth_gold",
    "Client_XXX.a_grandchildren"
  ],
  "cols": 3,
  "state": {
    "displayMode": 0
  },
  "api": {
    "sortMode": 4,
    "sortColumn": 2,
    "heatMapState": 1,
    "includeEmptyIndexTargetRows": false
  },
  "project": "WORKFLOW_AudienceCreation"
}

The following builds a dashboard of index profiles with a custom threshold model applied:

{
  "method": "BuildReport",
  "type": "IndexDashboard",
  "name": "Recent Purchasers - With Threshold (Auto)",
  "template": "client_profile_standard",
  "cols": 3,
  "state": {
    "displayMode": 0
  },
  "api": {
    "sortMode": 4,
    "sortColumn": 2,
    "heatMapState": 1,
    "includeEmptyIndexTargetRows": false,
    "secondaryProcess": {
      "name": "IndexThresholdProcessor",
      "parameters": [
        {
          "name": "TopN",
          "value": "5",
          "description": "Number of rows to keep from sorted index list.\r\nDefault = 4\r\ne.g., If N = 4 (the default) the rows with the top 4 values will be kept.   (Note - data sorted by column specfied in SortMode)"
        },
        {
          "name": "SortMode",
          "value": "",
          "description": "Can be Base, Target or Index.  Default = Index"
        },
        {
          "name": "Mode",
          "value": "",
          "description": "Specifies which thresholds (if any) to apply\r\nB = Base\r\nT = Target\r\nI = Index\r\nALL = Base, target and Index\r\nAny combination of BTI is allowed.\r\nDefault = BTI"
        },
        {
          "name": "IndexMin",
          "value": "",
          "description": "Optional. Minimum Index threshold if filtering index values (see Mode for details).\r\nDefault = -1 (no threshold)"
        },
        {
          "name": "IndexMax",
          "value": "",
          "description": "Optional. Maximum Index threshold if filtering index values (see Mode for details).\r\nDefault = -1 (no threshold)"
        },
        {
          "name": "BaseMin",
          "value": "1000",
          "description": "Optional. Minimum Base threshold if filtering Base values (see Mode for details).\r\nDefault = -1 (no threshold)"
        },
        {
          "name": "BaseMax",
          "value": "",
          "description": "Optional. Maximum Index threshold if filtering Base values (see Mode for details).\r\nDefault = -1 (no threshold)"
        },
        {
          "name": "TargetMin",
          "value": "300",
          "description": "Optional. Minimum Target threshold if filtering target values (see Mode for details).\r\nDefault = -1 (no threshold)"
        },
        {
          "name": "TargetMax",
          "value": "",
          "description": "Optional. Minimum Target threshold if filtering target values (see Mode for details).\r\nDefault = -1 (no threshold)"
        }
      ]
    }
  },
  "dataSet": {
    "logic": "or",
    "name": "RFM-Decode ALL_Promising",
    "strict": true,
    "set": [
      {
        "logic": "and",
        "stype": "FIELD",
        "entity": {
          "type": "field",
          "name": "Client_XXX.RFM-Decode ALL",
          "table": "Client_XXX",
          "valueFilter": []
        },
        "op": "=",
        "values": [
          "Promising"
        ]
      }
    ]
  },
  "baseSet": {
    "logic": "or",
    "name": "Index Profile Base Filter_1",
    "strict": true,
    "set": [
      {
        "logic": "and",
        "stype": "FIELD",
        "entity": {
          "type": "field",
          "name": "Client_XXX.Index Profile Base Filter",
          "table": "Client_XXX",
          "valueFilter": []
        },
        "op": "=",
        "values": [
          "1"
        ]
      }
    ]
  },
  "project": "WORKFLOW_AudienceCreation"
}