ADD_PSA_COLUMN_EXPR¶
Add a PSA column expression (all parameters are mandatory).
It may be any SQL expression with placeholders for each PSA column used. The placeholder contains a “@” and the name of the PSA column. The expression will be calculated during the load within DV view. There is no seperate historization for this column, because the historization is already done for the original values used in the expression.
Parameter Name |
Required |
DefaultValue |
Parameter-Description |
---|---|---|---|
p_obj_schema |
yes |
PSA schema |
|
p_obj_table |
yes |
PSA table |
|
p_col_name |
yes |
PSA column name (new column) |
|
p_col_type |
yes |
PSA column data type (EXASOL conforming data type) |
|
p_col_expr |
yes |
PSA column expression (as column placeholder please use mandatory “@” + PSA column name, e.g. (CASE WHEN @CUSTOMER_TYPE = ‘’S’’ THEN ‘’X’’ ELSE ‘’Y’’ END) |
Example
EXECUTE SCRIPT api_reppsa.add_psa_column_expr
( 'XXX' -- p_obj_schema
, 'XXX' -- p_obj_table
, 'XXX' -- p_col_name
, 'XXX' -- p_col_type
, 'XXX' -- p_col_expr
);