Data Analysis in Contour4. Derive A New Column

4 - Derive a new Column

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

Notice that there is an origin and a destination column for each flight but no column that represents the route (e.g., ATL-SFO). To better represent routes in your analysis, you’ll create a new route column.

🔨 Task Instructions

  1. Click on the Transform category in the action ribbon, located at the bottom of your Contour path.
  2. Select the Expression board.
  3. In the Expression board, select the green ⊕ Write new expression button. If you do not see this button, you can alternatively select Editor on the top left side of your board.
  4. Select Add new column and enter in route as the name of your new column.
    • ℹ️ The name route is case-sensitive and should be entered using all lowercase letters.
  5. In the expression editor (i.e. next to the “1”), add the expression code provided below. concat_ws('-', "origin", "dest")
  6. Click Apply in the lower-right corner of the board.

The world of expressions is vast, providing analysts with a multitude of options when configuring and shaping a dataset. Review the expression board documentation below and utilize the reference document, as need.