Clean Keys Operator

Overview

A static image displaying the Data Workflow component's Get Operator icon and configuration window.

The Data Workflow component's Clean Keys operator replaces empty or missing values with a string A string is an object that represents a sequence of characters. Strings typically hold data represented in text form. or number The Number data type accepts integer or floating point values. The number data type does not use quotes around numerical values. value.

In a module, table data stores in an array An array is a type of object that stores one or more data types. Data types supported in arrays include numbers, strings, and objects.. An array organizes data into keys A key-value pair is a fundamental data structure where a unique "key" is associated with a specific "value," used for organizing and retrieving data efficiently, like in dictionaries or databases. and values. The Clean Keys operator uses key names to create new keys and fill their values, or fill values in an existing key.

The operator has the following options for filling in data values:

  • Missing: Fills values for existing and non-existing keys. Adds a key if it does not exist in your data, and fills all values for that key.

  • Empty: Creates values in your data for existing keys.

  • Empty: Creates values in your data for existing keys.

You’ll find the Clean Keys operator under the Table group to the left of your Data Workflow canvas.

About the Info Window

Learn more about each setting in the Clean Keys operator's Info window:

Setting

Value

Category

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

Label

Sets the label for your operator, displaying below the operator on your Data Workflow canvas.

This field is optional, but set a label if you use more than one of the same operator type. A label helps you identify your operators without opening any Info windows.

Preserve Argument Type

When selected, this setting ensures the argument data type is respected when the operator executes.

Fill If

Select the types of keys or values that are modified by the operator:

  • Missing: Fills values for keys containing missing values. This option creates a key if it's missing from your data set. It also fills all values under the generated key with the value from Fill With.

If you add a value to your data set and then delete it, the value is set to Empty.

  • Empty: Fills data values that have a key but are empty.

  • Missing or Empty: Fills values for data sets that are missing a key, or that have a key and are missing values.

Keys

Enter your key names here for the following: 

  • For Missing keys, enter the replacement key name.

  • For Empty values, enter the replacement value.

You can enter more than one key name in this field.

Fill With

The value entered replaces the empty or missing value. If your key is Missing and does not exist on your data set, this field adds all data under the new key field. If your field is Empty, this field fills the values under the key name you entered.

Adding a Clean Keys Operator

Set up a data table that records employee AWS (Amazon Web Services) certification. Use a Data Workflow and Clean Keys operator to replace empty certification values with a value of none. Then, display the modified data using a ViewGrid component.

Configure the Data Table Component

Add a Data Table component containing the certification data with missing values.

1. In the Module Builder, drag and drop a Dropdown Component IconData Table component onto your canvas.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter dtAWSCertData.
3. In the data table, enter the following:

 

A B C D
1 firstName certification accountValue dateOfBirth

2

Blair aws solutions architect

1000000

07/23/90

3

JJ

 

678900

02/26/89

4

Jim

 

1000000

01/04/88

5

Evan

aws developer

null

 

6

Charlotte

aws security

5000000

02/01/91

7

Amy

aws database

5439294

 

8

Brian

aws machine learning

 

 

A static image displaying the dtAWSCertData data table.

4. Click Save Component.

Configure the Hidden Component

Add a Hidden component to store the output from the Data Workflow component. You'll set up a Data Workflow in the next section.

1. Drag and drop a Hidden component onto your canvas, placing it below your dtAWSCertData Dropdown Component IconData Table component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. and Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. fields, enter addedCert.
3. Click Save Component.

Configure the Data Workflow Component

Next, add a Data Workflow component and configure a Clean Keys operator to locate and replace missing values in the dtAWSCertDataDropdown Component IconData Table component's certification column. Additionally, add Console operators to view how the data is modified by the Clean Keys operator.

1. Drag and drop a Data Workflow component onto your canvas, placing it between the dtAWSCertData Dropdown Component IconData Table and addedCert Hidden components.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter dwfFillKeysIfEmpty.
3. In theCanvas Label Text Canvas Label Text indicates the purpose of the corresponding field or component. For non-input components, the Canvas Label Text isn't end-user facing, and only appears in the ., enter dwfFillKeysIfEmpty.

Configure the Input Operator

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

Category

Input

Component

dtAWSCertData

Required

Yes

Source

Default

Configure the First Console Operator

Next, configure a Console operator to display the dtAWSCertData data before manipulation.

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

Category

Console

Label

Input Data

3. Connect the output port (right) of the dtAWSCertData Input operator to the input port (left) of the Input Data Console operator.

Configure the Clean Keys Operator

Add the Clean Keys operator to fill the empty values in the certification column with a value of none.

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

Category

Clean Keys

Label

Fill Certification

Preserve Argument Type

☐ (unchecked)

Fill If

Empty

Keys

certification

Fill With

none

3. Connect the output port (right) of the dtAWSCertData Input operator to the input port (left) of the Fill Certification Clean Keys operator.

