AnalyseSegments
  • 2 Minutes to read
  • Dark
    Light
  • PDF

AnalyseSegments

  • Dark
    Light
  • PDF

Article summary

Creates a spreadsheet of intersection counts for a base filter and set of target filters for segmentation data

KeyValue(s)Description
method"AnalyseSegments"Creates a spreadsheet of intersection counts for a base filter and set of target filters for segmentation data
workbook"WorkBookName.xlsx"Required.  Output file.  Must be xlsx.
targetDataSets [][
{Dataset1Definition},
{Dataset2Definition},
{Dataset3Definition} 
]
Optional.  Target datasets to use when calculating overlaps.
Target datasets can be added either by dragging and dropping a dataset collection onto the JSON window, or by dragging and dropping a dataset.

NOTE: All target datasets must be on the primary contact table.  (The Primary Contact Table is a DataJet table containing at minimum Hash-Keys and their matching Integer-Keys.  It is created by loading the Master Hash-Key File generated by ProcessSegments.  See Campaign Prototype: How to make a system campaign enabled for further details).
To use data from other tables, first copy the required fields to the primary contact table using either CopyUp or CopyDown.

A maximum of 16 target datasets can be processed in each call to Analyse Segments
DataSet {}

{DataseDefinition}

Optional.  Base Dataset.  
If provided, filters all segments to include only records in the primary contact table that are also in the base dataset.

NOTE: The base dataset must be on the primary contact table.
segments [][NNNN, NNNN, NNNN]Optional.  If not present, all segments in the system will be analysed (i.e., all segments listed in the Audiences or Campaigns interface)
Provide a list of segments IDs to include in the analysis:
[
10001,
10002,
10003
]

NOTE: A list of segment IDs can be obtained from the Campaign | Audiences report.   Filter the grid to show the required segments, and then use the Copy/Paste functionality to transfer segment IDs into the AnalyseSegments API.
project"ProjectName"
description"Description"
lowerLimitNOptional.  Integer.  Default = 0.
If non-zero, segments with rows fewer than N in the base dataset will not be included in the Analysis output.
threadsNOptional
0,2,4,6,8

Sample Output:

JSON right-click

  • Remove DataSet: deletes base dataset
  • Manage DataSets: Displays Dataset Collection Builder for target datasets


AnalyseSegments will take approx. 30 mins to run on 1800 segments against 1 billion primary contacts.   (This is against approx 230 billion foreign records).   Against an individual segment runtime will be under 10 seconds.



Blank method

{
  "method": "AnalyseSegments",
  "workbook": "",
  "DataSet": {},
  "segments": [],
  "targetDataSets": {},
  "description": "latest API",
  "project": "eyeota-audience"
  "lowerLimit": 0
}

Sample Method

{
  "method": "AnalyseSegments",
  "workbook": "%DATAPATH%REGRESS_AnalyseSegments_small.xlsx",
  "lowerLimit": 0,
  "segments": [
    10117
  ],
  "dataSet": {
    "logic": "or",
    "name": "Cadillac_1",
    "strict": true,
    "set": [
      {
        "logic": "and",
        "stype": "FIELD",
        "entity": {
          "type": "field",
          "name": "DATA_EYE_FULL.Cadillac",
          "table": "DATA_EYE_FULL",
          "valueFilter": []
        },
        "op": "=",
        "values": [
          "1"
        ]
      }
    ]
  },
  "targetDataSets": [
    {
      "logic": "or",
      "name": "New Homeowners",
      "strict": true,
      "set": [
        {
          "logic": "or",
          "stype": "FIELD",
          "entity": {
            "type": "field",
            "name": "DATA_EYE_FULL.Demo - Life Events - New Homeowners",
            "table": "DATA_EYE_FULL",
            "valueFilter": []
          },
          "op": "=",
          "values": [
            "1"
          ]
        }
      ],
      "NodeType": "DataSet"
    },
    {
      "logic": "or",
      "name": "New Parents",
      "strict": true,
      "set": [
        {
          "logic": "or",
          "stype": "FIELD",
          "entity": {
            "type": "field",
            "name": "DATA_EYE_FULL.Demo - Life Events - New Parents",
            "table": "DATA_EYE_FULL",
            "valueFilter": []
          },
          "op": "=",
          "values": [
            "1"
          ]
        }
      ],
      "NodeType": "DataSet"
    },
    {
      "logic": "or",
      "name": "Newly Single",
      "strict": true,
      "set": [
        {
          "logic": "or",
          "stype": "FIELD",
          "entity": {
            "type": "field",
            "name": "DATA_EYE_FULL.Demo - Life Events - Newly Single",
            "table": "DATA_EYE_FULL",
            "valueFilter": []
          },
          "op": "=",
          "values": [
            "1"
          ]
        }
      ],
      "NodeType": "DataSet"
    },
    {
      "logic": "or",
      "name": "Expectant Parents (non-US)",
      "strict": true,
      "set": [
        {
          "logic": "or",
          "stype": "FIELD",
          "entity": {
            "type": "field",
            "name": "DATA_EYE_FULL.Demo - Life Events - Expectant Parents (non-US)",
            "table": "DATA_EYE_FULL",
            "valueFilter": []
          },
          "op": "=",
          "values": [
            "1"
          ]
        }
      ],
      "NodeType": "DataSet"
    }
  ],
  "description": "One Segment - 10117",
  "project": "eyeota-pivot"
}





Was this article helpful?

What's Next