- Troubleshooting
- Resources
EventFetcher
Fetch events data from ThirdEye internal events database. These events can be fed to detectors downstream.
Inputs
None.
Outputs
One output.
No naming constraint for outputKey
and outputName
.
Parameters
name | description | default value |
---|---|---|
| Offset to apply to the startTime of the event timeframe. In ISO-8601 format. Eg | No offset ie |
| Offset to apply to the endTime of the event timeframe. In ISO-8601 format. Eg | No offset ie |
| Offset to apply on startTime and endTime to look around the timeframe. In ISO-8601 format. Eg |
|
| List of event types to filter by. Eg |
|
| Sql filter to apply on the events. See documentation below. Eg |
|
name: String | type: String | dimensionMap: Map[String, List(String)] |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The same event can happen in different timezone, so on a slightly different timeframe.
For instance, Christmas in France happens around 7 hours before Christmas in the United-States, so it is good practice to filter the HOLIDAY
events by a limited set of countries.
Example:
- Take all
HOLIDAY
events happening in theUS
and allCUSTOM
events created by the business team:
'US' member of dimensionMap['countryCode'] OR (type = 'CUSTOM')
The dialect used is Apache Calcite SQL. It is very close to ANSI SQL. See SQL reference. Try Calcite SQL online here.
COMBINING FILTERING
The eventTypes
filter is applied before the sqlFilter
.
Example
{
"name": "eventsDataFetcher",
"type": "EventFetcher",
"params": {
"component.startTimeLookback": "P30D",
"component.endTimeLookback": "P0D",
"component.lookaround": "P1D",
"component.eventTypes": ["HOLIDAY", "CUSTOM"],
"component.sqlFilter": "'US' member of dimensionMap['countryCode'] OR (type = 'CUSTOM')"
},
"outputs": [
{
# no constraint
"outputKey": "events",
# no constraint
"outputName": "events"
}
]
},