The structured transformation offers all the options of a normal transformation but also supports the processing of complex producttypes. Producttypes consists of a category tree to which attributes can be assigned at all levels.

For example, the operator of a webshop sells lawnmowers and socks. These articles have common attributes (price, name, manufacturer) and special attributes that only occur in the respective product group. Drive type only exists for the lawn mowers, Socks do not have this :-), but there is a clothing size as an attribute.

Rule editor

If the attributes are all filled, the socks have the following attributes:
Product-ID, Price, Name and Manufacturer from the parent level, Size and Color from the Socks section.
The same applies to lawn mowers:
Product ID, Price, Name and Manufacturer from the higher level, Drive Type and Power from the Lawn Mower level.

This category tree, together with the assignment of which attributes exist where, is called producttypes in Chioro. Of course, the tree can contain more levels than in this example.

Chioro requires 2 tables in which the structure of the category tree is described on the one hand and the assignment of the attributes to the categories.

The attributes are called key, e.g. Farbe oder Hersteller.
The names of the areas in which they are located are nodeKey, i.e. Shop, Rasenmäher und Socken.

First the category tree:

key categorySystemKey level orderHint parentKey root
shop 0 0 null true
rasenmäher 1 0 shop false
socken 1 0 shop false

Assignment of the attributes:

key name nodeKey
product-id Product-ID shop
price Price shop
name Name shop
hersteller Hersteller shop
antriebsart Antriebsart rasenmäher
leistung Leistung rasenmäher
größe Größe socken
farbe Farbe socken

The nodeKey is used to assign each attribute to its category.


Example: The basis is this data set, the ever-popular cats:
cloudy_cats.csv

This data set contains the following category tree:
rule editor

Root is cats, subcategory domestic and within that wild/tame.

To make this category tree known to Chioro, this data set is first run through a category split:

Rule editor

The category tree, broken down into its details, is now at the Categories output:

Rule editor

This is followed by a data source:

Rule editor

This saves the category tree with the following settings:

Rule editor

  1. data format ‘Tree Structure’ must be selected.
  2. the name under which the tree is saved.

After executing the data target, the tree can be found in the Producttype area. The category tree is now saved. Its name tree_test_01 will be used later.

Now we need a second table in which is stored which attribute is to be found in which category.

cloudy_cats_attr_for_tree.csv

Rule editor

This data is saved in a data target with the following settings:

Rule editor

  1. select ‘Producttypes attribute list’ as the data format.
  2. select the name of the previously saved category tree

After executing the data target, the attribute assignment is stored in the category tree.

This completes the preparations for using the structured transformation.


The structured transformation can be dragged and linked to the graphical user interface as usual.

Rule editor

The category tree is specified in the settings:

Rule editor

There are also two settings to note on the ‘Advanced’ tab:

Rule editor

  1. this attribute contains the category in which the product is located (default: productType)
  2. this attribute contains the complete category path of the product (default: productTypePath)
    These two entries allow the product to be assigned within the category tree.

Rules for the stored attributes in the respective category can now be found in the rule editor.

Rule editor

  1. the category tree, to expand/collapse the tree click on the blue folders, to see the rules in a category click on the font. click on the text.
  2. the rules built from the attributes, as usual tools and conditions can be set.
  3. the existing attributes can be dragged onto the rules for mapping.