This method adds a taxonomy to a value of type DM_LogicalDataSpec.
A taxonomy consists of a name and at least one category map.
The first category is specified with this method.
A category map consists of a reference to a table and to two
columns
containing child and parent values. It can optionally contain
a name
mapping for the parent values, and a type value that specifies
whether
the category map is recursive or non-recursive.
The table is not read when this method is called. Reading the
table
and checking whether it exists happen during the training run.
Syntax
Method syntax
>>-logData..DM_addTax--(--taxName--,--tabName--,--childCol--,--->
>--parentCol--,--nmpName--,--mapType--)------------------------><
Function syntax
>>-DM_addTax--(--logData--,--taxName--,--tabName--,--childCol--,-->
>--parentCol--,--nmpName--,--mapType--)------------------------><
Parameters
- logData
- A value of type DM_LogicalDataSpec
- taxName
- A value of type VARCHAR(128)
that represents the name of a taxonomy
- tabName
- A value of type VARCHAR(300)
that is fully qualified name of the table containing the category
map
- childCol
- A value of type VARCHAR(128)
that is the name of the column containing the child values
of the category map
- parentCol
- A value of type VARCHAR(128)
that is the name of the column containing the parent values
of the category map
- nmpName
- A value of type VARCHAR(128)
that is the name of the name mapping for the parent values.
It can also be NULL. If a name mapping is specified, it must
already exist
in the DM_LogicalDataSpec value.
- mapType
- A value of type INTEGER
that is the type of the category map. Allowed values are 0
(non-recursive)
and 1 (recursive).
Possible values are: 0 1
Return Value
The return value is of type DM_LogicalDataSpec
- If logData contains taxName, the following error
occurs:
IDM1216E: The taxonomy "Variable1" already exists.
- If taxName is NULL or tabName is NULL or childCol is
NULL or parentCol is NULL, the following error occurs:
IDM1213E:
One or more of the required parameters are NULL. To add a taxonomy,
the parameters name, tabName, childCol, and parentCol are required.
- If mapType does not equal 0
and mapType does not equal 1
, the following error occurs:
IDM1214E: The mapType is
incorrect. It must be 0 or 1.
- If nmpName is not NULL and
no name mapping with the specified name exists in logData
, the following error occurs:
IDM1215E: The name mapping
"Variable1" is not defined.
- If none of the conditions above apply the value logData is
returned.
The taxonomy taxName has been added to it.