java.lang.IllegalStateException: Not a JSON Array

ds_stat
ds_stat Registered Posts: 2 ✭✭✭

I am trying to define an input parameter for a custom Plugin recipe. I want the input to be a list of strings. It could well be only one string in the list but that is fine.

I have defined the recipe.json file as so:

{
"name": "indicator_id",
"label": "indicator_id",
"type": "STRINGS",
"description": ".<Some text here>",
"mandatory": true
}

If i input a single string in the recipe UI, say "indicator1" i get the following error:

java.lang.IllegalStateException: Not a JSON Array: "indicator1"

What type of object is returned when using get_recipe_config()['indicator_id']? How can i configure this to just return a list with the strings in the input?

Thanks


Operating system used: Ubuntu

Tagged:

Answers

  • NN
    NN Neuron, Registered, Neuron 2022, Neuron 2023 Posts: 145 Neuron
    edited July 17

    Hi @ds_stat

    We have usually been able to use TEXTS parameter in our plugins.

    It returns a list of texts that you have entered
    For example if you entered the values as

    indicator1 indicator2


    the output of get_recipe_config() will be {'indicator_id': ['indicator1', 'indicator2']}

    Which version of DSS are you using ? Maybe it will help the dataiku team debug your issue further.

Setup Info
    Tags
      Help me…