Apply aggregation rules that map a table onto itself (e.g. rollup rules) More...
Go to the source code of this file.
Apply aggregation rules that map a table onto itself (e.g. rollup rules)
[in] | aggregation_rules | Dataset with agrgegation rules. This is meant to be aggregation_rules_config or some subset of it. |
[in] | schema_name | Schema name associated with the data to apply the mapping to |
[in] | schema_version | Schema version associated with the data to apply the mapping to |
[in] | input_ds | The table that the aggregation will be applied to. |
[in] | period_column | The name of the column in input_ds that represents the time horizon. If all values are at the same time horizon, add a dummy column and set the value to 0. |
[out] | output_ds | Name of the dataset to create - input_ds with aggregations applied. |
Rows in aggregation_rules_config that have the same schema name and version for the source and target tables represent aggregation rules that define values in a dataset as functions of other values in the same dataset. For these rules, the src_where_cond column contains the logic that defines how the target value is updated. To reference values from the table, the notation GETVAL(ID,PERIOD) is used. ID should be a string that matches some value of the column specified in SRC_COL. PERIOD should be an integer and references the lag relative to the current row's period. For example GETVAL(GL_ASSET_LONOUTST_AUTO,0) with SRC_COL = GL_ACCOUNT_ID references the row in the table with 'GL_ASSET_LONOUTST_AUTO' as the GL_ACCOUNT_ID at the current period.
Definition in file irmc_apply_rollup_aggregation.sas.