Introduction to Contour16. Configure The Expression Board

16 - Configure the Expression Board

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

📖 Task Introduction

The Expression Board allows you to apply common SparkSQL-based expressions to your data using a library of available expressions that you can write yourself. Contour also maintains a library of expressions you can reference and contribute to. These are expressions that other Contour users have saved and are available for your use.

Let's write a new, simple expression that will calculate the average speed on a flight.

🔨 Task Instructions

  1. The Expression Editor view surfaces four buttons for different types of new expressions to add. Keeping that selection on its default of Add new column, select the New column name field and type in speed in lowercase.
  2. Click into the large code field beneath the New column name field. The code field takes up most of the current view of the Expression Board and has a 1 to the left of it. Copy "distance"/("actual_elapsed_time"/60) and paste it into the code field, then click on Apply at the bottom of the Expression board.