Lars-Kristian Svenøy
11/16/2021, 12:37 PMdaysSinceEpoch, as I want to query for entities within certain days.
"ingestionConfig": {
"transformConfigs": [
{
"columnName": "daysSinceEpoch",
"transformFunction": "toEpochDays(documentTimestamp)"
}
],
...
Additionally, for the RealtimeToOfflineSegmentsTask, I am using this value for deduplication purposes.
In the schema:
"primaryKeyColumns": ["customerId", "machineId", "daysSinceEpoch"]
...
This is because for each event, I only want to keep the latest in a day.
Here’s the RealtimeToOfflineSegmentsTask
"RealtimeToOfflineSegmentsTask": {
"bucketTimePeriod": "1d",
"bufferTimePeriod": "2d",
"mergeType": "dedup",
"maxNumRecordsPerSegment": 10000000,
"roundBucketTimePeriod": "1h"
}
In the realtime table, I am also filtering out any events older than 14 days (Where documentTimestamp is the actual primary timeColumnName)
"filterConfig": {
"filterFunction": "Groovy({documentTimestamp < (new Date() - 14).getTime()}, documentTimestamp)"
},
Does that make sense?Neha Pawar
Lars-Kristian Svenøy
11/16/2021, 5:30 PMNeha Pawar
Lars-Kristian Svenøy
11/16/2021, 5:31 PMNeha Pawar
Lars-Kristian Svenøy
11/16/2021, 5:31 PMLars-Kristian Svenøy
11/16/2021, 5:31 PMNeha Pawar
Neha Pawar
Lars-Kristian Svenøy
11/16/2021, 6:24 PMMayank
Lars-Kristian Svenøy
11/17/2021, 11:24 AM