INFOMAPS Procedure
UPDATE DATAITEM Statement
Updates the properties of a specified data item
in the current information map.
Syntax
UPDATE DATAITEM "data-item-ID" <options>;
Summary of Optional Arguments
tells an application 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.
modifies the list of aggregation functions that
are available to the data item.
specifies the usage type of the data item to be
updated.
specifies how custom properties for the data item
are updated.
specifies the description of the data item.
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.
specifies the SAS format of the data item.
specifies the ID of the data item to update.
specifies the name assigned to the data item in
the information map.
specifies the data type of the data item's expression.
specifies what method an application that uses the
information map is to use in generating a list of values for this
data item to present to a user.
Required Argument
- "data-item-ID"
- specifies the ID of
the data item to update.
Optional Arguments
- ACTIONS=(actions-list)
- tells an 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. For example, a user of SAS Web
Report Studio can right-click a column heading of a report and select Sort from the pop-up menu to sort the values in that
column. Specifying
actions=(nosort)
tells
SAS Web Report Studio not to offer the Sort menu selection for this data item.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.
- 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.
- 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 aggregate-function values
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 SQL Procedure User's Guide.
The special value
InternalAggregation
specifies that the values of
the measure data item are aggregated by a nonadditive expression. A
nonadditive 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 nonadditive
expression. If you specify that a data item has a nonadditive 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 DATAITEM statement as the AGGREGATIONS_LIST= option, then the
INFOMAPS procedure sets the AGGREGATIONS_LIST= option first.
- AGGREGATIONS_LIST=_ALL_ | ADD (aggregate-function-list) | REMOVE (aggregate-function-list) | <REPLACE> (aggregate-function-list)
- modifies the list of aggregation functions that
are available to the data item. 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.
- REMOVE (aggregate-function-list)
-
removes the specified
aggregate functions from the aggregation list.
- <REPLACE> (aggregate-function-list)
-
replaces the current
aggregation list with the specified aggregate functions.
Default:REPLACE (if an aggregate function list is specified
with no other keyword)
Requirement:Separate aggregate function names in aggregate-function-list
values with a blank space. For example:
aggregations_list=replace(Freq FreqDistinct CSSDistinct)
Interactions:Interaction: If you use the AGGREGATION_LIST=
option in the same UPDATE statement as the AGGREGATIONS= option, then
the INFOMAPS procedure sets the AGGREGATIONS_LIST= option first.
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) | REMOVE (property-names-list) | <REPLACE> (custom-properties-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 value 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.
Restriction:Property names cannot begin with an underscore (_) character.
Requirement:Property names must be unique. If a specified 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.
- property-value
-
specifies the value
of the property.
- description
-
specifies the description
of the property. The description is optional.
- REMOVE (property-names-list)
-
removes the specified
custom properties from the data item.
The form of the
property-names-list value is
"property-name-1" <... "property-name-n">
Interaction:If you specify both the ADD and REMOVE operations,
then the REMOVE operation occurs first.
- <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 value.
Default:REPLACE (if a custom properties list is specified
with no operation keyword)
- 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 use the Information
Maps engine to access an information map containing character type
data items created with the EXPRESSION= argument, you should be aware
of the EXPCOLUMNLEN= option of the LIBNAME statement and the EXPCOLUMNLEN=
data set option. By default, the Information Maps engine sets the
data length for columns of these data items to 32 characters. You
can use the EXPCOLUMNLEN= statement option or data set option to change
the default length.
For more information
about the EXPCOLUMNLEN= statement option, see LIBNAME Statement.For more information
about the EXPCOLUMNLEN= data set option, see EXPCOLUMNLEN= Data Set Option.
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.
Restriction:The FORMAT= option applies only to relational data items
and OLAP measures.
- ID="data-item-ID"
- specifies the ID of
the data item to update.
- 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) | REMOVE (unformatted-values-list) | <REPLACE> (custom-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. The following value generation
methods 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 value 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.
- 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 value is
"unformatted-value-1" <... "unformatted-value-n">
- <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 value.
Default:REPLACE (if a values list is specified with no operation
keyword)
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");
Copyright © SAS Institute Inc. All rights reserved.