Sitemap
DBSQL SME Engineering

Publication for content from the DBSQL SME group and the surrounding community on DBSQL best practices, new design patterns, creative solutions, and real world user stories all in one place.

Data Federation vs Data Ingestion: updated guidance on an optimal strategy for the integration of external data sources on Databricks

8 min readApr 11, 2025

--

Press enter or click to view image in full size
Federation vs MV

Authors

Patrick Sciortino, Sr. Solutions Engineer at Databricks
Heeren Sharma, Sr. Solutions Architect at Databricks

Introduction

Having a unified data catalog that enables comprehensive data discovery and governance is essential for organizations striving to effectively manage their data estate and maximize the value they can derive from data and AI. However, integrating data from different sources is an ongoing endeavor as new operational systems emerge and organizational structures evolve. This article examines two key strategies for integrating and managing diverse data sources through Unity Catalog in the Databricks Data Intelligence Platform context: data ingestion and data federation, enabled by lakehouse federation. We’ll explore each approach’s advantages, drawbacks, and ideal use cases, helping you make informed decisions for your data management needs.

Data Ingestion

There are various ways to ingest data into the Databricks Data Intelligence Platform; a deep dive is out of scope for this article and is extensively documented here. Having said that, the following end result is quite common regardless of the specific ingestion method:

  • A data ingestion pipeline copies the data from the source system to the organization’s Data Lake (generally to an area called landing zone, staging area or Bronze layer, depending on naming preferences). These pipelines are typically built to perform incremental data ingestion, in other words, to only load new changes from the source system once historical data has been copied.
  • A Unity Catalog table is registered that points to that data in the Data Lake (where data is ingested directly into an optimized data format) or to a corresponding format-optimized version of it (in cases where data is ingested in its raw format first, before being converted). In itself, the Unity Catalog table (as shown in the following figure) is simply a metadata artefact that enables easy consumption and governance of that data, and storing the underlying data in an open-source and optimized format like Delta is a way to ensure optimal compaction and query performance as well as to guarantee ACID properties and other benefits as mentioned here while embracing the benefits of an open Data Lakehouse approach.
Press enter or click to view image in full size

Several tools can help streamline the setup of such data ingestion pipelines:

  • Lakeflow Connect is the Databricks-native data ingestion product that leverages Change Data Capture for optimal incremental data ingestion out of the box. It also stores the data in the optimized and open-source Delta format and registers the corresponding Unity Catalog table without additional overhead. External technology partners like Fivetran, Qlik, etc. also deliver the same managed experience.
  • For real-time or near real-time requirements, Databricks can natively ingest data from event buses like Apache Kafka, AWS Kinesis, Confluent Cloud, Amazon MSK, or Azure Event Hubs using Delta Live Tables or Spark Structured Streaming and load it directly into a Unity Catalog table.

Another typical pattern involves copying the data to the Data Lake in its original format using a standard data integration tool like AWS Glue, Azure Data Factory, or Google’s Cloud Data Fusion, and then loading data from the corresponding file location into a Delta table via COPY INTO or Auto Loader.

Regardless of the chosen approach, the result is that source data is being centralized in the Delta Lake, which offers optimal query speed and scalability, leveraging Databricks’ performance optimizations. A prerequisite is that data engineering or data platform teams are required to develop and maintain data ingestion pipelines, which, depending on the case and the chosen approach, may involve more or less complex implementation effort before any business value can be delivered from the data.

Data Federation with Lakehouse Federation

Now, what if the organization’s data could be managed and queried via Unity Catalog without copying that data from where it lives? That would mean any query would point to the freshest operational data while saving storage costs and avoiding discrepancies between the analytical and operational worlds. Isn’t that like having your cake and eating it too? To nuance this, one needs to consider the exact implications of that approach.

Get Databricks SQL SME’s stories in your inbox

Join Medium for free to get updates from this writer.

Lakehouse Federation is Databricks’ native query federation solution. It enables Unity Catalog data consumers (users and systems) to leverage read-only managed JDBC connections to popular database solutions and access external catalogs without needing to migrate the underlying data physically. Another benefit is that federated tables and respective connections can be governed alongside all other data and AI assets in Unity Catalog — allowing, for example, Unity Catalog admins to set granular permissions on these federated tables, or to visualize their downstream dependencies as part of Unity Catalog’s out-of-the-box lineage graph.

Press enter or click to view image in full size

Enabling access and centralized governance on dozens or even hundreds of tables from external systems in one go and without data copy is undoubtedly attractive in specific scenarios (more on that later). However, an important implication of this setup is that all queries on federated tables are effectively executed directly on the source system. This pushback of query workloads to the source can be just fine in some cases (e.g. in case of small data volumes and infrequent queries) but comes with the risks of causing throttling on the source system, generating unnecessarily high egress traffic, or lowering query performances, depending on the specific source and on the query patterns (frequency, complexity, and returned data volume).

Lakehouse Federation + Materialized Views for Data Materialization

