Omit Operator

Overview

With the Omit operator, you can easily remove specific data points from a data set. You'll do this by first referencing keys in the operator's Info window. Then, the operator removes the keys you've entered (and their values) from any data passed.

To get a clear picture of how this works, it's important to also understand how data is stored in an array. In a data table, a key refers to a single column. So, if you have a data set of student information, you might have a column with the key name. To work with this data without the student names column, you'd add an Omit operator to your Data Workflow.

Let's say you only need parts of a data set to go through your Data Workflow. Removing the data irrelevant to your task can help boost an application's efficiency.

Or maybe you're working with sensitive end-user data. Then, you might not want to include every piece of data for security purposes. In those situations, you'll also use an Omit operator. Here, you'll configure the operator to exclude any sensitive data.

You might also be merging data in your Data Workflow. If that's the case, sometimes you'll have duplicate merge indexes in your final data. To remove those indexes, you can use an Omit operator.

NOTE  The Omit operator does not delete the data from your original data set. The Omit operator only excludes data as it passes through your Data Workflow.

You’ll find the Omit operator under the Table group at the left of the Data Workflow canvas.

What You'll Learn

In this article, you'll learn:

About the Info Window

Here's what the Omit operator looks like, along with its Info window:

And here's a breakdown of each setting in the Info window:

Setting

Description

Category

Grayed out and non-adjustable setting indicating the operation type.

Label

Sets the label for the operator. The label you enter here appears below the operator in the Data Workflow canvas.

This field is optional, but you'll want to set a label if you're using more than one of the operator type. A label can help you identify your operators without having to open any info windows.

Omit Keys

Enter the key for any data you want the operator to remove. When working with a data table, the key is the name of the column you want removed. You can remove more than one key using a single operator. Separate each new key in this field by a comma.

You can also set your Omit Keys using an argument. To do that, connect an Input operator to the operator's argument port. Then, enter _arg in this field. Remember that the value passed using an argument must still match a key in your data set.

Adding an Omit Operator

In this use case, you'll learn how to exclude sensitive information from the output of your Data Workflow. After creating a Data Table holding account information, you'll set the operator's key to remove all account value information from the output.

Here's how the completed use case will look in the Module Builder:

Here's how the completed use case will look in Express View along with a look at the DevTools Console:

What You'll Need

To set up this use case, you’ll need:

  • 1 Data Table component

  • 1 Button component

  • 1 Data Workflow component

To set up your Data Workflow, you'll need:

  • 1 Input operator

  • 1 Omit operator

  • 1 Console operator

NOTE  These instructions assume you have a new module open, saved, and with a title.

Configure the Data Table Component

First, let's set up your list of account details. You'll use a Data Table component to hold this information.

1. In the Module Builder, drag and drop a Data Table component onto your canvas.
2. Enter dtAccounts in the Label and Property Name fields.
3. In the data table, enter the following:
firstName accountValue accountNumber appStatus
       

Blair

543891

12345

 

JJ

1000000

12346

 

Jim

1000000

12347

 

Evan

7432572

12348

 

Charlotte

5000000

12349

 

Amy

5439294

12350

 

Brian

17890

12351

 

Rupert

19578

12352

 

Emily

54389

12353

 

4. Click Save.

Configure the Data Workflow Component

Now, let's set up your Data Workflow. You'll configure your Omit operator to output your data without 2 of the original columns.

1. Drag and drop a Data Workflow component onto your canvas. Place your Data Workflow below your Data Table.
2. Enter dwfOmitKeys in the Canvas Label Text and Property Name fields.

Configure the Input Operator

1. Drag and drop an Input operator onto your Data Workflow canvas.
2. Configure the Input operator's Info window as follows:

Setting

Value

Category

Input

Component

dtAccounts

Required

Yes

Source

Default

Configure the Omit Operator

1. Drag and drop an Omit operator onto your Data Workflow canvas.
2. Configure the Omit operator's Info window as follows:

Setting

Value

Category

Omit

Label

Omit Status and Value

Omit Keys

appStatus,accountValue

3. Connect the output port (right) of the Input operator to the input port (left) of the Omit operator.

Configure the Console Operator

1. Drag and drop a Console operator onto your Data Workflow canvas.
2. Configure the Console operator's Info window as follows:

Setting

Value

Category

Console

Label

Omitted Keys

3. Connect the output port (right) of the Omit operator to the input port (left) of the Console operator.
4. Click Save.

Configure the Button Component

1. Drag and drop a Button component onto your canvas. Place your Button below your Data Workflow.
2. Enter btnOmitKeys in the Property ID field.
3. Enter Omit Keys in the Label Text field.
4. Select Event as the Action Type.
5. Enter dwfOmitKeys in the Trigger on Click field.
6. Click Save.
7. Save your module.

Now it's time to test your work. Preview your module in Express View and open the DevTools Console. Now, click your Omit Keys button. In your Omitted Keys Console, you'll see all columns from your data table except appStatus and accountValue.

Changing an Omit Operator's Settings

You can revisit and make changes to this operator.

1. Click the Data Workflow component.

A 5-button toolbar displays above the component on hover-over.

2. Click the (Settings) button to open the Data Workflow canvas.
3. Click the operator to open its Info Window.
4. Make changes to the operator's settings as needed.
5. Click Save.
6. Save your module.

Copying an Omit Operator

You can make a copy of your operator using familiar keyboard settings. You can copy and paste an exact copy of your operator, matching all settings.

1. Hover over the Data Workflow component.

A 5-button toolbar displays above the component on hover-over.

2. Click the (Settings) button to open the Data Workflow canvas.
3. Click the operator you want to duplicate.
4. On your keyboard, press Command + C (Mac OS) or Ctrl + C (Windows/Linux) to copy the operator.

TIP  You can copy more than one operator at a time. Hold Command or Ctrl on your keyboard and click all the operators you want to copy. Follow the rest of the steps as usual.

5. On your keyboard, press Command + V (Mac OS) or Ctrl + V (Windows/Linux) to paste the copied operator(s) to the Data Workflow canvas.
6. Click Save.
7. Save your module.

TIP  Did you know you can copy an operator and paste it into a different Data Workflow? You'll use the same steps outlined above.

Removing an Omit Operator

Lastly, you can delete this operator from your Data Workflow canvas. You can also use these same steps to delete a connection between two operators.

1. Hover over the Data Workflow component.

A 5-button toolbar displays above the component on hover-over.

2. Click the (Settings) button to open the Data Workflow canvas.
3. Click the operator you want to delete.
4. On your keyboard, press Delete.

NOTE  Once you delete this operator, make sure to connect your remaining operators. If your Data Workflow path doesn't end with an Output or Console operator, your Data Workflow won't work. So, once you delete an operator, make sure to update any remaining paths to end at an Output or Console operator.

5. Click Save.
6. Save your module.

Lab

You can view this complete use case here: https://training.unqork.io/#/form/604b96314cf09403450dc6ac/edit.