This type of analysis provide simple statistics on the number of records falling in certain categories, including the number of rows, the number of null values, the number of distinct and unique values, the number of duplicates, or the number of blank fields. For more information about these indicators, see Simple statistics.
It is also possible to add patterns to this type of analysis and have a single-bar result chart that shows the number of the rows that match "all" the patterns.
You can analyze the content of a set of columns in a delimited file. This set can represent only some of the columns in the defined table or the table as a whole.
You can then execute the created analysis using the Java engine.
Prerequisite(s): At least one connection to a delimited file is set in the Profiling perspective of the studio. For further information, see Connecting to a database.
When carrying out this type of analysis, the set of columns to be analyzed must not include a primary key column.
To define the set of columns to analyzed, do the following:
Defining the analysis
In the DQ Repository tree view, expand Data Profiling.
Right-click the Analyses folder and select New Analysis.
The [Create New Analysis] wizard opens.
In the filter field, start typing column set analysis, select Column Set Analysis from the list and click Next.
In the Name field, enter a name for the current analysis.
Avoid using special characters in the item names including:
"~", "!", "`", "#", "^", "&", "*", "\\", "/", "?", ":", ";", "\"", ".", "(", ")", "'", "¥", "'", """, "«", "»", "<", ">".
These characters are all replaced with "_" in the file system and you may end up creating duplicate items.
Set column analysis metadata (purpose, description and author name) in the corresponding fields and click Next to proceed to the next step.
Selecting the set of columns you want to analyze
Expand the FileDelimited connection and browse to the set of columns you want to analyze.
Select the columns to be analyzed, and then click Finish to close this [New analysis] wizard.
The analysis editor opens with the defined analysis metadata, and a folder for the newly created analysis is displayed under Analyses in the DQ Repository tree view.
A sample data is displayed in the Data Preview section and the selected columns are displayed in the Analyzed Column section of the analysis editor.
If required, select another connection from the Connection box in the Analyzed Columns view. This box lists all the connections created in the Studio with the corresponding database names.
By default, the delimited file connection you have selected in the previous step is displayed in the Connection box.
If required, click the Select columns to analyze link to open a dialog box where you can modify your column selection.
You can filter the table or column lists by typing the desired text in the Table filter or Column filter fields respectively. The lists will show only the tables/columns that correspond to the text you type in.
In the column list, select the check boxes of the column(s) you want to analyze and click OK to proceed to the next step.
In this example, you want to analyze a set of six columns in the delimited file: account number (account_num), education (education), email (email), first name (fname), last name (lname) and gender (gender). You want to identify the number of rows, the number of distinct and unique values and the number of duplicates.
If required, right-click any of the listed columns in the Analyzed Columns view and select Show in DQ Repository view. The selected column is automatically located under the corresponding connection in the tree view.
Use the delete, move up or move down buttons to manage the analyzed columns when necessary.
You can add patterns to one or more of the analyzed columns to validate the full record (all columns) against all the patterns, and not to validate each column against a specific pattern as it is the case with the column analysis. The results chart is a single bar chart for the totality of the used patterns. This chart shows the number of the rows that match "all" the patterns.
Before being able to use a specific pattern with a set of columns analysis, you must manually set in the patterns settings the pattern definition for Java, if it does not already exist. Otherwise, a warning message will display prompting you to set the definition of the Java regular expression.
Prerequisite(s): An analysis of a set of columns is open in the analysis editor in the Profiling perspective of the studio. For more information, see How to define the set of columns to be analyzed.
Click the icon next to each of the columns you want to validate against a specific pattern.
The [Pattern Selector] dialog box is displayed.
You can add only regular expressions to the analyzed columns.
You can drop the regular expression directly from the Patterns folder in the DQ Repository tree view directly to the column name in the column analysis editor.
If no Java expression exists for the pattern you want to add, a warning message will display prompting you to add the pattern definition for Java. Click Yes to open the pattern editor and add the Java regular expression, then proceed to add the pattern to the analyzed columns.
In this example, you want to add a corresponding pattern to each of the analyzed columns to validate data in these columns against the selected patterns. The result chart will show the percentage of the matching/non-matching values, the values that respect the totality of the used patterns.
In the [Pattern Selector] dialog box, expand Patterns and browse to the regular expression you want to add to the selected column.
Select the check box(es) of the expression(s) you want to add to the selected column, then Click OK.
The added regular expression(s) display(s) under the analyzed column(s) in the Analyzed Columns view and the
All Matchindicator is displayed in the Indicators list in the Indicators view.
What is left before executing this set of columns analysis is to define the indicator settings, data filter and analysis parameters.
Prerequisite(s):A column set analysis is defined in the Profiling perspective of the studio. For further information, see How to define the set of columns to be analyzed in a delimited file and How to add patterns to the analyzed columns in the delimited file.
Click Indicators in the analysis editor to open the corresponding view.
The indicators representing the simple statistics are by-default attached to this type of analysis. For further information about the indicators for simple statistics, see section Simple statistics.
Click the option icon to open a dialog box where you can set options for each indicator. For more information about indicators management, see Indicators.
In the Data Filter view, enter an SQL WHERE clause to filter the data on which to run the analysis, if required.
In the Analysis Parameters view, select the Allow drill down check box to store locally the data that will be analyzed by the current analysis.
In the Max number of rows kept per indicator field enter the number of the data rows you want to make accessible.
The Allow drill down check box is selected by default, and the maximum analyzed data rows to be shown per indicator is set to 50.
Save the analysis and press F6 to execute it.
The editor switches to the Analysis Results view and displays the graphical result corresponding to the Simple Statistics indicators used to analyze the defined set of columns.
When you use patterns to match the content of the set of columns, another graphic is displayed to illustrate the match and non-match results against the totality of the used patterns.
The procedure to filter the data of the analysis of a delimited file is the same as that for the database analysis. For further information, see How to filter data against patterns.