cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify which columns to use when using DLT APPLY CHANGES INTO

Magnus
Contributor

I have a notebook with the code below, where I try to do an upsert into a dimension table and only include one column from the source table. I get an error even though I think the syntax matches what I see in the docs. How can I write this in the correct way?

CREATE OR REFRESH LIVE TABLE D_AzureResourceType_DLT
(
  WkAzureResourceType bigint GENERATED ALWAYS AS IDENTITY,
  ConsumedService string NOT NULL
);
 
APPLY CHANGES INTO
  LIVE.D_AzureResourceType_DLT
FROM
  STREAM(LIVE.AzureCost)
KEYS
  (ConsumedService)
SEQUENCE BY
  Date
COLUMNS (ConsumedService);

Currently, the "Initializing" step in the Delta Live Tables workflow fails with this error:

Error

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group