https://prefect.io logo
Title
j

jpuris

09/19/2022, 11:50 AM
Is it possible to provide a list object as a parameter in Prefect Cloud 2 offering? When I input
['analytics.mv_1', 'analytics.mv_2']
in the Parameters form, the parameter is treated as a string 😞
...
13:31:26.728 | INFO    | Flow run 'lush-bettong' - Scheduling materialized views {mat_view_names}
13:31:26.729 | INFO    | Flow run 'lush-bettong' - Refreshing materialized view '['
13:31:26.735 | INFO    | Flow run 'lush-bettong' - Refreshing materialized view '''
13:31:26.737 | INFO    | Flow run 'lush-bettong' - Refreshing materialized view 'a'
13:31:26.739 | INFO    | Flow run 'lush-bettong' - Refreshing materialized view 'n'
13:31:26.741 | INFO    | Flow run 'lush-bettong' - Refreshing materialized view 'a'
13:31:26.745 | INFO    | Flow run 'lush-bettong' - Refreshing materialized view 'l'
...
1
r

Rob Freedy

09/19/2022, 1:13 PM
Hey JP!! What does the Python function definition look like for your flow? Are you using type hinting? That may help the code recognize that the parameter is a list: https://docs.prefect.io/concepts/flows/#parameters
1
j

jpuris

09/19/2022, 1:27 PM
Thank you!! I had seen this, but completely forgot about it. I will try the type hinting and see if I can get this to work with the parameter input in the UI.
👍 1