Configure the Second Console Operator

Add another Console operator to display the dtAWSCertData data after it passes through the Clean Keys operator.

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

Category

Console

Label

Fill Certification

3. Connect the output port (right) of the Fill CertificationClean Keys operator to the input port (left) of the Fill Certification Console operator.

Configure the Output Operator

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

Category

Output

Component

addedCert

Action

value

3. Connect the output port (right) of the Fill Certification Clean Keys operator to the input port (left) of the addedCert Output operator.
4. Click Save Component.

Here's how the completed Data Workflow looks:

A static image displaying the configured operators on the Data Workflow canvas.

Configure the ViewGrid Component

Set up a ViewGrid component to display the data after the Data Workflow manipulates the empty certification keys.

1. Drag and drop a Dropdown Component Icon ViewGrid component onto your canvas, placing it below your dwfFillKeysIfEmpty Data Workflow component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter vgCertificates.
3. In theCanvas Label Text Canvas Label Text indicates the purpose of the corresponding field or component. For non-input components, the Canvas Label Text isn't end-user facing, and only appears in the ., enter vgCertificates.
4. Navigate to the Data settings.
5. In the Inputs table, enter the following:
 

Source

Required

1

addedCert

☐ (unchecked)

6. In the Display table, enter the following: 
 

Display

Formula

Heading Type

1

firstName

 

First Name

 

2

certification

 

Certification

 

3

accountValue

 

Account Value

 

4

dateOfBirth

 

Date of Birth

 

A static image displaying the vgCertificates ViewGrid component.

7. Navigate to the Actions settings.
8. In the Action field, enter null.
9. Click Save Component.

Configure the Button Component

Lastly, configure a Button component to trigger the Data Workflow.

1. Drag and drop a Button component Icon Button component onto your canvas, placing it below the dwfSet Data Workflow component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter btnFillKeys.
3. In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. field, enter Fill Keys.
4. Navigate to the Actions settings.
5. From the Action Type drop-down, select Event.
6. From the On Click drop-down, enter or select dwfFillKeysIfEmpty.

A static image displaying the Button component's configuration settings.

7. Click Save Component.
8. Save your module.

Your completed module looks like the following:

A static image displaying the Module Builder.

Preview your module in Express View Express View is how your end-user views your application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View. and open the DevTools Console The DevTools Console helps you securely store, build, test, and deploy your software.. Click Fill Keys. Open each Console operator array and observe the difference between the certification values. The Clean Keys operator replaces missing certification values with the value of none.

A static image displaying the module in Express View.

Overview

A static image displaying the Data Workflow component's Get Operator icon and configuration window.

The Data Workflow component's Clean Keys operator replaces empty or missing values with a string A string is an object that represents a sequence of characters. Strings typically hold data represented in text form. or number The Number data type accepts integer or floating point values. The number data type does not use quotes around numerical values. value.

In a module, table data stores in an array An array is a type of object that stores one or more data types. Data types supported in arrays include numbers, strings, and objects.. An array organizes data into keys A key-value pair is a fundamental data structure where a unique "key" is associated with a specific "value," used for organizing and retrieving data efficiently, like in dictionaries or databases. and values. The Clean Keys operator uses key names to create new keys and fill their values, or fill values in an existing key.

The operator has the following options for filling in data values:

  • Missing: Fills values for existing and non-existing keys. Adds a key if it does not exist in your data, and fills all values for that key.

  • Empty: Creates values in your data for existing keys.

  • Empty: Creates values in your data for existing keys.

You’ll find the Clean Keys operator under the Table group to the left of your Data Workflow canvas.

About the Info Window

Learn more about each setting in the Clean Keys operator's Info window:

Setting

Description

Category

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

Label

Sets the label for your operator, displaying below the operator on your Data Workflow canvas.

This field is optional, but set a label if you use more than one of the same operator type. A label helps you identify your operators without opening any Info windows.

Preserve Argument Type

When selected, this setting ensures the argument data type is respected when the operator executes.

Fill If

Select the types of keys or values that are modified by the operator:

  • Missing: Fills values for keys containing missing values. This option creates a key if it's missing from your data set. It also fills all values under the generated key with the value from Fill With.

If you add a value to your data set and then delete it, the value is set to Empty.

  • Empty: Fills data values that have a key but are empty.

  • Missing or Empty: Fills values for data sets that are missing a key or that have a key and are missing values.

Keys

Enter your key names here for the following: 

  • For Missing keys, enter the replacement key name.

  • For Empty values, enter replacement value.

You can enter more than one key name in this field.

Fill With

The value entered replaces the empty or missing value. If your key is Missing and does not exist on your data set, this field adds all data under the new key field. If your field is Empty, this field fills the values under the key name you entered.

Adding a Clean Keys Operator

