plugin parameter type COLUMNS seems to miss some columns
![Peter_R_Knight](https://us.v-cdn.net/6038231/uploads/lithium_attachments/n558i76ECBF4FD7814589.jpg)
I had a plugin that allowed the user to select 1 column and the type was set to COLUMN and this seemed to work fine.
However, I wanted to upgrade to be able to select multiple columns, so I changed the type to COLUMNS and I found the some columns would always be missing form the list? is this a know issue? any workaround for fix coming soon?
related to this, it would be good if alowed_column_types also applied to COLUMNS and if it could filter the list of columns by the type, rather than just giving a warning.
Best Answer
-
Hi @Peter_R_Knight
,However, I wanted to upgrade to be able to select multiple columns, so I changed the type to COLUMNS and I found the some columns would always be missing form the list? is this a know issue? any workaround for fix coming soon?
I was able to reproduce this issue by converting an existing parameter from COLUMN to COLUMNS. It only seems to affect existing recipes; if I create a new recipe, all columns are selectable. Does creating a new recipe resolve it for you?
related to this, it would be good if alowed_column_types also applied to COLUMNS and if it could filter the list of columns by the type, rather than just giving a warning.
The allowedColumnTypes does apply to COLUMNS in my testing. My parameter looks like this:
{ "name": "columns", "label": "Columns", "type": "COLUMNS", "columnRole": "input_role", "allowedColumnTypes": ["string"] }
Regarding your suggestion to filter the columns by type instead of giving a warning, I recommend suggesting the idea in Product Ideas if you'd like this to be implemented. As an alternative, you could use a SELECT parameter, and dynamically generate a list of filtered columns using Python. For more information, see Dynamic select using Python.
Thanks,
Zach
Answers
-
Many thanks for your reply.
Yes I was able to get COLUMNS to work correctly if I create a new plug in, but not if editing an existing one. So seems a minor bug there.
I have raised a product idea: plugin parameter type COLUMN & COLUMNS with alowed_column_types set should filter columns - Dataiku Community
Pete
-
Also - do you know what makes a recipe 'new'? i.e. if I copy the existing one, with a different folder name, but the same recipe label and then delete the old one would that still work.
-
Hi @Peter_R_Knight
,Thank you for suggesting the product idea.
Regarding changing COLUMN to COLUMNS, you only need to delete existing recipes in the Flow. You don't need to delete anything within the plugin itself.
Copying the recipe doesn't fix the issue. Only creating a new recipe within the Flow fixes it.
Thanks,
Zach
-
It would be good if the help was updated to show that allowedColumnTypes does apply to COLUMNS
-
Thank you for the feedback. I submitted this change to our documentation team for review.