- 2 Minutes to read
- Print
- DarkLight
- PDF
Campaign Prototype: How to make a system campaign enabled
- 2 Minutes to read
- Print
- DarkLight
- PDF
Article in Progress...
Overview
To set up a system to use the prototype campaign functionality:
- Create required directories:
- a campaign root path directory that is accessible by all realms that require access to campaign functionality (e.g., "/data_local/campaignRootPath")
- sourcepath - this is the folder containing the raw data folders to be processed
- targetpath - this is where the maindatafile.dat file will be stored
- segspath - this is where the processed segment files will be stored
- Set up the djclient.cnfg file to point to campaignRootPath for each realm that will access the campaign system
- For each project that will be campaign enabled:
- Create a campaign definition file in the campaignRootPath/realm directory for each project in the realm that will be campaign enabled.
- 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"
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
Key | Value | Description |
---|---|---|
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 | |
subFolders | true/false | If 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:"
}
]
}