> For the complete documentation index, see [llms.txt](https://documentation.astera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.astera.com/astera-data-stack-v7/dataflows/sources/raw-text-filters-in-file-sources.md).

# Raw Text Filters in File Sources

The option to apply text filters to raw data at the point of extraction that has existed for some time in Centerprise has been upgraded in the Astera 7.6 release with some notable bug fixes. This feature is available in Fixed-Length and Delimited file sources and provides the flexibility to source selected data by applying filters at the extraction point without modifying the source data.

## **Steps to Use Raw Text Filters with Fixed-Length or Delimited Files**

1. To apply raw text filters at the extraction point, drag and drop a fixed-length or delimited source object onto the designer.

In this article, we will use a [Delimited File Source](https://documentation.astera.com/v/astera-data-stack-v7/dataflows/sources/delimited-file-source) to retrieve data using the text filter option. But you can also use a [Fixed-Length File Source](https://documentation.astera.com/v/astera-data-stack-v7/dataflows/sources/fixed-length-file-source) for the purpose.

![](/files/67WvEhsK7xjR4vwsdUUS)

2. Right-click on the *Delimited* or *Fixed-Length File Source* object and go to *Properties* from the context menu.

![](/files/JujuWxHOJL2sHhG8apOT)

3. This will open the Properties window. Point the path to where your source file is located.

![](/files/qm7K4cwoLMoy1d9yh2ba)

4. Now scroll down to the bottom of the same screen. Here, you can find *Raw Text Filter* options, among many other options.

![](/files/FQDHeBWEsHdDDAALFz3K)

You can filter data using the following three options:

* *No filter. Process all records:* If you choose this option, the delimited or fixed-length reader will process and retrieve the entire source data without skimming any records.

In this example, we have chosen the ‘*No filter’* option and therefore, the delimited file reader has retrieved original data from our source file without filtering any records. Here’s a preview of the output:

![](/files/tJ0oo4BlaCFdRoJrJdBk)

* *Process if begins with:* You can choose this option to filter out records that start with a certain letter, digit, character, word, numeric value, or phrase.

In this example, we want to retrieve records starting with ‘7014.’ Therefore, we’ll select the second filtering option and specify the starting value.

![](/files/Rp9DbpDtL2vtoE9M3Vek)

Here’s a preview of the output:

![](/files/kaMhFyixVx52lexAvDTE)

* *Process if matches this regular expression***:** You can specify a regular expression to extract matching records.

In this example, we have specified a regular expression *‘\s\s+’* to retrieve all matching records.

![](/files/jK2DReuyqpSToYAHBnjq)

Here’s the preview of the output:

![](/files/Az4SJFFh7epXyR2H9PQ4)

Once you have selected the desired filter, click *OK*. The source object will retrieve the data accordingly and you can then consume this data in other transformation or loading processes further in the dataflow.

{% hint style="info" %}
**Note:** One thing to note while filtering data at the point of extraction is that these raw text filters can only be applied to the starting (left-most) position of a record. This means that making changes in the *Layout Builder* to bring a certain field at the starting (left-most) position and then applying a text filter won’t yield the desired output.

You will need to change the layout in the source file itself and place your required field(s) at the specified position to be able to filter out the required records.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/sources/raw-text-filters-in-file-sources.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.
