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.

In this document, we will learn how to create Field Profile in Astera Centerprise.

Using Field Profile

In this case, we have Invoice data extracted from a sample Database Table Source.

1_data

We want to collect detailed statistic on some of these fields of data and write it to a Delimited File Destination. For this purpose, we will use Field Profile feature of Centerprise.

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

2_toolbox

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

3_object

You can see that the dragged Field Profile object contains an Input node and an Output node. Input node is empty because we haven’t mapped any fields on it yet.

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

4_mappings

Note: Statistics will be collected only for the fields linked to the Input port of the Field Profile object. This way, you can selectively collect statistics for a subset of fields from the selected field layout.

Configuring the Field Profile Object

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

5_properties

A configuration window will open. First screen is Layout Builder screen. This is where we can create or delete fields, change its name and data type.

6_layout

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

7_statistics_type

Field Statistics dropdown allows you to select detail levels of statistic 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 is 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 are collecting a Detailed Statistics – Case Sensitive Comparison.

8

Click OK.

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

9_preview_output

A Data Preview window will open up showing you the statistics of each mapped field as a record.

10_data_preview

Writing to a Destination

Observe that the Field Profile object contains an Output node. On expanding, you will see various statistical measures as fields with output nodes.

11_output

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.

12_mapping

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

13_destination

3. Configure settings for Delimited File Destination from here.

Executing the Task

1. After configuring the settings for Delimited File Destination object, click on Start Dataflow icon ![11_ icon](creating-field-profiles.assets/11_ icon.PNG)from the toolbar at the top.

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

14_progress

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