Ranga_naik1180
Databricks Partner

Hi @nikhilj0421  Thanks for your clarification,if i use python dlt code for me solution is working ..but i just need another help 

for below code what will be the equivalent SQL code .. when i'm trying to use 

create or replace temporary view intermediate_view as select * from table_chnage(source,2) where _change_type("insert");

apply_chnages into 

target_table="golde_layer_tbl"

source_table="intemediate_view" if give like this getting an error that view is not a stream table so ..how i can tackle this ..

 

@dlt.view

def intermediate_update_view():

  return (

    spark.readStream

    .option("readChangeFeed", "true")

    .table("source_table")

    .filter(col("_change_type").isin(["update_postimage", "insert", "delete"]))

  )