INFOMAPS Procedure
UPDATE RELATIONSHIP Statement
Updates the properties of a specified join relationship
in the current information map.
Syntax
UPDATE RELATIONSHIP "relationship-ID" <options>;
Summary of Optional Arguments
specifies the cardinality of the relationship.
specifies the columns to be joined to create a single
relationship between two tables.
specifies how custom properties for the relationship
are updated.
specifies the description of the relationship.
specifies the ID of the relationship to update.
specifies the type of join.
Required Argument
- "relationship-ID"
- specifies the identifier
of the relationship to update.
Optional Arguments
- 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) | REMOVE (property-names-list) | <REPLACE> (custom-properties-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 the specified
custom properties to the relationship.
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 relationship, then the UPDATE RELATIONSHIP
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 relationship.
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 relationship 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 relationship.
- ID="relationship-ID"
- specifies the ID of
the relationship to update.
- JOIN=INNER | LEFT | RIGHT | FULL
- specifies the type of join. The type can be one
of the following:
- 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
Examples
Example 1
update relationship "join_customer_to_transaction"
condition="(<<CUSTOMER.Cust_ID>>=<<TRANSACTION.Cust_ID>>)"
join=inner;
Example 2
update relationship "CustTransaction"
cardinality=one_to_one
join=left;
Example 3
update relationship "join"
join=inner cardinality= one_to_many
condition= "(<<CUSTOMER.Cust_ID>>=<<TRANSACTION.Cust_ID>>)
and (<<CUSTOMER.Cust_ID>> > 142673939)";
Copyright © SAS Institute Inc. All rights reserved.