Exclusion Tab in SSIS Term Extraction Transformation

In this article, we are going to show you, How to use the Exclusion Tab while extracting the Noun Phrases using SSIS Term Extraction Transformation.

Before reading this SSIS Exclusion Tab article, Please refer to the Term Extraction article for the definition and the functionality of this Transformation. And Extract Noun Phrases Using Term Extraction Transformation article to understand How to Extract Noun Phrases from the Source Data in SSIS.

The below screenshot shows our source data

Source Table

Let us see the Exclusion List as well

SSIS Term Extraction Transformation Exclusion Tab configuration

In this example, we will display all the Noun Phrases present in the source data except the above names.

Configure Exclusion Tab in SSIS Term Extraction Transformation

STEP 1: Open BIDS and Drag and drop the data flow task from the toolbox to control flow. Next, rename it as Exclusion Tab in SSIS Term Extraction Transformation.

Exclusion Tab in SSIS Term Extraction Transformation 1

STEP 2: Drag and drop OLE DB Source, Term Extraction Transformation, and OLE DB Destination from the toolbox to the data flow region

Exclusion Tab in SSIS Term Extraction Transformation 2

Double click on the OLE DB source in the data flow region will open the connection manager settings. It provides space to write our SQL statement. For more Transformations >> Click Here.

Exclusion Tab in SSIS Term Extraction Transformation 3

Here, we selected the below Database as our source database, and the SQL Command we used is:

SELECT [Player Information]
FROM [Term Extraction Transformation Source]

STEP 4: Click on the columns tab to verify the columns.

Exclusion Tab in SSIS Term Extraction Transformation 4

Drag the OLE DB source output arrow onto the Term Extraction Transformation to perform a transformation on the source Data.

STEP 5: Double click on the Term Extraction Transformation to configure it. Within the Term Extraction tab, pick the column you want to use for the Term Extraction from the available input columns. We left the output column names to default Term and Score.

Exclusion Tab in SSIS Term Extraction Transformation 5

Exclusion Tab: Here, we want to exclude the country names (We showed earlier) from the Noun Phrases. For this reason, Let us configure OLE DB Connection Manager and exclusion terms.

Exclusion Tab in SSIS Term Extraction Transformation 6

We selected the [Exclusion List in Term Extraction] table from the above screenshot from the Database. We picked CountryName from this table because it contains exclusion terms, such as country names.

STEP 6: In this example, we are extracting Noun Phrases only. So, we selected Noun Phrases as the term type and the Frequency Threshold as 1. Please refer to the Extract Nouns Using Term Extraction Transformation article to understand, How to Extract Nouns from the Source Data. Also, refer to Extracting Noun Phrases Only and Extract Nouns and Noun Phrases articles.

Exclusion Tab in SSIS Term Extraction Transformation 7

From the below screenshot, you can see there is a warning symbol on the Term Extraction Transformation. You can remove the warning symbol by configuring the error output of Term Extraction Transformation. So double-clickering on the Configure Error Output button will open a new window to set the error output.

The default configuration of a Term Extraction Transformation is to redirect error rows. You can eliminate this warning by connecting the error output or changing the default behavior to Ignore Failure or Fail Component. Let’s change to Ignore Failure

Exclusion Tab in SSIS Term Extraction Transformation 8

Click ok to finish configuring the Term Extraction Transformation.

STEP 7: Now, provide the Server, database, and table details of the destination using the OLE DB Destination.

OLE DB destination editor 9

Here, we selected the destination data source (localhost as server instance) and [Term Extraction Transformation Exclusion Tab] table as our destination table

STEP 8: Click on the Mappings tab to verify whether the source columns are exactly mapped to the destination columns. 

Column mapping 10

Click ok to finish designing our Exclusion Tab in the SSIS Term Extraction Transformation package. Let us run the package

Exclusion Tab in SSIS Term Extraction Transformation 11

If you don’t include the Exclusion list, the output will be the same as below:

Destination Table 11

Let’s open the SQL Server Management Studio and check the results after adding the Exclusion List in the SSIS Term Extraction Transformation

Exclusion List Table 12