plugin parameter type COLUMNS seems to miss some columns

Solved!
Peter_R_Knight
Level 2
plugin parameter type COLUMNS seems to miss some columns

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.

0 Kudos
1 Solution
ZachM
Dataiker

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

View solution in original post

0 Kudos
6 Replies
ZachM
Dataiker

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

0 Kudos
Peter_R_Knight
Level 2
Author

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 ...

Pete

0 Kudos
Peter_R_Knight
Level 2
Author

It would be good if the help was updated to show that allowedColumnTypes does apply to COLUMNS

0 Kudos
ZachM
Dataiker

Thank you for the feedback. I submitted this change to our documentation team for review.

0 Kudos
Peter_R_Knight
Level 2
Author

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.

0 Kudos
ZachM
Dataiker

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. 7C5A63C5-9A0C-4D27-A27B-88327ABFD275_1_201_a.jpeg

Copying the recipe doesn't fix the issue. Only creating a new recipe within the Flow fixes it.

Thanks,

Zach

0 Kudos