For each task field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 10:17 AM
Hi community,
I was wondering after passing a list of dict through tasks using .taskValue.set() method, how to maintain the same data type through each task?
Because seems, that when I use the for loop and getting by the parameters each element of the dict that I passed I need to cast again the values, is it possible to maintain the data type through each task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 10:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 10:36 AM
yes, I reviewed this, but this is a json serialised that could be a problem if a want to maintain the same data type through each task or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 11:02 AM
Yeah, to ensure that the data types are maintained, you can convert the values to the desired types after deserialization. This is necessary because JSON does not distinguish between integers and floats, and all numbers are deserialized as floats
The dbutils.jobs.taskValues.set()
method serializes the data to JSON, and dbutils.jobs.taskValues.get()
deserializes it back
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 12:29 PM
Ok, but if I'm using a for each task, and catch each input from the email_info value that I was passing:
for_each_task:
inputs: "{{tasks.get_email_infos.values.email_info}}"
task:
task_key: process_export_email_iteration
for catching each parameter:
notebook_task:
notebook_path: ../notebook/workflow/client_export.py
base_parameters:
function: export_email
env: ${bundle.target}
id: "{{input.id}}"
rendered_next_run: "{{input.rendered_next_run}}"
in the task I need to use the widget and convert again, idk if I explained well my problem that I was having using this path with "for loop"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2025 07:08 AM
I solved it, passing the variable as a list of string (dict) as input

