cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

DLT: Only STREAMING tables can have multiple queries.

coltonflowers
New Contributor III

I am trying to to do a one-time back-fill on a DLT table following the example here:

 

dlt.table()
def test():
    # providing a starting version
    return (spark.readStream.format("delta") 
        .option("readChangeFeed", "true") 
        .option("startingTimestamp", "2024-01-7 05:00:00") 
        .table("LIVE.concepts_to_flag")
        .select("group_id","cui","cel_label",F.array([F.lit("fake")]),F.lit(True))
    )
@dlt.append_flow(target = "test")
def backfill():
  return spark.readStream.option("endingTimestamp", "2024-01-7 05:00:00").table("hive_metastore.gold.flagged_entities")

 

However, after validating this pipeline, get the following error:

 

org.apache.spark.sql.AnalysisException: 'test' contains multiple queries 'test,backfill'. Only STREAMING tables can have multiple queries.

 

1 REPLY 1

coltonflowers
New Contributor III

I should also add that when I drop the `backfill` function, validation happens successfully and we get the following pipeline DAG:

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