Enable data overlap
The simplest solution is to enable the data overlap feature of Atoti Server. In this mode, it is permitted for multiple data nodes to contain the same AsOfDate. You must enable data overlap on the query node by setting the following property:Filter dates to include
When using DirectQuery, you may want to only include a subset of data available on the remote database. You can configure this through a custom bean. TheSP_QUALIFIER__DIRECT_QUERY_DATES_INITIAL_LOAD_FILTER_CONDITION and SP_QUALIFIER__DIRECT_QUERY_DATES_ACTIVEPIVOT_INSTANCE_DESCRIPTION_FILTER_CONDITION
beans are used to tell Atoti Market Risk which dates to include in (or exclude from) the DirectQuery data node cube.
Two beans are necessary because one bean is an instance of com.qfs.condition.ICondition and the other is an instance of com.quartetfs.fwk.filtering.ICondition.
The filtering logic of both beans needs to be identical.
These beans can be entirely customized to create a condition on which dates to include in the DirectQuery data node.
Default implementation
The default implementation of theSP_QUALIFIER__DIRECT_QUERY_DATES_INITIAL_LOAD_FILTER_CONDITION and
SP_QUALIFIER__DIRECT_QUERY_DATES_ACTIVEPIVOT_INSTANCE_DESCRIPTION_FILTER_CONDITION beans excludes all dates that were provided to the
mr.data-load.initial-business-dates property. This is so that when running with an in-memory data node, the DirectQuery and in-memory node don’t contain any of
the same AsOfDates.
The default beans are defined in InitialDataDirectQueryConfig as:
Custom implementations
To create a custom implementation, you must create your own@Primary @Bean with a @Qualifier of
SP_QUALIFIER__DIRECT_QUERY_DATES_INITIAL_LOAD_FILTER_CONDITION and SP_QUALIFIER__DIRECT_QUERY_DATES_ACTIVEPIVOT_INSTANCE_DESCRIPTION_FILTER_CONDITION
that returns an instance of com.qfs.condition.ICondition and an instance of com.quartetfs.fwk.filtering.ICondition respectively.
This conditions can be thought of as what to include in the DirectQuery data node.
In the instance of com.quartetfs.fwk.filtering.ICondition, each condition included must be a SubCondition, where the AsOfDate is used as the matching field.