ext_onelake, then write results to a CDF destination.
Write the SQL
Reference the source byexternalId:
For a data model destination, map columns to view properties and include
externalId:
Incremental loads with is_new
By default, each run reads the full Delta table. Incremental loads need aTIMESTAMP or epoch-millisecond LONG column that your pipeline updates when a row changes. Fabric does not create or update that column. You must populate it on every insert and update, then pass it to is_new(). CDF stores the high-water mark; the first run processes all rows.
Preview runs validate the query but do not advance the watermark. For general
is_new patterns, see SQL patterns and best practices.
Create and run the transformation
The examples use theCDF_BASE and CDF_TOKEN values from Register with the API.
Prepare the destination
For a data model destination, the target must already exist in CDF before you create the transformation:- The space that contains the view.
- The view (
space,externalId, andversion) that defines the properties you map in SQL. - The instance space where the transformation writes nodes or edges.
Create the transformation
Create a transformation with a data model destination (example):
Replace these example values with your own:
The SQL column aliases, such as
externalId and name, must match the property names of your view.
Run the transformation with the API
A transformation needs a session to read from the Fabric source and write to the destination. You create the session, bind it to the transformation, and then run it.1
Create a session
Call
POST /sessions with token exchange. The session runs as the identity that issued CDF_TOKEN, which needs sessionsAcl:CREATE. The response contains the session id and a nonce. The nonce expires after about one minute, so bind it right away.Use token exchange for a one-time run as the current user. For a scheduled or long-running job, create the session with clientId and clientSecret instead. See Sessions.2
Bind the session to the transformation
Pass the session See Transformations.
id and nonce as sourceNonce and destinationNonce. You can use the same session and nonce for both:3
Run the transformation
Call The response contains the job ID. Track the job with the Transformation jobs API, or see Monitor Fabric OneLake transformations.
POST /transformations/run with the transformation externalId: