cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.