xflow Help

Type Cast

The CAST node serves a crucial role in data manipulation by facilitating the conversion of column data types within a workflow. This enables users to tailor their data to better suit their analysis or processing requirements.

Configuration:

Click Add to Cast Columns:

This feature allows users to specify which columns they want to convert by adding them to the casting list.

Column: Users can select columns from a dropdown menu containing all available options.

Cast Type: A dropdown menu provides various data type options for users to choose from, allowing them to define the desired format for the converted data.

  • Users can select multiple columns for type casting, enabling bulk operations and efficient workflow management by clicking Add button.

  • The Delete button offers users flexibility by removing applied conditions, giving control over the casting process and allowing for necessary adjustments.

Example Usage

Consider a dataset containing information about products:

Dataset

ProductID

ProductName

Price

Quantity

InStock

1

Laptop

1200

5

Yes

2

Smartphone

800

10

Yes

3

Headphones

100

20

No

4

Keyboard

50

15

Yes

Source Configuration

Name

Type

ProductID

number

ProductName

string

Price

number

Quantity

string

InStock

string

Problem Statement: We need to manipulate the data types of certain columns in the dataset:

  • Convert Price to String: Change the Price column from numeric to string format to potentially concatenate it with other text data.

Configuration:

  • Column: Price

  • Cast Type: Number

Resultant Outschema

Name

Type

ProductID

number

ProductName

string

Price

string

Quantity

string

InStock

string

Last modified: 21 February 2025