Use this stored procedure to discretize numeric input data according to the limits for
discretization bins. The original column value is transformed to the index of the discretization
bin, which this value belongs to.
Authorization
The privileges held by the authorization ID of the statement must include the IDAX_USER role.
Syntax
IDAX.APPLY_DISC(in parameter_string varchar(32672))
Parameter descriptions
- parameter_string
- Mandatory one-string parameter that contains pairs of
<parameter>=<value> entries that are separated by a comma.
- Data type: VARCHAR(32672)
- The following list shows the parameter values:
-
- intable
- Mandatory.
- The name of the input table.
- Data type: VARCHAR(256)
- outtable
- Mandatory.
- The name of the output table where the discretized data is to be stored.
- Data type: VARCHAR(256)
- btable
- Mandatory.
- The input table that contains the limits for the discretization bin for the numeric columns that
are to be discretized.
- The table contains the colname column and the break column.
- The colname column references the name of the columns of the input table.
- The break column contains a bin limit for this column.
- Only columns of the input table with bin limits that are specified in the btable table are
discretized.
- Data type: VARCHAR(256)
- view
- Optional.
- A flag that indicates whether the output object should be stored as a view (true) or as a table
(false).
- Default: false
- Data type: BOOLEAN
- replace
- Optional.
- Indicates whether the discretized columns are to replace the original columns (true).
- If replace=true, the output table contains the columns of the input table
that are not discretized and also the discretized columns with the same name as in the input
table.
- If replace=false, the output table contains all the columns of the input
table with their original name and also the discretized columns that get a
disc_ prefix.
- Default: true
- Data type: BOOLEAN
Returned information
INTEGER the number of discretized columns.
Example
call IDAX.APPLY_DISC('intable=SAMPLES.CUSTOMER_CHURN, outtable=CUSTOMER_CHURN_DISC, btable= CUSTOMER_CHURN_BINS, replace=false, view=true');
select ANNUAL_REVENUE_MIL, DISC_ANNUAL_REVENUE_MIL, AVG_SPENT_RETAIN_PM, DISC_AVG_SPENT_RETAIN_PM from CUSTOMER_CHURN_DISC ;