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: 

Lakehouse federation bringing data from SQL Server

NathanSundarara
Contributor

Did any one tried to bring data using the newly announced Lakehouse federation and ingest using DELTA LIVE TABLES? I'm currently testing using Materialized Views. First loaded the full data and now loading last 3 days daily and recomputing using Materialized views. At this time materialized view is doing full recompute. Some of the records may be already existing in the current materialized view , we are doing window functions to recompute and keep last record based on time stamp. Tried to do DLT using Apply changes it gives error because the data changed so looking for options.

 

1 REPLY 1

Nam_Nguyen
Databricks Employee
Databricks Employee

Hi @NathanSundarara , regarding your current approach, here are the potential solutions and considerations
Deduplication: Implement deduplication strategies within your DLT pipeline. For example

clicksDedupDf = (
  spark.readStream.table("LIVE.rawClicks")
  .withWatermark("clickTimestamp", "5 seconds")
  .dropDuplicatesWithinWatermark(["userId", "clickAdId"])
)

SCD Type 2: If you need to maintain historical changes, consider implementing Slowly Changing Dimension Type 2 (SCD Type 2) logic in your DLT pipeline

Some possible optimizations for performance

- Incremental Processing: Ensure your DLT pipeline is configured for incremental processing where possible

- Partitioning: Properly partition your data based on the timestamp column you're using for updates to improve query performance.

Please let me know if you want to discuss further on any of the above points

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