# Creating Field Profile

The *Field Profile* feature captures statistics for selected fields from one or several objects. *Field Profile* is essentially a transformation object as it provides Input and Output ports similar to other transformations.

These output ports make it possible to feed the statistics collected to another object on the dataflow.

{% embed url="<https://youtu.be/BQPSsux2_n4>" %}

## **Using Field Profile**

In this case, we have extracted data from a sample *Invoices* [*Database Table Source*](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/sources/database-table-source).

<figure><img src="/files/lY0UyqVv5Sw8UmyvMbjv" alt=""><figcaption></figcaption></figure>

We want to collect detailed statistics from some of these fields of data and write them to a *Delimited File Destination*. For this purpose, we will use Astera's *Field Profile* feature.

1. To get a *Field Profile* object from the Toolbox, go to *Toolbox > Data Profiling > Field Profile*. If you are unable to see the toolbox, go to *View > Toolbox* or press Ctrl + Alt + X.

<figure><img src="/files/1SRXEtBbP5jIJaHgf8MM" alt=""><figcaption></figcaption></figure>

2. Drag and drop the *Field Profile* object onto the dataflow designer.

<figure><img src="/files/VyDCDcmNRxR8FrD8sdGL" alt=""><figcaption></figcaption></figure>

You can see that the dragged *Field Profile* object contains an *Input* node and an *Output* node. The *Input* node is empty as we have not mapped any fields to it yet.

3. One-by-one map *ShipName, CustomerID, Country, OrderDate, ProductName, UnitPrice,* and *Quantity* from the source object to the *Field Profile* object’s *Input* node.

<figure><img src="/files/JVMgh7RYdmB3Q7LZT8NS" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** Statistics will be collected only for the fields linked to the *Input* node of the *Field Profile* object. This way, you can selectively collect statistics for a subset of fields from the selected field layout.
{% endhint %}

## **Configuring the Field Profile Object**

1. To configure the *Field Profile* object, right-click on its header and select *Properties* from the context menu.

<figure><img src="/files/tOaz6v1VnXnDjoJJ5aub" alt=""><figcaption></figcaption></figure>

A configuration window will open. On the first screen, you will see the *Layout Builder*. This is where we can create or delete fields, and change their name, and data type.

<figure><img src="/files/dUeV1iEDrSA3BMPmoeka" alt=""><figcaption></figcaption></figure>

2. Click *Next*. On the *Properties* window, specify the *Statistics Type* from the dropdown list.

<figure><img src="/files/moWTOqjxjAC2hDgWEqjk" alt=""><figcaption></figcaption></figure>

*The Field Statistics* dropdown allows you to select detailed levels of statistics to collect. Select among the following detail levels:

* *Basic Statistics*: This is the default mode. It captures the most common statistical measures for the field’s data type.
* *No Statistics*: No statistics are captured by the *Data Profile*.
* *Detailed Statistics – Case Sensitive Comparison*: Additional statistical measures are captured by the *Data Profile*, for example, Mean, Mode, Median, etc. using case-sensitive comparison for strings.
* *Detailed Statistics – Case-Insensitive Comparison*: Additional statistics are captured by the *Data Profile*, using case-insensitive comparison for strings.

In this case, we will select *Detailed Statistics – Case Sensitive Comparison.*

<figure><img src="/files/cU7oP48zuig88dkGd8t6" alt=""><figcaption></figcaption></figure>

Click *OK*.

3. Right-click on the *Field Profile* object’s header and select *Preview Output* from the context menu.

<figure><img src="/files/A0YkxF4SELCytBm6jRG8" alt=""><figcaption></figcaption></figure>

A *Data Preview* window will open and show you the statistics of each mapped field as a record.

<figure><img src="/files/HWXDYtWDogivE2Fez4LD" alt=""><figcaption></figcaption></figure>

## **Writing to a Destination**

Observe that the *Field Profile* object contains an *Output* node. Once expanded, you will see various statistical measures as fields with output ports.

<figure><img src="/files/zBJSqWyML32vxwKdN9ta" alt=""><figcaption></figcaption></figure>

We can write these statistical measures to a destination file.

1. Right-click on the *Output* node and go to *Write To > Delimited File Destination*.

<figure><img src="/files/UWpD26qAnDP3vKbjSVNY" alt=""><figcaption></figcaption></figure>

A *Delimited File Destination* object will be added to the dataflow designer with auto-mapped fields from the *Output* node.

<figure><img src="/files/rm7UtADSecwlSgr9Dxhg" alt=""><figcaption></figcaption></figure>

2. Configure settings for your [*Delimited File Destination*](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/destinations/delimited-file-destination).

## **Executing the Task**

1. After configuring the settings for the *Delimited File Destination* object, click on the *Start Dataflow* icon ![](/files/moW1hYOfEaWNFBa56q12)from the toolbar located at the top of the window.

A *Job Progress* window will open at this instant and will show you the trace of the job.

<figure><img src="/files/5TVYUMV1oFlFc2nbqv3k" alt=""><figcaption></figcaption></figure>

You can open the delimited file that contains field statistics from the link provided in the *Job Progress* window.


---

# 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-v8/dataflows/data-logging-and-profiling/creating-field-profile.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.
