Previous Page | Next Page

The INFOMAPS Procedure

INSERT FILTER Statement


Inserts a filter into the current information map. A filter provides criteria for subsetting a result set. For relational databases, a filter is a WHERE clause.
INSERT FILTER
CONDITION="conditional-expression"
<CUSTOM_PROPERTIES=(custom-properties-list)>
<DESCRIPTION="descriptive-text">
<FOLDER="folder-name" | "folder-location" </CREATE>>
<ID="filter-ID">
<NAME="filter-name">;

Required Argument

CONDITION="conditional-expression"

specifies a conditional expression that is used to filter the data.

Requirement: Relational data: Any reference to physical or business data in a relational table must be enclosed in double angle brackets (<< >>). Everything between double angle brackets is maintained just as it is; that is, case and blanks are maintained.

If you are referring to a physical column, then you must qualify the column with the data source ID. For example, <<Transaction.Sales_Tax>> . If you are referring, in an expression, to a data item in the current information map, then you do not need to qualify the data item ID. You can refer explicitly to the current information map by specifying root as the qualifier. For example, <<root.MODEL_ID>> .

Requirement: OLAP data: Expressions for OLAP data items must resolve to a valid, one-dimensional MDX set. Use double angle brackets (<< >>) to enclose references to an OLAP measure, OLAP dimension, OLAP hierarchy, or an OLAP level. Use single sets of square brackets ([ ]) to enclose a reference to an OLAP member.

Options

CUSTOM_PROPERTIES=(custom-properties-list)

specifies additional properties for the filter. Custom properties are supported by specific SAS applications such as SAS Marketing Automation. The form of the custom-properties-list is

("property-name-1" "property-value-1" <"description-1">)
...
("property-name-n" "property-value-n" <"description-n">)
where
property-name

specifies the name of the property.

Requirement: Property names must be unique. If a property name already exists in the filter, then the INSERT FILTER will fail. Therefore, it is recommended that you add a prefix or suffix to the property name to ensure uniqueness.
Restriction: Property names cannot begin with an underscore (_) character.
property-value

specifies the value of the property.

description

specifies the description of the property. The description is optional.

DESCRIPTION="descriptive-text"

specifies the description of the filter to be inserted.

Alias: DESC=
FOLDER="folder-name" | "folder-location" </CREATE>

specifies the folder in the information map into which to insert the filter.

  • If the folder is in the root directory of the information map, then you can specify the folder by name, without an initial slash. For example, FOLDER="CUSTOMERS" .

  • If the folder is not in the root directory, then you must specify the location of the folder beginning with a slash. For example, FOLDER="/CUSTOMERS/Europe" .

/CREATE

specifies that the named folder or location is created automatically if it does not already exist.

Alias: LOCATION=
Restriction: The following characters are not valid in a folder name:
  • / \

  • null characters

  • non-blank nonprintable characters

Restriction: A folder name can contain blank spaces, but it cannot consist only of blank spaces.
ID="filter-ID"

specifies the ID of the filter to insert. If you do not specify an ID, the INFOMAPS procedure generates a unique ID from the filter name. You can use the LIST statement to display filter IDs.

Restriction: Nulls and non-blank nonprintable characters are not valid in an ID. The following characters are invalid:
. < > [ ] { } \ / ^ @ ~
If a name contains any of these characters, they are replaced with an underscore (_) when the ID is generated from the name.
Restriction: The first 32 characters of an ID must be unique across the information map. An error occurs if you specify an ID that is the same as an existing ID (data item, data source, filter, or other). An ID that differs only by case from another ID in the current information map is not considered unique.
NAME="filter-name"

specifies the name of a filter to insert into the current information map. If the NAME= option is missing from the INSERT FILTER statement, the INFOMAPS procedure will generate a default name.

Restriction: Nulls and non-blank nonprintable characters are not valid characters for a filter name.

Examples

/* Insert a relational table filter. */ 
insert filter 
   name="genderFilter"
   id="Boys"
   description="Filter for boys"
   folder="/Filters" /create
   condition='<<CLASS.sex>> = "M"';

/* Insert an MDX filter. */
insert filter
   name="dates1"
   condition="<<Dates_FirstChild>> <>
   [cust_dates].[All cust_dates].[1996].[1996/06].[24JUN96]";

/* Insert an MDX filter. */
insert filter
   name="dates2"
   condition="<<Dates_Dates>>=[cust_dates].[All cust_dates].[1998].[1998/02],
   [cust_dates].[All cust_dates].[1998].[1998/02].[03FEB98]";

Previous Page | Next Page | Top of Page