mirror of https://github.com/apache/druid.git
Add docs for RegisteredDimensionExtractionFn
This commit is contained in:
parent
4a98c4fbac
commit
4764e86409
|
@ -308,6 +308,26 @@ This allows distinguishing between a null dimension and a lookup resulting in a
|
||||||
For example, specifying `{"":"bar","bat":"baz"}` with dimension values `[null, "foo", "bat"]` and replacing missing values with `"oof"` will yield results of `["bar", "oof", "baz"]`.
|
For example, specifying `{"":"bar","bat":"baz"}` with dimension values `[null, "foo", "bat"]` and replacing missing values with `"oof"` will yield results of `["bar", "oof", "baz"]`.
|
||||||
Omitting the empty string key will cause the missing value to take over. For example, specifying `{"bat":"baz"}` with dimension values `[null, "foo", "bat"]` and replacing missing values with `"oof"` will yield results of `["oof", "oof", "baz"]`.
|
Omitting the empty string key will cause the missing value to take over. For example, specifying `{"bat":"baz"}` with dimension values `[null, "foo", "bat"]` and replacing missing values with `"oof"` will yield results of `["oof", "oof", "baz"]`.
|
||||||
|
|
||||||
|
### Registered Lookup Extraction Function
|
||||||
|
|
||||||
|
While it is recommended that the [lookup dimension spec](#lookup-dimensionspecs) be used whenever possible, any lookup that is registered for use as a lookup dimension spec can be used as a dimension extraction.
|
||||||
|
|
||||||
|
The specification for dimension extraction using dimension specification named lookups is formatted as per the following example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type":"registeredLookup",
|
||||||
|
"lookup":"some_lookup_name",
|
||||||
|
"retainMissingValue":true,
|
||||||
|
"injective":false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
All the flags for [lookup extraction function](#lookup-extraction-function) apply here as well.
|
||||||
|
|
||||||
|
In general, the dimension specification should be used. This dimension **extraction** implementation is made available for testing, validation, and transitioning from dimension extraction to the dimension specification style lookups.
|
||||||
|
There is also a chance that a feature uses dimension extraction in such a way that it is not applied to dimension specification lookups. Such a scenario should be brought to the attention of the development mailing list.
|
||||||
|
|
||||||
### Cascade Extraction Function
|
### Cascade Extraction Function
|
||||||
|
|
||||||
Provides chained execution of extraction functions.
|
Provides chained execution of extraction functions.
|
||||||
|
|
Loading…
Reference in New Issue