If you have mapped your tables using Summarization in
the Map Tables wizard, then you can map accumulation
or deduction expressions to a target column. When you map tables for
summarization, the target table is largely a repository of numerical
data increments or decrements in response to source row-level operations
transferred by refresh or mirroring activity.
About this task
For example, if you have a target column such as REVENUE and you want the value in this
column to increment each time a product gets sold in the SALESAMOUNT source column, then you can map
SALESAMOUNT to REVENUE. Drag and drop the source column from the list next to the target column to
which you want to map.When you are mapping expressions to target columns, keep in mind that many
databases have column name length limitations, which can affect how some expressions, user exits,
and derived columns are handled. Column name length limitations can cause CDC Replication to describe a
column alias to the target when the source column name length exceeds the column name
length limit on the target. The restriction is 30 characters for most CDC Replication compatible databases
(IBM®
DB2® for Linux, UNIX, and Windows and Oracle). Microsoft SQL Server has a limit of 128 characters.
Procedure
- Click
.
- Select the subscription.
- Click the Table Mappings view and
select the table mapped for Summarization
- Right-click and select Open
Details....
- Click the Column Mappings
tab.
- Depending on which source columns you want to summarize
data, map your source columns to target columns.
- Expand the Summarization list and
drag and drop either Accumulation or Deduction expressions
on the source and target column mapping.
You can also
build an expression that summarizes data.
- Select the source column and click OK.
Depending on how you want to summarize data, the source column
in the list updates with a plus or minus sign.
- Click Save.
Results
When you start replication on the subscription, CDC Replication accumulates
or deducts the summarized data in response to row-level operations
occurring on the source table.