Restrict column parameter to specific datatype

Solved!
NN
Restrict column parameter to specific datatype

Hi Team,
In a custom recipe when we define a "type":"column" parameter do we have the option to restrict the prompt values to a specific datatype from the datasets ?
i.e. only show date columns in the list.

I felt i had seen an old post with a similar question  but i couldnt find it in the community.

Please note i am on version 9.0.1

Thanks..

0 Kudos
1 Solution
AgatheG
Dataiker

Hello NN!

You can restrict the type of your column using the field allowedColumnTypes in the column params in the recipe.json. This field is an array of the different types allowed for your column parameter.

For instance, to only have date columns available like you asked, one would add "allowedColumnTypes": ["date"] among the other params of the column.

 

Hope this helps! ๐Ÿ˜€

Agathe

View solution in original post

0 Kudos
2 Replies
AgatheG
Dataiker

Hello NN!

You can restrict the type of your column using the field allowedColumnTypes in the column params in the recipe.json. This field is an array of the different types allowed for your column parameter.

For instance, to only have date columns available like you asked, one would add "allowedColumnTypes": ["date"] among the other params of the column.

 

Hope this helps! ๐Ÿ˜€

Agathe

0 Kudos
NN
Author

Thanks @AgatheG ,
This does help. It gives a warning message if the column selected is not a date.

0 Kudos