Entity (ENTY)
There are use cases where we need data for long term, these data are not just raw events but the aggregated data, or computed data. Entity table is created for such use cases. In this table, we can keep aggregated fields for longer period of time (or forever) and hence could be useful to get the views of such aggregation ready for run time reviews. Also this could be used for some rules using cepq or otherwise.
These queries are present in stream definition as follows:
"enty":[
{
"name":"e1",
"opid":1,
"ratr":[
"nview"
],
"iatr":[
"vid"
],
"pkatr":[
{
"name":"pk1",
"type":5,
"kysz":24,
"opid":1,
"iatr":[
"prod"
]
}
],
"rstm":"prod_details",
"doc_buf_factor":50,
"sync_ts":60
},
{
"name":"e2",
"opid":2,
"ratr":[
"uvisit"
],
"iatr":[
"vid"
],
"pkatr":[
{
"name":"pk1",
"opid":1,
"type":5,
"iatr":[
"prod"
]
}
],
"rstm":"prod_details",
"doc_buf_factor":50,
"sync_ts":60
},
{
"name":"e3",
"opid":3,
"ratr":[
"sales"
],
"iatr":[
"price"
],
"pkatr":[
{
"name":"pk1",
"opid":1,
"type":5,
"iatr":[
"prod"
]
}
],
"rstm":"prod_details",
"doc_buf_factor":50,
"sync_ts":60
},
{
"name":"e4",
"opid":3,
"ratr":[
"total_items"
],
"iatr":[
"items"
],
"pkatr":[
{
"name":"pk1",
"opid":1,
"type":5,
"iatr":[
"prod"
]
}
],
"rstm":"prod_details",
"doc_buf_factor":50,
"sync_ts":60
}
]
Here e1 entity tells for the input attribute “vid” (visitor id), compute “nview” (num of views, count) using "opid": 1 ("stat": 1) and then put it in the column ("nview") of stream "rstm" (prod_details).
This is equivalent to keeping the stats for the attributes for lifetime in an efficient manner.