Set up a data table that records employee AWS (Amazon Web Services) certification. Use a Data Workflow and Clean Keys operator to replace empty certification values with a value of none. Then, display the modified data using a ViewGrid component.

Configure the Data Table Component

Add a Data Table component containing the certification data with missing values.

1. In the Module Builder, drag and drop a Dropdown Component IconData Table component onto your canvas.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. and Canvas Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. fields, enter dtAWSCertData.
3. In the data table, enter the following:

 

A B C D
1 firstName certification accountValue dateOfBirth

2

Blair aws solutions architect

1000000

07/23/90

3

JJ

 

678900

02/26/89

4

Jim

 

1000000

01/04/88

5

Evan

aws developer

null

 

6

Charlotte

aws security

5000000

02/01/91

7

Amy

aws database

5439294

 

8

Brian

aws machine learning

 

 

A static image displaying the dtAWSCertData data table.

4. Click Save & Close.

Configure the Hidden Component

Add a Hidden component to store the output from the Data Workflow component. You'll set up a Data Workflow in the next section.

1. Drag and drop a Hidden component onto your canvas, placing it below your dtAWSCertData Dropdown Component IconData Table component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. and Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. fields, enter addedCert.
3. Click Save & Close.

Configure the Data Workflow Component

Next, add a Data Workflow component and configure a Clean Keys operator to locate and replace missing values in the dtAWSCertDataDropdown Component IconData Table component's certification column. Additionally, add Console operators to view how the data is modified by the Clean Keys operator.

1. Drag and drop a Data Workflow component onto your canvas, placing it between the dtAWSCertData Dropdown Component IconData Table . and addedCert Hidden components.
2. In the Canvas Label Text and Property Name fields, enter dwfFillKeysIfEmpty.

Configure the Input Operator

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

Category

Input

Component

dtAWSCertData

Required

Yes

Source

Default

Configure the First Console Operator

Next, configure a Console operator to display the dtAWSCertData data before manipulation.

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

Category

Console

Label

Input Data

3. Connect the output port (right) of the dtAWSCertData Input operator to the input port (left) of the Input Data Console operator.

Configure the Clean Keys Operator

Add the Clean Keys operator to fill the empty values in the certification column with a value of none.

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

Category

Clean Keys

Label

Fill Certification

Preserve Argument Type

☐ (unchecked)

Fill If

Empty

Keys

certification

Fill With

none

3. Connect the output port (right) of the dtAWSCertData Input operator to the input port (left) of the Fill Certification Clean Keys operator.

Configure the Second Console Operator

Add another Console operator to display the dtAWSCertData data after it passes through the Clean Keys operator.

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

Category

Console

Label

Fill Certification

3. Connect the output port (right) of the Fill CertificationClean Keys operator to the input port (left) of the Fill Certification Console operator.

Configure the Output Operator

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

Category

Output

Component

addedCert

Action

value

3. Connect the output port (right) of the Fill Certification Clean Keys operator to the input port (left) of the addedCert Output operator.
4. Click Save.

Here's how the completed Data Workflow looks:

A static image displaying the configured operators on the Data Workflow canvas.

Configure the ViewGrid Component

Set up a ViewGrid component to display the data after the Data Workflow manipulates the empty certification keys.

1. Drag and drop a Dropdown Component Icon ViewGrid component onto your canvas, placing it below your dwfFillKeysIfEmpty Data Workflow component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter vgCertificates.
3. In theCanvas Label Text Canvas Label Text indicates the purpose of the corresponding field or component. For non-input components, the Canvas Label Text isn't end-user facing, and only appears in the ., enter vgCertificates.
4. Navigate to the Data settings.
5. In the Inputs table, enter the following:
 

Source

Required

1

addedCert

☐ (unchecked)

6. In the Display table, enter the following: 
 

Display

Formula

Heading Type

1

firstName

 

First Name

 

2

certification

 

Certification

 

3

accountValue

 

Account Value

 

4

dateOfBirth

 

Date of Birth

 

A static image displaying the vgCertificates ViewGrid component.

7. Navigate to the Actions settings.
8. In the Action field, enter null.
9. Click Save.

Configure the Button Component

Lastly, configure a Button component to trigger the Data Workflow.

1. Drag and drop a Button component Icon Button component onto your canvas, placing it below the dwfSet Data Workflow component.
2. In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter btnFillKeys.
3. In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. field, enter Fill Keys.
4. Navigate to the Actions settings.
5. Set the Action Type to Event.
6. In the On Click field, enter or select dwfFillKeysIfEmpty.
7. Click Save & Close.
8. Save your module.

Your completed module looks like the following:

A static image displaying the Module Builder.

Preview your module in Express View Express View is how your end-user views your application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View. and open the DevTools Console The DevTools Console helps you securely store, build, test, and deploy your software.. Click Fill Keys. Open each Console operator array and observe the difference between the certification values. The Clean Keys operator replaces missing certification values with the value of none.

A static image displaying the module in Express View.