Skip to main content
Transformation: Shift

Use the Shift transformation in Nexadata Pipelines to reposition columns to the start, end, or relative to another column.

Quin Eddy avatar
Written by Quin Eddy
Updated this week

The Shift transformation in Nexadata Pipelines allows you to reposition a selected column within your dataset. You can move the column to the beginning, end, or position it relative to a reference column. This transformation is ideal for customizing the layout of your data, making it easier to prioritize certain columns for analysis or reporting. You can configure the transformation using Natural Language Mode or Advanced Mode, depending on the level of control required.


Inputs for the Shift 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 example, you might rename it to "Move Department Code to First Position" or "Reposition Total Sales".

  2. Column to Shift: Select the column you want to reposition within the dataset. For example, "Employee_ID", "Department_Code", or "Total_Sales".

  3. Position of the New Column: Choose where the column should be placed in the dataset:

    • First: Moves the column to the beginning of the dataset.

    • Last: Moves the column to the end of the dataset.

    • Before: Positions the column before another specified column.

    • After: Positions the column after another specified column.

  4. Reference Column: If you select Before or After as the position, specify a reference column that will determine where the selected column is placed.


Using Natural Language Mode

In Natural Language Mode, simply describe the shift operation you want to perform, 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

  • Move the Employee_ID column to the first position.

  • Place Total_Sales at the end of the dataset.

  • Shift Department_Code to be before Employee_Name.

  • Reposition Start_Date column to appear after End_Date.

  • Move Status column to last position in the dataset.

Note: If Natural Language Mode doesn’t fully capture the transformation you need, you can switch to Advanced Mode to make adjustments.


Using Advanced Mode

In Advanced Mode, you have full control over the Shift transformation, allowing you to manually specify the column, desired position, and reference column for precise placement. 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 for the transformation, such as "Shift Employee ID to First Position" or "Move Status to Last Position".

  2. Column to Shift: Select the column you wish to reposition, such as "Employee_ID" or "Total_Sales".

  3. Position of the New Column: Choose where to place the column:

    • First: Move the column to the start of the dataset.

    • Last: Move the column to the end of the dataset.

    • Before or After: Specify if the column should be moved before or after another column.

  4. Reference Column: If you select Before or After as the position, choose a reference column that will serve as the placement point for the selected column.


Example Use Case

The Shift transformation is particularly useful when you want to organize columns for reporting purposes. For example, suppose you have a Department_Code column and want to make it the first column in the dataset. For example:

  • Transformation Name: Shift Department Code to First Position

  • Column to Shift: Department_Code

  • Position of the New Column: First

This transformation will move Department_Code to the start of the dataset, making it the first column.


Summary

The Shift transformation in Nexadata Pipelines allows you to reorder columns in your dataset by moving selected columns to the beginning, end, or in relation to another column. Use Natural Language Mode for a quick setup or Advanced Mode for detailed control. This transformation is ideal for organizing data for analysis, reporting, or presentation.

Did this answer your question?