Defining a taxonomy in the logical data specification

You can define a taxonomy by using the method DM_addTax.
This method includes the following parameters:

The first category map must contain the relations between the items and the categories on hierarchy level 1. The name mapping that is specified with the category map only acts on the categories. You must specify the name mapping for the items with the item field. For more information, see Defining a name mapping in the logical data specification.

You can define more than one taxonomy in a logical data specification.

Example

The following code example does not include name mappings:
IDMMX.DM_LogicalDataSpec()..DM_addTax('MyTax', 'MYSCHEMA.MYTAXTABLE',
'ITEMCOL', 'CATMAPCOL_1', cast(NULL as VARCHAR), 0)
The following code example includes name mappings for the child items (ItemNmp) and for the parent items (CatMapNmp):
IDMMX.DM_LogicalDataSpec()..DM_addDataSpecFld('COL1')..DM_addNmp
('ItemNmp','MYSCHEMA.MYNMPTABLE', 'ITEMCOL','MAPPEDITEMCOL')
..DM_addNmp('CatMapNmp','MYSCHEMA.MYNMPTABLE','VALUECOL', 
'MAPPEDVALUECOL')..DM_setFldNmp('COL1', 'ItemNmp')..DM_addTax
('MyTax', 'MYSCHEMA.MYTAXTABLE', 'ITEMCOL', 'CATMAPCOL_1', 
'CatMapNmp', 0)


Feedback | Information roadmap