Data Transformation
Data transformation components convert and combine data between different formats and structures for seamless workflow integration.
Combine Data
This component combines multiple data sources into a single unified Data object.
The component iterates through the input list of data objects, merging them into a single data object. If the input list is empty, it returns an empty data object. If there's only one input data object, it returns that object unchanged. The merging process uses the addition operator to combine data objects.
Inputs
data
Data
A list of data objects to be merged.
Outputs
merged_data
Merged Data
A single Data object containing the combined information from all input data objects.
Combine Text
This component concatenates two text sources into a single text chunk using a specified delimiter.
To use this component in a flow, connect two components that output Messages to the Combine Text component's First Text and Second Text inputs. This example uses two Text Input components.
In the Combine Text component, in the Text fields of both Text Input components, enter some text to combine.
In the Combine Text component, enter an optional Delimiter value. The delimiter character separates the combined texts. This example uses
\n\n **end first text** \n\n **start second text** \n
to label the texts and create newlines between them.Connect a Chat Output component to view the text combination.
Click Playground, and then click Run Flow. The combined text appears in the Playground.
This is the first text. Let's combine text!
end first text
start second text
Here's the second part. We'll see how combining text works.
Inputs
first_text
First Text
The first text input to concatenate.
second_text
Second Text
The second text input to concatenate.
delimiter
Delimiter
A string used to separate the two text inputs. Defaults to a space.
Outputs
message
Message
A Message object containing the combined text.
Message to Data
This component converts Message objects to Data objects.
Inputs
Outputs
Data to DataFrame
This component converts one or multiple Data objects into a DataFrame. Each Data object corresponds to one row in the resulting DataFrame. Fields from the .data
attribute become columns, and the .text
field (if present) is placed in a 'text' column.
To use this component in a flow, connect a component that outputs Data to the Data to Dataframe component's input. This example connects a Webhook component to convert
text
anddata
into a DataFrame.To view the flow's output, connect a Chat Output component to the Data to Dataframe component.
Send a POST request to the Webhook containing your JSON data. Replace
YOUR_FLOW_ID
with your flow ID. This example uses the default BroxiAI server address.
curl -X POST "https://use.broxi.ai/api/v1/webhook/YOUR_FLOW_ID" \
-H 'Content-Type: application/json' \
-d '{
"text": "Alex Cruz - Employee Profile",
"data": {
"Name": "Alex Cruz",
"Role": "Developer",
"Department": "Engineering"
}
}'
In the Playground, view the output of your flow. The Data to DataFrame component converts the webhook request into a
DataFrame
, withtext
anddata
fields as columns.
| text | data |
|:-----------------------------|:------------------------------------------------------------------------|
| Alex Cruz - Employee Profile | {'Name': 'Alex Cruz', 'Role': 'Developer', 'Department': 'Engineering'} |
Inputs
data_list
Data or Data List
One or multiple Data objects to transform into a DataFrame.
Outputs
dataframe
DataFrame
A DataFrame built from each Data object's fields plus a 'text' column.
Usage Notes
Format Conversion: Seamlessly convert between Message, Data, and DataFrame formats
Data Aggregation: Combine multiple data sources into unified structures
Workflow Integration: Enable smooth data flow between different component types
Flexible Transformation: Support for various data transformation patterns
Structured Output: Convert unstructured messages into structured, analyzable formats
Last updated