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: 

Issue with merge command between streaming dataframe and delta table

Venu_DE1
New Contributor

Hi,

We are trying to build and upsert logic for a Delta table for that we are writing a merge command between streaming dataframe and delta table dataframe. Please find the below code

    merge_sql = f"""
        Merge command come here
"""
spark.sql(merge_sql).writeStream \
.format("delta") \
.outputMode("append") \
.option("checkpointLocation", "bbbbb") \
.option("mergeSchema", "true") \
.option("path","aaaaaaa") \
.toTable(f"{target_catalog}.{target_schema}.silver_{sl_tablename}")
 
 
getting this below error. Please help us on how to resolve this error.
Error during merge operation on 'tablename': Queries with streaming sources must be executed with writeStream.start();
 
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