From 65654ddbf95be684819285097f4c0ffb83229e66 Mon Sep 17 00:00:00 2001 From: Slim Bouguerra Date: Mon, 27 Jul 2015 16:23:14 -0500 Subject: [PATCH] adding documentation about extraction filter --- docs/content/querying/filters.md | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/content/querying/filters.md b/docs/content/querying/filters.md index 0fe931dbb96..2cc780bcd89 100644 --- a/docs/content/querying/filters.md +++ b/docs/content/querying/filters.md @@ -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 + } + } +} +```