CALL td_analyze ( 'association', 'required_parameter_list [ optional_parameter; [...] ]' );
- required_parameter_list
database = input_database_name; tablename = input_table_name; groupcolumn = column_name; itemcolumn = column_name; outputdatabase = output_database_name;
- optional_parameter
{ combinations = combination [,...] | description_table_options | dropsupporttables = { true | false } | gensqlonly = { true | false } | groupcount = group_count | hierarchy_table_options | left-side_lookup_table_options | minimumconfidence = min_confidence | minimumlift = min_lift | minimumsupport = min_support | minimumzscore = min_zscore | orderingprobability = ordering_prob | outputtablename = output_table_name [,...] | overwrite = { true | false } | processtype = { all | support | recalculate } | reduced_input_options | relaxedordering = { true | false } | resulttableprefix = 'prefix' | right-side_lookup_table_options | sequencecolumn = column_name | where = expression }
- description_table_options
descriptiondatabase = description_database_name; descriptiontable = description_table_name; descriptionidentifier = description_table_join_column; descriptioncolumn = description_table_names_column;
- hierarchy_table_options
hierarchydatabase = hierarchy_database_name; hierarchytable = hierarchy_table_name; hierarchyitemcolumn = low_hierarchy_table_column; hierarchycolumn = high_hierarchy_table_column;
- left-side_lookup_table_options
leftlookupdatabase = leftlookup_database_name; leftlookuptable = leftlookup_table_name; leftlookupcolumn = leftlookup_table_column;
- reduced_input_options
reducedinputdatabase = reduced_input_database_name; reducedinputtable = reduced_input_table_name;
- right-side_lookup_table_options
rightlookupdatabase = rightlookup_database_name; rightlookuptable = rightlookup_table_name; rightlookupcolumn = rightlookup_table_column;
Syntax Elements
- database
- The database containing the table to analyze.
- tablename
- The table containing the columns to analyze.
- groupcolumn
- The column representing groups in the association rules.
- itemcolumn
- The column representing items in the association rules.
- combinations
- [Optional] Number items on the left and right sides of requested association rules.
- description_table_options
- [Optional] A set of options to join with results sets (but not output tables) to make the results easier to understand. Specify either all or none of these options.
- descriptiondatabase
- The database containing the description table.
- descriptiontable
- The description table to join with the output data.
- descriptionidentifier
- The column in the description table that is joined with the result table.
- descriptioncolumn
- The column in the description table that contains descriptive item names.
- dropsupporttables
- [Optional] Whether to drop intermediate support tables after processing.
- gensqlonly
- [Optional] True returns the SQL for the function as a result set but does not run it.
- groupcount
- [Optional] The count (number) of groups in the input data.
- hierarchy_table_options
- [Optional] A set of options to join with the input table to reduce the amount of input data and compute association rules at a different hierarchical level. Specify either all or none of these options.
- left-side_lookup_table_options
- [Optional] A set of options to limit the reported rules to those with left-side items that appear in the lookup table. Specify either all or none of these options.
- leftlookupdatabase
- The database containing the left-side lookup table.
- leftlookuptable
- The left-side lookup table.
- leftlookupcolumn
- The column to match with left-side items in rules.
- minimumconfidence
- [Optional] The minimum value that the confidence measure of an association rule must have to be included in a result table. The value must be numeric and in the range [0, 1].
- minimumlift
- [Optional] The minimum value that the lift measure of an association rule must have to be included in a result table. The value must be numeric and nonnegative.
- minimumsupport
- [Optional] The minimum value that the support measure of an association rule must have to be included in a result table. The value must be numeric and in the range [0, 1].
- minimumzscore
- [Optional] The minimum value that the Z Score measure of an association rule must have to be included in a result table. The value must be numeric.
- orderingprobability
- [Optional] The probability of correct ordering, a numeric value in the range (0, 1]. To ignore the probability of correct ordering in Lift and Z-score calculations, set this value to 1.
- outputdatabase
- The name of the database that contains the analysis results tables.
- outputtablename
- [Optional] The names of the tables to store the analysis results.
- overwrite
- [Optional] Whether to drop the output tables before creating new ones.
- processtype
- [Optional] The process type, which is one of the following:
Process Type Description all (default) Builds support tables and calculates final affinities. support Builds support tables only. Use this option to view support tables and determine minimal support value, reducing amount of processing.
Single item support table _TWM_1_ITEM_SUPPORT is created in output_database_name, regardless of value of output_table_name.
If you specify resulttableprefix, support table name is prefix_1_ITEM_SUPPORT.
recalculate Calculates final affinities using existing support tables, built from earlier function call with dropsupporttables (false). - reduced_input_options
- [Optional] A set of options to use with the hierarchy_table_options, minimumsupport, or a WHERE clause to save the resulting reduced input table for further analysis. Specify either all or none of these options.
- reducedinputdatabase
- The database containing the reduced input table.
- reducedinputtable
- The table in which to store reduced input rows. See groupcount.
- relaxedordering
- [Optional] Whether, in the sequencecolumn, the items on the left side of an association rule may occur in any order, followed by the items on the right side of an association rule.
- resulttableprefix
- [Optional] The prefix to use in the names of intermediate support tables and default output table names.
- right-side_lookup_table_options
- [Optional] A set of options to limit the reported rules to those with right-side items that appear in the lookup table. Specify either all or none of these options.
- sequencecolumn
- [Optional] The input table column that specifies sequencing for input items, typically a date or timestamp.
- where
- [Optional] The expression in the SQL WHERE clause to include in the generated SQL to filter rows selected for analysis.