Samuel Tober
07/29/2021, 12:07 PMTypeError: Task is not iterable.Yueh-Han
07/29/2021, 12:09 PMYueh-Han
07/29/2021, 12:14 PMSamuel Tober
07/29/2021, 12:15 PMmarkets = Parameter('markets', default=['malmo'])
for market in markets:
load_data(market)Yueh-Han
07/29/2021, 12:15 PMfor loop out of the Flow part, and rewrite it it as a task. Also, the map feature in Prefect can also solve the problemYueh-Han
07/29/2021, 12:16 PMSamuel Tober
07/29/2021, 12:17 PMBouke Krom
07/29/2021, 12:57 PMParameter is not a list of markets but a Task . You can do load_data.map(markets) to run a load_data task for each of the markets I think.Samuel Tober
07/29/2021, 1:48 PMKevin Kho
for market in markets, markets[0] or Dict access are done during build time then the Tasks have not been evaluated yet, which is why you get the error.
Yes mapping is a great way to dynamically handle this.