Skip to main content
Transformation: Keep

Use the Keep transformation to selectively retain essential columns while removing all others, streamlining your dataset.

Quin Eddy avatar
Written by Quin Eddy
Updated this week

The Keep transformation in Nexadata Pipelines allows you to selectively retain specific columns in your dataset, removing all other columns not selected. This transformation is useful when you need to reduce a dataset to only relevant fields, improving data clarity and reducing unnecessary information. Depending on the level of control required, you can configure the transformation using Natural Language Mode or Advanced Mode.


Inputs for the Keep Transformation

  1. Name of the Transformation: In Natural Language Mode, the transformation name is automatically generated, but you can update it later in Advanced Mode. For instance, you might rename it to "Keep Essential Columns Only" or "Retain Employee and Salary Details".

  2. Columns to Keep: Select the columns you want to retain in your dataset. All other columns not selected will be removed. For example, you might choose to keep only "Employee_ID", "Employee_Name", and "Salary" columns.


Using Natural Language Mode

In Natural Language Mode, simply describe the columns you want to keep, and Nexadata will automatically configure the transformation. The transformation name is auto-generated but can be modified later in Advanced Mode.

Example Instructions in Natural Language Mode

  • Keep only the Employee_ID and Department columns.

  • Retain Name, Job_Title, and Salary columns, and remove all others.

  • Keep columns for Revenue and Expenses only.

  • Keep Department_Name and Department_Code columns, remove the rest.

  • Retain only Employee_ID and Performance_Score.

Note: If Natural Language Mode doesn’t fully capture your requirements, you can switch to Advanced Mode for additional adjustments.


Using Advanced Mode

In Advanced Mode, you have full control over the Keep transformation, allowing you to manually select which columns to retain while removing others. Advanced Mode allows for detailed control, ensuring the transformation precisely aligns with your analytical needs.

Steps in Advanced Mode

  1. Name of the Transformation: Enter or update a custom name, such as "Retain Key Columns" or "Keep Sales Data Only".

  2. Columns to Keep: Select the columns you want to retain. For instance, choose columns like "Employee_ID", "Salary", or "Department" if those are the only fields you need in your analysis.


Example Use Case

The Keep transformation is ideal for focusing on specific data points. For example, suppose you have a comprehensive employee dataset and only need the Employee_ID, Employee_Name, and Salary columns for a specific analysis. For example:

  • Transformation Name: Keep Essential Employee Data

  • Columns to Keep: Employee_ID, Employee_Name, Salary

This configuration will remove all columns except Employee_ID, Employee_Name, and Salary, streamlining the dataset to the essential information required.


Summary

The Keep transformation in Nexadata Pipelines enables selective column retention, helping you reduce datasets to only the most relevant information. Use Natural Language Mode for a quick setup or Advanced Mode for detailed control. This transformation is ideal for refining datasets by keeping only necessary columns and removing extraneous data.

Did this answer your question?