Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2025 03:32 AM - edited 09-11-2025 03:32 AM
Hi @km1837 ,
Instead of trying to implement a stream table on a stream table, for your use case I think using Materialized View on next child table would be the best choice.
For e.g.:
@dlt.table(name="workspace.silver.current_product")
def sample_trips_stream():
return dlt.read(SOURCE_FULL).filter("__end_at IS NULL")
Materialized views are refreshed using one of two methods.
- Incremental refresh - The system evaluates the view's query to identify changes that happened after the last update and merges only the new or modified data.
- Full refresh - If an incremental refresh can't be performed, the system runs the entire query and replaces the existing data in the materialized view with the new results.
I have also tried to replicate your solution by defining a SCD type 2 in bronze and SCD type 1 in silver, it doesn't work, it throws an error regarding the SCD. So not sure if that would be possible to implemented it that way in DTL.
Hope that helps. Let me know how it goes!
Best, Ilir