Float to String

Description

This operation transforms a float into a string using a Go format string. The provided format is passed to fmt.Sprintf to control how the number is rendered. Common examples include:

  • %.1f → one decimal place (1 becomes "1.0")

  • %.2f → two decimal places (1 becomes "1.00")

  • %e → scientific notation (1 becomes "1.000000e+00")

See the fmt package documentation for a complete list of formatting verbs and flags.


Data types

These are the input/output expected data types for this operation:

Input data

- Input float values.

Output data

- Resulting string after being converted.


Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):

Format*

Specify the required verb/flag. See the fmt package documentation for a complete list of formatting verbs and flags.


Example

Suppose you want to convert a series of float values into strings following a specific format:

  1. In your Pipeline, open the required Action configuration and select the input Field.

  2. In the Operation field, choose Float to String.

  3. Set Format to %.1f

  4. Give your Output field a name and click Save. The values in your input field will be transformed into strings according to the given format. For example:

5.218 -> 5.2

You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.

Last updated

Was this helpful?