# Auto-Parsing

Astera allows users to process input stream of date, name and address data and return it into elements such as hour, day, month, suffix, first name, last name, city, state, zip code etc. respectively, as parsed output with the help of auto-parsing feature.

In this document, we will learn how to automatically parse name and address data fields using the auto-parsing feature.

## **Sample Use Case**

In this case, we have some unstructured data stored in a PDF file. Download the sample PDF file from [here](https://www.astera.com/Downloads/Misc/2020/07/8-Auto-Parsing-Name-and-Address.zip).

![](/files/cA7FmUNbSOFJQIzfxN0A)

This file is a customer list report that contains information such as full contact name, full address and account details of the customers.

If you look at it, the *Account* field contains full name with title. We want to extract and parse this information into *Suffix, First Name, Last Name* etc., and full address information into *City, Street, Zip Code* etc.

## **Creating a Report Model**

1. Load the unstructured source file in Astera's designer.

![](/files/MWnZZldWlF1lqbCut0Yn)

2. Add a data region. Specify the pattern by typing “ACCOUNT:” in the pattern bar and increase the *Line Count* to 4.

![](/files/uZI9f8m283PHFnF4eDfT)

3. Highlight the data region after “ACCOUNT:”. Right-click on it and select *Add Name Field* from the context menu.

![](/files/CWd0DvDlnLbCqSND0Uks)

Observe that the parsed name field components such as *NamePrefix, NameFirst, NameLast* etc., have been added to the report model under the *Model Layout* panel.

4. Highlight the data region in the second line after “CONTACT”. Right-click on it and select *Add Data Field* from the context menu. Rename it to *Contact*.

![](/files/tj488JtevguwsV8QKSzU)

5. Highlight the last two lines of the data region. Right-click on it and select *Add Address Field (US)* from the context menu.

![](/files/feHbZostvcYaq3wkGy9n)

You can see that this has automatically parsed the address information into different components such as *AddressState, AddressCity, AddressZipcode*, etc.

Preview the extraced data to make sure everything, including the different fields and data, is in place.

![](/files/xA71QHmlHj3Sv9nLQAgx)


---

# 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/report-model/use-cases/auto-parsing.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.
