The FocalPointQuery class is used to generate SQL queries for Causata. The data in a focal point query is built around a particular event in a customer profile.
1 2 3
The event to be used as a focal point.
This controls which records are returned when there are multiple events in a profile. The default settings will return one or more records for a profile. See the Details section below.
If supplied, the focal point will be at the time given on this event attribute of the given event.
The FocalPointQuery object builds a focal point query for profile records. A blank FocalPointQuery translates to the following:
"SELECT * FROM Scenarios variable, `focalpoint.event` WHERE variable.focal_point = `focalpoint.event`.timestamp"
This focal point query can be made more specific by adding variables with
adding where clauses with
Where or setting a row limit with
The SQL query can be generated with as.character, e.g.
When a customer event stream is loaded, there may be multple events that match the focal point event and where clauses. In this case one or more profile records (rows) may be returned for a single customer. The cardinality argument defines how which records are output.
When there is no event.attribute specified, the legal values for this argument and their meanings are:
"using.all.events" For each occurance of the focal point event (that match the where clauses)
there will be a customer record with the timestamp of that event as the focal point.
"using.oldest.event" When multiple events match the focal point query, the event with the
smallest (oldest) timestamp is used to build the customer record.
"using.newest.event" When multiple events match the focal point query, the event with the largest
(newest) timestamp is used to build the customer record.
When an event.attribute is specified, then the legal values for this argument and thier meanings are:
"using.all.values" All values for the attribute on all match focal point events are used
to build customer records, with the value of those attributes as the focal point point for the record.
"using.earliest.value" The value of the attribute on the event with the smallest
(earliest) timestamp is used as the focal point time.
"using.most.recent.value" The value of the attribute on the event with the largest
(most recent) timestamp is used as the focal point time.
A FocalPointQuery object based on the supplied event (and optional event attribute).
David Barker (firstname.lastname@example.org)
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.