# Line Count

*Line Count* option in Astera enables users to specify the number of lines over which a data region spans. This feature is useful when transposing data that appears in rows in an unstructured file and convert it into vertical fields (columns) inside a report model.

In this document, we will explore how *Line Count* feature helps with the selection of a data region in Astera.

## **Sample Use-Case**

In this case, we have unstructured data 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/ZSLdfKtqi9ECALpjXyrr)

This file contains a customer list report including their account name, contact and address details.

Observe that a single record spans over 4 lines on this PDF file. In order to capture this data and place it into different fields, we will use the *Line Count* feature.

First, let’s load this unstructured file onto the Report Model designer.

Go to *File > New > Report Model*. A *Report Options* window opens. Here, provide the *File Path* for the unstructured PDF file by clicking on the folder icon.

![](/files/xKKXSxoRoIpRkvNhW9O1)

There are many options available on the *Report Options* window to configure how Astera reads the unstructured PDF file such as specifying the scaling factor, font, tab size and password.

You can read about these options [here](https://documentation.astera.com/v/astera-data-stack-v7/report-model/report-model-interface/report-options#pdf-reading-options).

Click *OK* and the file will open in the report model designer.

![](/files/oY6xUjvyTTzhddMyCLz9)

Now that the file is open in Astera, we will create an extraction template.

## **Creating a Report Model**

1. Right-click on the *Record* node under *Model Layout* panel. Select *Add Data Region* from the context menu.

![](/files/wo9QjBN7dnP1o4GEY4iz)

A pattern box, properties panel and a data node is added on the Report Model screen.

![](/files/8x2yxVM4jxZegksUBtz8)

2. Specify a pattern with which Astera can match your file to capture data. You can use an alphabet, character, number, word or a wild card or any combination of these to define your pattern.

In this case, write “ACCOUNT” in the pattern box to match it on the file as shown below.

![](/files/c0Ugov2pNBmE6odyW0ZQ)

Observe that only one field information is captured through matching pattern. In order to capture the data spanning over 4 lines, we must increase the *Line Count* value.

3. Increase the *Line Count* value to 4.

![](/files/XHdWQaUee7ZDmbPHzfR9)

Each data region block contains information of a single record. Let’s create data fields.

4. Highlight the data region after “ACCOUNT:”, right-click on it and select *Add Data Field* from the context menu. Rename it to Account.

![](/files/yjl9u76f2ovhs13ekyyn)

Repeat the process to create more data fields and name them as shown below. You can see the layout of the extraction template in the *Model Layout* panel.

![](/files/KyHl1ES9cY4Ghx6uORSm)

5. Preview data by clicking on *Preview Data* icon placed in the toolbar at the top of the designer window.

A *Data Preview* window will open displaying a preview of the extracted data.

![](/files/ytvUqIXikU7CkVZkF4S5)


---

# 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/line-count.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.
