Formulas can be shared
across multiple computed columns and across multiple IT data marts.
For example, the SHIFT computed columns for a particular IT data mart
can all be based on the same SHIFT formula. If you want to change
the site-specific definition of SHIFT, you can make a change to the
SHIFT formula and click
OK. If this expression
is used in any other formula, the
Update Formula dialog box appears and displays the computed columns where this
formula is used. Click
Yes to cause all computed
columns that use the formula to inherit the change. Otherwise, click
No.
Computed columns in
staged or aggregation tables are calculated using the latest version
of the formula. In other words, if you change the expression for a
computed column in a staged table or an aggregation table and redeploy
the job, then the next time the job is run, the values for that column
in that staged table or aggregation table will be computed according
to the new expression. This computation occurs whether the expression
is from a formula or only for that computed column.
CAUTION:
If the
expression of a computed column is changed and if that column was
already used as input to a subsequent transformation that in turn
created a target table, then the values in that target table are not
automatically recreated.
To make the old and
new values of the computed columns consistent with each other, redeploy
and rerun all the previous ETL jobs that contain the new formula,
according to the following guidelines.
-
Case 1: The change to the expression
of a formula should be reflected in all the tables, including the
aggregation tables. This situation might occur if an erroneous expression
was entered and needs to be corrected. Previously aggregated data
is affected and must be changed.
Solution: Purge the
aggregation tables. Then redeploy and rerun all the staging jobs and
all the aggregation jobs that contain the data that uses the altered
expression to create a new column. Thus, you recreate the aggregation
tables.
-
Case 2: The change to the expression
of a formula should be reflected only from this time forward. This
situation might occur if there has been a change to the billing rate.
Previous aggregated data is not affected.
Solution: Redeploy
the staging job that uses the altered expression. You do not have
to redeploy and rerun the aggregation jobs whose source tables use
the altered expression to create a new column.
For example, consider
the following situation:
-
There is a computed column RATE
in a staged table, where RATE=BYTES/SECOND.
-
There is an aggregation with statistics
based on that RATE column (for example, the mean RATE).
-
Data for the RATE and the mean
RATE columns has already been aggregated.
If you subsequently
change the expression for RATE to RATE=BYTES/MINUTE, and redeploy
the job, in the next ETL, the values of the staged table's RATE column
will be computed according to BYTES/MINUTE. However, the values in
the aggregation table that already exist (that is, they were already
aggregated) will still reflect the previous BYTES/SECOND calculation. According
to the guidelines in Case 1, if you want the statistics that are generated
to reflect the rate change in the aggregated data, you should rerun
all the associated staging and the aggregation jobs.