Campaign Prototype: How to make a system campaign enabled
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Campaign Prototype: How to make a system campaign enabled

  • Dark
    Light
  • PDF

Article summary

Article in Progress...

Prototype
The functionality described is in the prototype stage and will change - production systems should not use this functionality without provision for regular system upgrades, downtime and changes to configuration and functionality.  Any objects or data created with this prototype will be lost with future releases.

Overview

To set up a system to use the prototype campaign functionality:

  1. Create required directories:
    1. a campaign root path directory that is accessible by all realms that require access to campaign functionality  (e.g., "/data_local/campaignRootPath") 
    2. sourcepath - this is the folder containing the raw data folders to be processed
      1. targetpath - this is where the maindatafile.dat file will be stored
      2. segspath - this is where the processed segment files will be stored
    3. Set up the djclient.cnfg file to point to campaignRootPath for each realm that will access the campaign system
    4. For each project that will be campaign enabled:
      1. Create a campaign definition file in the campaignRootPath/realm directory for each project in the realm that will be campaign enabled.
      2. Create a campaign metadata file in the campaignRootPath/realm directory for each project in the realm that will be campaign enabled.

Required Directories/Locations

  • sourcepath
  • targetpath
  • segspath
  • campaignRootPath

sourcepath

targetpath

segspath

campaignRootPath

The campaign root directory contains a sub directory for each realm that has had a campaignRootPath defined in it's djclient.cnfg file.  A typical campaignRootPath would look as follows:

"/Home/DataSources/campaignRoot"

The client configuration file (djclient.cnfg) for any realm that accesses the campaign (or Eyeota) data must have the campaignRootPath entry:

"campaignRootPath": "D:/Datajet/campaignRootPath"
Automatic Directory Creation
Whenever a connection is made to a campaign enabled realm, a directory for that realm will be automatically created in the campaignRootPath.   Sub directories will be created for any loaded projects on that realm.


Campaign Project Files

Campaign Project Definition File

Campaign Definition Files are stored in the campaign root realm folder  (e.g., in d:/datajet/campaignRoot/dj-local

A definition file is required in each realm for each project that is campaign enabled, and requires the name:

project.campaign.json

So a project called "campaign_demo" on the realm "dj-dev" would have:

  • A directory created at ".../campaignRoot/dj-dev/campaign_demo"   
  • A file called called campaign_demo.campaign.json needs to be uploaded to  .../campaignRoot/dj-dev  (.../campaignRoot/dj-dev/campaign_demo.campaign.json)


Campaign Definition File Contents 

KeyValueDescription
key"tablename.fieldname"tablename.fieldname of object that stores the dynamic integer key (auto generated from hash keys as part of load process)
NOTE: This must match the key field definition used in CreateTableFromFile when loading the hash-key file.  e.g., entities.key
export{}"fields":["field1", "field2"]
"root": "rootExportPath"
fields: list of fields to include in an export
root: the root folder for all exports
NOTE: One of these fields must match the HASH field definition used in CreateTableFromFile when loading the hash-key file. e.g., entities.hash
alternatePath"path"Optional. If segments are not stored as sub-directories of campaignRootPath, indicates the location where segment files are stored.
variables[]
RESERVED for future use
subFolderstrue/falseIf true, raw segment data in stored in sub-folders (e.g., daily folders)

Sample Definition files

{
  "key": "entities.key",
  "export": {
    "fields": [ "entities.hash" ],
    "root": "D:/Datajet/campaignExports/"
  }
}


{
  "key": "DATA_EYEOTA.key",
  "subFolders": true,
  "alternatePath": "D:\\Datajet\\DataSources\\Examples\\EYEOTA\\segs\\",
  "variables": [
  ],
  "export": {
    "fields": [ "DATA_EYEOTA.hash" ],
    "root": "D:/Datajet/campaignExports/"
  }
}


Campaign Project Metadata File

{}

Client Configuration File

{TODO: Link to djclient.cnfg page}

"campaignRootPath": "home/engine/campaignRoot",

Sample djclient.cnfg

{

  "scriptStorageHub": {
    "method": "FILE",
    "path": "D:/LiveDropbox/Dropbox/DJSharedData/scripts"
  },
  "campaignRootPath": "D:/Datajet/campaignRootPath",
  "SequenceEndpoint": "https://devaccpri.datajet.app/api/0/sequence",
  "pathSubs": [
    {
      "from": "/home/",
      "to": "/mnt/shared/"
    },
    {
      "from": "------------d:/datajet/dj-localhost/Demonstration",
      "to": "k:"
    }	
  ]
}




 



Was this article helpful?