Leanplum S3 data export schema

Our exportData API method produces data with the following schema. 

CSV

The CSV export produces separate files for sessions, states, events, event parameters, and user attributes.

Sessions

field type description
sessionId BIGINT unique session ID for the current session
userId VARCHAR(400) user ID
userBucket INT LP-assigned user bucket
userStart TIMESTAMP start time of the current session
country VARCHAR(256) user's current country
region VARCHAR(256) user's current region
city VARCHAR(256) user's current city
start TIMESTAMP start time of session information
duration TIMESTAMP unique session ID for the current session
lat REAL latitude of current location
lon REAL longitude of current location
locale VARCHAR(256) user's locale
timezone VARCHAR(256) user's timezone
timezoneOffset DECIMAL(7,2) offset of user's timezone
appVersion VARCHAR(128) current app version
client VARCHAR(50) current client version
sdkVersion VARCHAR(128) SDK version
osName VARCHAR(512) OS name
osVersion VARCHAR(512) OS version
deviceModel VARCHAR(512) model of user's device
browserName VARCHAR(512) user's web browser
browserVersion VARCHAR(512) version of user's web browser
deviceId VARCHAR(512) device ID
priorEvents BIGINT number of prior events
priorSessions BIGINT number of prior sessions
priorTimeSpentInApp DECIMAL(12,2) total time of previous session(s)
priorStates BIGINT number of prior states
isDeveloper BOOLEAN is developer flag
isSession BOOLEAN is session flag
sourcePublisherId VARCHAR(200) attribution source publisher ID
sourcePublisher VARCHAR(200) attribution source publisher
sourceSubPublisher VARCHAR(200) attribution source sub-publisher
sourceSite VARCHAR(200) attribution source site
sourceCampaign VARCHAR(200) attribution source campaign
sourceAdGroup VARCHAR(200) attribution source ad group
sourceAd VARCHAR(200) attribution source ad

User Attributes

field type description
sessionId BIGINT the ID of the matching session
name VARCHAR(256) the name of the user attribute
value VARCHAR(512) the value of the user attribute

Experiments

field type description
experimentId BIGINT unique experiment ID for the A/B test
sessionId BIGINT the ID of the matching session
variantId BIGINT the variant ID the user is entered in within the A/B test

States

field type description
stateId BIGINT unique state ID
sessionId BIGINT the ID of the matching session
stateName VARCHAR(256) the name of the state
start TIMESTAMP the start time within the state
duration DECIMAL(10,2) time within state
info VARCHAR(1024)  
timeUntilFirstForUser DECIMAL(12,2) total time before state occurrence

Events

field type description
eventId BIGINT unique event ID
stateId BIGINT the ID of the matching state, if any
sessionId BIGINT the ID of the matching session
eventName VARCHAR(256) the name of the event
start TIMESTAMP the start time of the event
value FLOAT value of the event
info VARCHAR(1024)  
timeUntilFirstForUser DECIMAL(12,2) total time before event occurrence

Parameters

field type description
eventId VARCHAR the ID of the matching event
name VARCHAR(256) the name of the event parameter
value VARCHAR(512) the value of the parameter

Was this article helpful?
Have more questions? Submit a request