Data Type Converter
A simple block to change the data type of an incoming value so downstream blocks receive the expected format. Use this when you need to ensure a value is treated as a number, text, list, dictionary, batch, or boolean for further processing or export.
π₯ Inputs
Generic β Any kind of data input (text, number, list, batch, etc.). Provide the value you want converted.
π€ Outputs
Generic β The converted value in the selected target type. Use this output to feed other blocks that expect a specific data type.
πΉοΈ Controls
Convert to β Dropdown where you pick the target type. Available choices include Integer, Boolean, String, Float, Batch, List, and Dictionary.
π¨ Features
Convert single scalar values between common types (number, text, boolean).
Create list or batch wrappers when a collection is required by downstream blocks.
Parse JSON-like text into a dictionary when
Dictionaryis selected and the input is a valid JSON string.Defensive behavior: when input is missing or incompatible, the block provides a safe default output and indicates an issue.
π Usage Instructions
Connect the data source to the
Genericinput.Choose the desired target type using the
Convert todropdown.Use the block's
Genericoutput as the input for downstream blocks that require the chosen type.
Common scenarios:
Convert user-entered text to a number before applying math blocks.
Convert a JSON string to a dictionary before exporting or parsing fields.
Wrap a single item into a
ListorBatchso list-aware blocks can process it.
π Evaluation
When the block runs, it reads the current input and outputs it in the selected format. If conversion is not possible, it outputs a safe default and logs the condition for attention.
π‘ Tips and Tricks
Use
Debug Inputto inspect raw values before conversion so you can pick the correct target type.If you expect missing values, place
Is Nonebefore this block to detect them andReplace Noneto insert a fallback value.When preparing structured payloads for logging or APIs, combine
String MergeorData to JSONwith this block to produce properly formatted data.For batch workflows, pair this block with
Batch Concatenation,Get Batch Size, orDebatchto inspect or flatten batch contents after conversion.After converting to dictionary form, persist or share results using
Data Write Local,Data Write Global, or export viaCSV Export.
(hint: use String Input or Number Input blocks as simple sources when testing conversions)
π οΈ Troubleshooting
If conversion fails or output seems unchanged, check the input value with
Debug Inputto confirm its current type and content.If
Dictionaryconversion doesn't work, verify the input is valid JSON text (proper quotes, commas, braces).When working with batches or lists, confirm the selected target (
ListvsBatch) matches what downstream blocks expect; useGet Batch Sizeto verify batch contents.For unexpected boolean conversions, ensure the input string or number follows a clear true/false convention (for example,
0/1ortrue/false).
Last updated
Was this helpful?