Cast to float

Cast to Float

Description

Converts a value to the float type.

Category

Transformation

Supported Field Types

  • text
  • int
  • boolean

Output Field Type

  • float

Arguments

None

Pseudo-code (Python)

def func(val):
    """
        val: original value
    """
    if val:
        return float(val)
    else:
        return None

Use Cast to Float in Kondado

Apply the Cast to Float transformation to convert text, integer, or boolean fields into float format for your data pipelines.

1
Access your pipeline transformations

Open your pipeline in the data transformation section of the Kondado platform to add or edit transformations.

2
Select the source field to convert

Choose a field of type text, int, or boolean that you want to convert to float format for calculations or reporting.

3
Apply the Cast to Float function

Add the Cast to Float transformation with no arguments required; the function automatically converts valid values to float and returns None for empty values.

4
Verify output and connect to destination

Confirm the output field type is float, then send your transformed data to a destination such as a BI tool, warehouse, or spreadsheet.

Frequently asked questions

What input types does Cast to Float support?
Cast to Float supports text, int, and boolean field types as input. You can use this transformation in your data transformation workflows to standardize numeric data.
What happens when the input value is empty or null?
The function returns None when the input value is empty or null, as shown in the pseudo-code: it only attempts conversion when val evaluates to true.
Does Cast to Float require any arguments or parameters?
No, Cast to Float takes no arguments. Simply apply the transformation to your selected field and it will automatically convert supported types to float.
What is the output field type of Cast to Float?
The output is always a float field type, making it ideal for preparing data for dashboards and analytics that require decimal precision.
When should I use Cast to Float instead of keeping values as integers?
Use Cast to Float when you need decimal precision for calculations, averages, or financial metrics, or when your downstream tools or destinations require float-compatible data types.

Written by·Published 2024-12-20·Updated 2026-04-25