Skip to content

Question : how to get composed/complex parameter from the query to the <ExampleSumAggregator>Factory class #1

Description

@vin-d

Hi, In here :
https://github.com/implydata/druid-example-extension/blob/master/src/main/java/io/imply/druid/example/aggregator/ExampleSumAggregatorFactory.java#L65

Aggregator parameters that are passed from the query are of simple type (they are different from a json object or a json array).

in my use case I'd like to pass as a parameter a JSON object so that I get a Map<String, String> or Map<String, Double> out of it.
I'm not very confortable with all the complexities of Jackson, would you have example to show how that could be done ?.

currently I pass what is my JSON object as a string (so i have double quotes escaped which is not readable), I then parse that JSON string and get my map from parsing the resulting JSON object.
I guess there is a better way to achieve that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions