Perform aggregation of a dataset based on aggregation rules. More...
Go to the source code of this file.
Perform aggregation of a dataset based on aggregation rules.
[in] | ds_in_src_tbl | A table whose values will be aggregated |
[in] | ds_in_agg_rules_config | A table that provides the aggregation rules to be applied to the source table. See aggregation_rules_config ddl for required table structure |
[out] | out_ds | A table that will contain the aggregations calculated from the source table. |
This macro reads in 2 tables: a source table and a table that contains aggregation rules for the source table. The output dataset is structured like the following example:
SRC_COL | AGGREGATION_RULE | AGG_VALUE | <SRC_WHERE_VARS1> | <SRC_WHERE_VARS2> | <...> | <SRC_WHERE_VARSN> |
---|---|---|---|---|---|---|
UNPAID_BALANCE_AMT | SUM | 2928719.51 | Automobile_Loans | Retail | <...> | Retail Customer |
UNPAID_BALANCE_AMT | SUM | 8027100.29 | CI_Term_Loans | Commercial | <...> | Manufacturing |
UNPAID_BALANCE_AMT | SUM | 240477.45 | CRE_Construction_Loans_P | Commercial | <...> | Manufacturing |
UNPAID_BALANCE_AMT | SUM | 15279922.83 | CRE_Construction_Loans | Commercial | <...> | Manufacturing |
UNPAID_BALANCE_AMT | SUM | 21339203.81 | CRE_Perm_Loans | Commercial | <...> | Manufacturing |
UNPAID_BALANCE_AMT | SUM | 5305.26 | Construction | Retail | <...> | Retail Customer |
UNPAID_BALANCE_AMT | SUM | 3341369.31 | Credit_cards | Retail | <...> | Retail Customer |
UNPAID_BALANCE_AMT | SUM | 525732.27 | HELOCs | Retail | <...> | Retail Customer |
UNPAID_BALANCE_AMT | SUM | 11139530.81 | Line_of_Credit | Commercial | <...> | Manufacturing |
UNPAID_BALANCE_AMT | SUM | 24406.49 | Residential_mortgages_P | Retail | <...> | Retail Customer |
UNPAID_BALANCE_AMT | SUM | 855434.25 | Residential_mortgages | Retail | <...> | Retail Customer |
The number of additional columns is based on the number of unique SRC_WHERE_VARS columns in the input aggregation rules dataset.
Definition in file irmst_aggregate_from_rules.sas.