Because of the above mentioned risks, avoiding hitting the source system at every query is often desirable. In that case, a common (and usually recommended) approach is to complement Lakehouse Federation with Materialized Views. Materialized Views in Databricks are a special type of database object that stores the result of an SQL query as a physical table and keeps it up-to-date over time by refreshing (or recomputing the result) on an arbitrary schedule. Unlike regular views, which resolve the underlying data at query time, materialized views’ precomputation provides a powerful way to enhance the performance of downstream data processing and analysis workloads, making it easy to deliver fresh data quickly and efficiently.

Press enter or click to view image in full size

However, Materialized Views — when pointing to Federated Tables –have a drawback. They can’t update incrementally, so the entire dataset must be reloaded to reflect fresh data. This can be expensive and cause high data transfer if a large dataset needs frequent updates. Besides, it is critical to ensure that these full refresh workloads, being pushed to the source, don’t create throttling and thereby slow down other data processing workloads or worse, operational processes.

That being said, the Lakehouse Federation + Materialized Views pattern offers a way to quickly enable access and governance on external sources without compromising downstream query performances — making it a fantastic tool to accelerate value delivery in the first phase of a migration project, enable quick Proof of Concepts or even as a long-term solution when it has been validated that the full refreshes of Materialized Views are viable for the case at hand. This article covers the approach in more detail and offers helpful code snippets to get started with such an implementation.

Comparison Matrix

The following table summarizes the primary considerations for the data integration options we discussed and typical use cases for each approach.

Press enter or click to view image in full size
When to use each path

The case for a Hybrid Approach

Many organizations find that combining data integration approaches creates an optimal balance between performance, cost, and operational efficiency. To illustrate this, let’s consider BrightPath, a hypothetical global education services leader offering online learning platforms and tools to schools, universities, and corporate clients. The company uses Salesforce as its central CRM to manage customer relationships, track sales opportunities, and provide personalized marketing campaigns. BrightPath started its journey with Databricks last year to unify data and AI workflows at scale.

BrightPath realized that they could ingest data from Salesforce efficiently using Lakeflow Connect. It required little overhead to set up with a few clicks in the UI. Powered by serverless compute, a managed, robust pipeline experience efficiently ingests any new or changed data from the desired Salesforce objects into Delta tables every 6 hours. All while governed through Unity Catalog.

Brightpath also wanted to provide an improved and automated content recommendation on their portal using advanced machine learning models. Furthermore, to enhance user engagement, it would like to leverage generative AI to generate relevant exercises for a student given their learning history, previous scores and learning goals. To achieve this, Databricks-hosted AI models like state of the art Llama-4 models, needed to be fed by real-time data on platform user activity, which is processed from the application to the Lakehouse in near real time by having the user session data sent to BrightPath’s event bus like a Kafka topic and then read by Delta Live Table pipelines.

More recently, BrightPath acquired HighPotential, a mid-market enterprise focusing on AI-driven simplification of highly technical content for educational purposes. While the longer-term plan following the acquisition is to consolidate the technical landscape of the new organization, business leaders needed quick access to the analytics-ready data processed through HighPotential’s data warehouse, BigQuery. This could be easily achieved by setting up Lakehouse federation to run federated queries on BigQuery data. Because this data is often queried and joined with BrightPath’s Salesforce data, adding a layer of materialized views allowed the conglomerate to augment existing analytical reports with the new information without altering the refresh performances of those user-facing reports.

By combining this hybrid approach, BrightPath can execute on its migration and unification of various data assets to the Data Intelligence Platform while instantly unlocking valuable insights to technical and business users.

Conclusion

Using the right tool for the right job:

  • We discussed data federation and data ingestion as two alternative approaches to integrating data into the Lakehouse. Each approach has pros and cons, but data ingestion is often more scalable and, when properly implemented, offers an effective and reliable solution. Lakeflow Connect or ingestion partner tools such as Fivetran can speed up the setup of end-to-end incremental data ingestion pipelines by significantly lowering the implementation barrier.
  • On the other hand, data federation, facilitated by Lakehouse Federation, can speed up PoCs and migrations (covered more in detail in this blog) as it allows data teams to deliver business value before data ingestion pipelines are fully developed. It can also be a valid approach for long-term solutions where the scope of the Materialized Views query or their freshness requirements are such that the benefits of avoiding data duplication balance out the lower efficiency compared to incremental ingestion methods. This blog post is a recommended read for more details on the approach.
  • As is often the case, there is no one-size-fits-all approach for data integration, and we observe that large organizations frequently adopt hybrid strategies. Hopefully, this article will give you the keys to designing your organization’s optimal data integration pathway!

Related articles :

--

--

Databricks SQL SME
Databricks SQL SME

Written by Databricks SQL SME

One stop shop for all technical how-tos, demos, and best practices for building on Databricks SQL

DBSQL SME Engineering
DBSQL SME Engineering

Published in DBSQL SME Engineering

Publication for content from the DBSQL SME group and the surrounding community on DBSQL best practices, new design patterns, creative solutions, and real world user stories all in one place.