# Function Transformations

*Function Transformations* apply built-in expressions on the incoming data to transform it according to the expression’s logic.

There are several built-in functions in Astera that help in string manipulation, data conversion, time manipulation, calculations, comparisons, and data parsing.

## **Name and Address**

*Name and Address Parser* is a collection of built-in functions in the *Function Transformations* section. The functions in this category process the input stream of *Name* and *Address* data and give elements such as *Suffix, First Name, Last Name, City, Country, Street, Zip code,* etc. as parsed outputs.

In this section, we will learn how to parse name and address strings using built-in function transformations in Astera.

In this case, we have sample data coming in from a Fixed-Length File Source.

![](/files/xeUNGX3B8j0ANlCtHvg1)

The source file contains the Name, Contact, and Address details of customers.

Preview data by right-clicking on the source object’s header > *Preview Output.*

![](/files/YvPhwkejPrFbsFF3GrN1)

A *Data Preview* window opens up displaying the information in each field.

![](/files/qmR2xKC3NXztPGUkh93h)

## **Using Name Parser**

Now, we want to parse the *Name* field into Suffix, First Name, Last Name, etc.

For this purpose, we will use the *Name Parser Function Transformation*.

1. To get a *Name Parser Function Transformation*, go to *Toolbox > Function Transformations > Name and Address > ParseName(String name) - ParsedName.*

![](/files/ACbsqp5rOI8Jhcn7TyaG)

2. Drag and drop the *Parse Name* object onto the designer.

![](/files/0QAl62U0nRUwDflH9n2w)

You can see that the dragged transformation object has two sub-nodes - *Input* and *Output*.

3. Expand the *Input* node and map the *Name* field from the *Sample Data* object to the *name* field inside the *Parse Name* object.

![](/files/XP6hUa7H5kCbAqxYm0lD)

4. Right-click on the *Parse Name* object’s header and select *Preview Output* from the context menu.

![](/files/HSiYafY2PuRVFzxqZbIh)

A *Data Preview* window will open, displaying parsed data for the *Name* field.

![](/files/WSZ5XvAXb0FnXoe6nmbb)

To store this output, write it to a destination file.

5. Right-click on the *Output* sub-node inside the *Parse Name* object and go to *Write to > Excel Workbook Destination*.

![](/files/HFd4tbyMaVkXIcnq5qEP)

An *Excel Workbook Destination* object is added to the dataflow designer with auto-mapped fields.

![](/files/mkTV8jSPyuBTyWYnJckZ)

6. Configure settings for the [*Excel Workbook Destination*](https://documentation.astera.com/v/astera-data-stack-v7/dataflows/destinations/excel-workbook-destination) object.
7. Click on the *Start Dataflow* button placed in the toolbar at the top to create this destination file.

![](/files/bpokGCOzGR7HtOAOH0El)

## **Using Address Parser**

Now, we want to parse the *Address* field into Country, City, Street, Zip Code, etc.

For this purpose, we will use *Address Parser Function Transformation*.

1. To get an *Address Parser Function Transformation*, go to *Toolbox > Function Transformations > Name and Address > ParseAddressUS(String fullAddress, String outputCase) - ParsedAddress*.

![](/files/XF8G93ApN2YlJSU5qCD2)

2. Drag and drop the *Parse Address US* object onto the designer.

![](/files/UYCxZb6dr53TjgWTVJXV)

You can see that the dragged transformation object has two sub-nodes - *Input* and *Output*.

3. Expand the *Input* node and map the *Address* field from the *Sample Data* object to the *fullAddress* field inside the *Parse Address US* object.

![](/files/OoViuC6dPtatK6uYD70j)

4. Right-click on the *Parse Address US* object’s header and select *Preview Output* from the context menu.

![](/files/vUXDNddGXy3mWPz5png5)

A *Data Preview* window will open, displaying parsed data for the *Address* field.

![](/files/APSPdgoVnonakYXUY2Gm)

To store this output, write the parsed data to a destination file.

5. Right-click on the *Output* sub-node inside the *Parse Address US* object, and go to *Write to > Excel Workbook Destination*.

![](/files/Ph40QZHfTo8w3t8rVigt)

An *Excel Workbook Destination* object is added to the dataflow designer with auto-mapped fields.

![](/files/N691B2ooOSUUg9ysTBH0)

6. Configure settings for the [*Excel Workbook Destination*](https://documentation.astera.com/v/astera-data-stack-v7/dataflows/destinations/excel-workbook-destination) object.
7. Click on the *Start Dataflow* button placed in the toolbar at the top to create this destination file.

![](/files/OAlmBLM5wj4vO3E82TTy)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v7/dataflows/transformations/function-transformations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
