Previous Page | Next Page

The INFOMAPS Procedure

UPDATE RELATIONSHIP Statement


Updates the properties of a specified join relationship in the current information map.
UPDATE RELATIONSHIP "relationship-ID"
<CARDINALITY=ONE_TO_ONE | ONE_TO_MANY | MANY_TO_ONE | MANY_TO_MANY | UNKNOWN>
<CONDITION="conditional-expression">
<CUSTOM_PROPERTIES=NONE | ADD (custom-properties-list) |
REPLACE (custom-properties-list) | REMOVE (property-names-list)>
<DESCRIPTION="descriptive-text">
<ID="new-relationship-ID">
<JOIN=INNER | LEFT | RIGHT | FULL>;

Required Argument

"relationship-ID"

specifies the ID of the relationship to update.


Options

CARDINALITY=ONE_TO_ONE | ONE_TO_MANY | MANY_TO_ONE | MANY_TO_MANY | UNKNOWN

specifies the cardinality of the relationship.

CONDITION="conditional-expression"

specifies the columns to be joined to create a single relationship between two tables.

Requirement: The columns referenced in the conditional expression must be qualified with the associated data source ID and must be enclosed in double angle brackets <<...>>.
CUSTOM_PROPERTIES=NONE | ADD (custom-properties-list) | REPLACE (custom-properties-list) | REMOVE (property-names-list)

specifies how custom properties for the relationship 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 relationship, if there are any.

ADD (custom-properties-list)

adds to a custom list of values for the relationship.

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 relationship, then the INSERT RELATIONSHIP 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 a custom list of values for the relationship.

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

REMOVE (property-names-list)

removes names from a custom properties list.

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 relationship, which can be viewed by the information map consumer.

Alias: DESC
ID="new-relationship-ID"

specifies the new ID for the relationship.

JOIN=INNER | LEFT | RIGHT | FULL

specifies the type of join.

INNER

returns all the rows in one table that have one or more matching rows in the other table

LEFT

returns all the rows in the specified left table, plus the rows in the specified right table that match rows in the left table

RIGHT

returns all the rows in the specified right table, plus the rows in the specified left table that match rows in the right table

FULL

returns all the rows in both tables


Example

update relationship "join_customer_to_transaction"
       condition="(<<CUSTOMER.Cust_ID>>=<<TRANSACTION.Cust_ID>>)"
       join=inner;
update relationship "CustTransaction"
       cardinality=one_to_one
       join=left;
update relationship "join"
       join=inner cardinality= one_to_many
       condition= "(<<CUSTOMER.Cust_ID>>=<<TRANSACTION.Cust_ID>>)
                  and (<<CUSTOMER.Cust_ID>> > 142673939)";

Previous Page | Next Page | Top of Page