INFOMAPS Procedure

SET ASSIGNED_FILTERS Statement

Assigns filters that are applied whenever the associated data sources are referenced in a query.

Syntax

SET ASSIGNED_FILTERS
DEFINITION=(<data-source-filters-1<...data-source-filters-n>>);

Required Argument

DEFINITION=(<data-source-filters-1<...data-source-filters-n>>)
defines the filter assignments for one or more data sources. The data-source-filters value has the following form:
"data-source-ID" (
<PREFILTERS=("filter-ID-1<... "filter-ID-n">)>
<RESULTS_FILTERS=("filter-ID-1<... "filter-ID-n">)>
)
data-source-ID
specifies the identifier of the data source to which the assigned filters are applied.
PREFILTERS=
specifies one or more filters that are applied before the specified data source is used.
RESULTS_FILTERS=
specifies one or more filters that are applied after query results are generated.
filter-ID
specifies the identifier of a filter defined in the information map.
Alias:DEF=
Note:To clear an existing assigned filters list, specify a blank list: DEFINITON=( )

Details

Assigned filters are filters that are always applied to queries that reference the data source with which the filter is associated and to queries for which the associated data source is marked as required. There are the following two types of assigned filters:
prefilters
are applied before the data source is used. These filters subset the data in its associated data source before any other part of a query is run. The generated query contains a subquery that ensures that no data is consumed without the filter being applied.
results filters
are applied after a data source is used. These filters subset the query results after a join takes place. Any extra tables required by the filters are joined to the query. No sub-query is generated for these filters.
Note: Assigned filters can also be applied only for specific users or groups. For more information about assigning authorization-based filters that apply to a user or group, see UPDATE MAP_PERMISSIONS Statement.

Examples

Example 1

/* Define assigned filters for the current information map by assigning the */
/* filter 'ageLessThan30' and prefilter 'FemaleOnly' to the Customer table  */
/* and the filter '2008Q2'  to the Order table.                             */
set assigned_filters
    definition=("Customer" (PREFILTERS=("FemaleOnly")
                           (RESULTS_FILTERS=("ageLessThan30"))
                "Order" (RESULTS_FILTERS=("2008Q2")));

Example 2

/* Reset the assigned filters of the current infomation map */
set assigned_filters def=();