adding documentation about extraction filter

This commit is contained in:
Slim Bouguerra 2015-07-27 16:23:14 -05:00
parent 5478b5bef8
commit 65654ddbf9
1 changed files with 33 additions and 0 deletions

View File

@ -80,3 +80,36 @@ The following matches any dimension values for the dimension `name` between `'ba
"function" : "function(x) { return(x >= 'bar' && x <= 'foo') }"
}
```
### Extraction filter
Extraction filter matches a dimension using some specific [Extraction function](./dimensionspecs.html#extraction-functions).
The filter matches the values for which the extraction function has transformation entry `input_key=output_value` where
`output_value` is equal to the filter `value` and `input_key` is present as dimension.
**Example**
The following matches dimension values in `[product_1, product_3, product_5]` for the column `product`
```json
{
"filter": {
"type": "extraction",
"dimension": "product",
"value": "bar_1",
"extractionFn": {
"type": "lookup",
"lookup": {
"type": "map",
"map": {
"product_1": "bar_1",
"product_5": "bar_1",
"product_3": "bar_1"
}
},
"replaceMissingValueWith": "",
"retainMissingValue": false,
"injective": false
}
}
}
```