Attribute Explosion
Attribute Explosion is an optional feature of the Capture system.
It lets you pass a set of parameters through your capture steps, performing any lookups if you've provided a matching key parameter value.
Example
Let's say you have a table containing information about the different products you make. It looks a little bit like the example below…
ID | Width | Height | Weight | Colour |
---|---|---|---|---|
XR7-W | 100 | 100 | 1230 | White |
XR7-B | 100 | 100 | 1230 | Black |
XR7-XL | 200 | 200 | 4100 | Silver |
XR7MINI | 80 | 80 | 950 | Blue |
…and as part of your capture, you perform a lookup on this table based on the ID, so your final results include the Width, Height, Weight and Colour attributes.
Using explosion, you can send the ID number of the product, and you'll get back the full matching product details - with ID, width, height, weight and colour.
This makes it easy to perform complex searches when performing Fuzzy Searches or AI Prediction, as the user only has to enter a product ID rather than looking up tables of data.
Remapping
In some cases, the name of the key you send to the explode endpoint doesn't match the one used as the lookup key.
You can work around this issue with the modelmap attribute on your configuration file.
For example, let's say you have the following lookup…
{ "type": "lookup", "url": "https://mylookuptable", "key": "Product Code", "rkey" : "SKU" }
This looks up details based on the 'Product Code' attribute of the frame.
However, we want to be able to use the parameter 'PC' instead of 'Product Code' in our requests. So to do that, we add the following 'modelmap' parameter to our configuration…
"modelmap": { "Product Code": "PC", }
This instructs the system to convert any parameter named 'PC' to 'Product Code' when performing explosion.