Previous Page | Next Page

The INFOMAPS Procedure

UPDATE DATAITEM Statement


Updates the properties of a specified data item in the current information map.
UPDATE DATAITEM "data-item-ID"
<ACTIONS=(actions-list)>
<AGGREGATION=aggregate-function>
<AGGREGATIONS_LIST=(_ALL_ | ADD (aggregate-function-list) |
REPLACE (aggregate-function-list) | REMOVE (aggregate-function-list)>
<CLASSIFICATION=CATEGORY | MEASURE>
<CUSTOM_PROPERTIES=NONE | ADD (custom-properties-list) |
REPLACE (custom-properties-list) | REMOVE (property-names-list)>
<DESCRIPTION="descriptive-text">
<EXPRESSION="expression-text">
<FORMAT="format-name">
<ID="new-data-item-ID">
<NAME="data-item-name">
<TYPE=NUMERIC | CHARACTER | DATE | TIME | TIMESTAMP>
<VALUE_GENERATION=NONE | DYNAMIC | ADD (custom-value-list) | REPLACE (custom-value-list) | REMOVE (unformatted-value-list)>;

Required Argument

"data-item-ID"

specifies the ID of the data item to update.


Options

ACTIONS=(actions-list)

tells a SAS application (such as SAS Web Report Studio) that uses the information map what actions it can present to its users to perform on the result data set returned by the information map.

The following actions can be specified:

RANK | NORANK

specifies whether the following items can be ranked:

  • relational data item values.

  • members of OLAP data items that represent hierarchies. The setting for this option does not affect the ability of the information map consumer to rank row and column values in a generated result set.

The setting for this option does not affect the ability of the information map consumer to rank row and column values in a generated result set.

Default: RANK
SORT | NOSORT

specifies whether the following items can be sorted:

  • relational data item values.

  • members of OLAP data items that represent hierarchies. The setting for this option does not affect the ability of the information map consumer to sort OLAP data values.

The setting for this property does not affect the ability of the information map consumer to sort OLAP data values.
Default: SORT
FILTER | NOFILTER

specifies whether members of OLAP data items that represent hierarchies can have filters applied to them. The setting for this option does not affect the ability of the information map consumer to filter on row and column values in a generated result set, and it does not affect test queries that are run from the Test the Information Map dialog box in Information Map Studio.

Default: FILTER
Restriction: This option value applies only to non-measure OLAP data items.
NAVIGATE | NONAVIGATE

specifies whether the member of OLAP data items that represent hierarchies can be drilled up or down, or expanded and collapsed.

Default: NAVIGATE
Restriction: This option value applies only to non-measure OLAP data items.
Default: If an action is not specified with an UPDATE DATAITEM statement, then it remains as originally specified with the INSERT DATAITEM statement. By default an action is enabled unless it is specifically disabled.
Interaction: The ACTIONS= option replaces the specified action or actions but does not affect any other actions that are in effect.
AGGREGATION=aggregate-function

specifies how a measure data item is aggregated when it is used in a query. See Aggregate Functions for a list of functions and what types of data they are available to. For more information about the aggregate functions (except for InternalAggregation and InternalAggregationAdditive), see "Summarizing Data: Using Aggregate Functions" in the "Retrieving Data from a Single Table" chapter in the SAS 9.2 SQL Procedure User's Guide.

The special value InternalAggregation specifies that the values of the measure data item are aggregated by a non-additive expression. A non-additive expression is one for which the arithmetic summation of the aggregated values of the measure data item is not equal to the arithmetic summation of all of the detail values of that data item. For example, SUM(COL1)/COUNT(COL1) is a non-additive expression. If you specify that a data item has a non-additive expression, then the total for that data item is calculated by applying the specified expression to the detail values of the data item.

The special value InternalAggregationAdditive specifies that values of the measure data item are aggregated by an additive expression. An additive expression is one for which the arithmetic summation of the aggregated values of the measure data item is equal to the arithmetic summation of all of the detail values of that data item. For example, SUM(COL1*COL2) is an additive expression.

Interaction: If you use the AGGREGATION= option in the same UPDATE statement as the AGGREGATIONS_LIST= option, then the INFOMAPS procedure sets the AGGREGATIONS_LIST= option first.
AGGREGATIONS_LIST=_ALL_ | ADD (aggregate-function-list) | REPLACE (aggregate-function-list) | REMOVE (aggregate-function-list)

modifies the list of aggregation functions that are available to the data item.

Interaction: If you use the AGGREGATION= option in the same UPDATE statement as the AGGREGATIONS_LIST= option, then the INFOMAPS procedure sets the AGGREGATIONS_LIST= option first.

The following actions can be specified:

_ALL_

places all the aggregate functions that are valid for the data item in the aggregation list.

ADD (aggregate-function-list)

adds the specified aggregate functions to the aggregation list. See Aggregate Functions for information about aggregate functions.

REPLACE (aggregate-function-list)

replaces the current aggregation list with the specified aggregate functions.

REMOVE (aggregate-function-list)

removes the specified aggregate functions from the aggregation list.

Requirement: Separate aggregate function names in aggregate-function-list values with a blank space. For example:
AGGREGATIONS_LIST=REPLACE(Freq FreqDistinct CSSDistinct)
Interaction: You can specify two AGGREGATIONS_LIST= options in the same UPDATE DATAITEM statement if one specifies _ALL and the other specifies REMOVE or if one specifies ADD and the other specifies REMOVE. If you specify both the _ALL_ and REMOVE operations, then the _ALL_ operation occurs first. If you specify both the ADD and REMOVE operations, then the REMOVE operation occurs first.
CLASSIFICATION=CATEGORY | MEASURE

specifies the usage type of the data item to be updated.

CUSTOM_PROPERTIES=NONE | ADD (custom-properties-list) | REPLACE (custom-properties-list) | REMOVE (property-names-list)

specifies how custom properties for the data item are updated. Custom properties are supported by specific SAS applications such as SAS Marketing Automation. Valid operations are the following:

NONE

removes all custom properties from the data item, if there are any.

ADD (custom-properties-list)

adds the specified custom properties to the data item.

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 data item, then the UPDATE DATAITEM statement 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.

REPLACE (custom-properties-list)

replaces the current custom properties for the data item with the specified properties.

See the ADD operation for a description of the form of the custom-properties-list.

REMOVE (property-names-list)

removes the specified custom properties from the data item.

The form of the property-names-list is

"property-name-1" <... "property-name-n">
Interaction: If you specify both the ADD and REMOVE operations, then the REMOVE operation occurs first.
DESCRIPTION="descriptive-text"

specifies the description of the data item, which can be viewed by the information map consumer.

EXPRESSION="expression-text"

specifies the combination of data elements, literals, functions, and mathematical operators that are used to derive the value of a data item when the information map is used in a query.

Note:   If you are using the Information Maps engine to access an information map that contains character type data items that are created with the EXPRESSION= option, you should be aware of the EXPCOLUMNLEN= option of the LIBNAME statement. By default, the Information Maps engine sets the data length for columns of these data items to 32 characters. You can use the EXPCOLUMNLEN= option to change the default length. For more information about the EXPCOLUMNLEN= option, see Other LIBNAME Statement Options for the Information Maps Engine and EXPCOLUMNLEN= Data Set Option.  [cautionend]

Interaction: Changing the expression of an existing data item might cause changes in other property settings within the same data item.
FORMAT="format-name"

specifies the SAS format of the data item.

ID="new-data-item-ID"

specifies the new ID for the data item.

NAME="data-item-name"

specifies the name assigned to the data item in the information map. A name is optional, descriptive text that makes it easier for business users to understand what the data is about. A data item's name is for display purposes only--you use a data item's ID to refer to it in code rather than its name.

TYPE=NUMERIC | CHARACTER | DATE | TIME | TIMESTAMP

specifies the data type of the data item's expression.

Interaction: Changing the type of an existing data item might cause changes in other property settings within the same data item.
VALUE_GENERATION=NONE | DYNAMIC | ADD (custom-values-list) | REPLACE (custom-values-list) | REMOVE (unformatted-values-list)

specifies what method an application (for example, SAS Web Report Studio) that uses the information-map is to use in generating a list of data item values for this data item to present to a user when the user is constructing a filter or responding to a prompt. Here are the value-generation methods that can be specified:

NONE

specifies that the list of values should not be generated. The application will require its user to manually type data item values.

DYNAMIC

specifies that the list that contains all of the data item's values be dynamically generated. The list is generated by querying the data source to retrieve the data item's values.

ADD (custom-values-list)

adds the specified custom values to the data item.

The form of the custom-values-list is

("unformatted-value-1" <"formatted-value-1" >)
  ...
("unformatted-value-n" <"formatted-value-n" >)
where
unformatted-value

specifies the unformatted value for a report.

formatted-value

specifies the formatted value for a report.

Note:   The formatted value is optional. It is used for display purposes only. For example, SAS Web Report Studio displays these values to the user of a filter and prompt definition dialog boxes so that the user can see what the values will look like after they are formatted for a report.  [cautionend]

REPLACE (custom-values-list)

replaces the current custom values for the data item.

See the ADD operation for a description of the form of the custom-values-list.

REMOVE (unformatted-values-list)

removes the specified unformatted values and their associated formatted values from the custom values list for the data item.

The form of the unformatted-values-list is

"unformatted-value-1" <... "unformatted-value-n">
Interaction: If you specify both the ADD and REMOVE operations, then the REMOVE operation occurs first.

Example

update dataitem "custId" 
       classification=category
       actions=(rank sort)
       value_generation=add(
                             ("NC" "North Carolina")
                             ("VA" "Virgina")
                             ("MD" "Maryland")
                           )
       value_generation=remove("CA" "OR" "WA");

Previous Page | Next Page | Top of Page