cancel
Showing results for 
Search instead for 
Did you mean: 
Community 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:

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!