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
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.
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.