Write SQL queries
Transform data from the CDF staging area into a data model using built-in and custom Spark SQL queries. Select Switch to SQL editor on the Transform data page to create a transformation in Spark SQL. This article describes the queries and explains how you can load data incrementally.
Tip
The SQL editor offers built-in code completion and built-in Spark SQL functions and Cognite custom SQL functions.
Note
Your changes won't be kept if you switch from the SQL editor to the mapping editor.
Read from a CDF staging table
To select data from a CDF staging table, use the syntax mydb.mytable
:
select
*
from
database-name.table-name