Combined dataset of email sends/clicks/opens from Tessitura / WordFly and data from p2_stream. Features included are:
group_customer_no, customer_no
timestamp : date of email event
event_type : "Email"
event_subtype : "Open", "Click", "Unsubscribe', "Hard Bounce", "Forward", etc.
campaign_no, appeal_no, source_no
extraction_desc, source_desc
eaddress : email address
domain : domain of email (everything after the
@
)email_[subtype]_count
email_[subtype]_timestamp_min
email_[subtype]_timestamp_max
Usage
email_data(..., from_date = as.POSIXct("1900-01-01"), to_date = now())
email_data_append(email_stream, ...)
email_fix_timestamp(email_stream)
email_fix_eaddress(email_stream)
email_subtype_features(email_stream)
email_stream_base(from_date = as.POSIXct("1900-01-01"), to_date = now(), ...)
email_stream_chunk(from_date = as.POSIXct("1900-01-01"), to_date = now(), ...)
email_stream_write_partition(email_stream, table_name = "email_stream_full")
email_stream(from_date = as.POSIXct("1900-01-01"), to_date = now(), ...)
Arguments
- ...
Arguments passed on to
tessilake::read_sql
,tessilake::read_sql
freshness
the returned data will be at least this fresh
- from_date
earliest date/time for which data will be returned
- to_date
latest date/time for which data will be returned
- email_stream
email data from previous step
- table_name
character(1)
name of the cache to write out
Functions
email_data()
: load Tessitura email send/response dataemail_data_append()
: adds descriptive campaign/appeal/source information from Tessituraemail_fix_timestamp()
: recalculates timestamps for sends becausepromote_dt
is often long before the actual email send date.email_fix_eaddress()
: fills in email address based on time of send and the current email address for the customer, using email data from stream_from_auditemail_subtype_features()
: sets multipleevent_subtype == "open"
as"forward"
and builds windowed features for eachevent_subtype
email_stream_base()
: produce one chunk of the base email_stream (without p2_stream or subtype features)email_stream_chunk()
: produce one chunk of email_stream betweenfrom_date
andto_date
email_stream_write_partition()
: write one partition of the stream to diskemail_stream()
: appends p2 data and outputs to cache