Unify Your Data and Governance With Lakehouse Federation
Summary
- Lakehouse Federation: The Databricks Data and AI platform unifies discovery, querying, and governance of data across databases, warehouses, and catalogs without duplication.
- Seamless integration: External sources like Hive Metastore, Snowflake, and SQL Server appear as local tables in Unity Catalog, enabling consistent access controls and lineage.
- Operational simplicity: Organizations reduce complexity by managing governance once across distributed data instead of maintaining separate policies for each silo.
Unify Your Data and Governance With Lakehouse Federation

Talk by Fuat Can Efeoglu, Sr. Staff Product Manager, Databricks ; Zeashan Pappa, Staff Product Manager, Databricks
In today's data landscape, organizations often grapple with fragmented data spread across various databases, data warehouses and catalogs. Lakehouse Federation addresses this challenge by enabling seamless discovery, querying, and governance of distributed data without the need for duplication or migration. this video will explore how Lakehouse Federation integrates external data sources like Hive Metastore, Snowflake, SQL Server and more into a unified interface, providing consistent access controls, lineage tracking and auditing across your entire data estate. Learn how to streamline analytics and AI workloads, enhance compliance and reduce operational complexity by leveraging a single, cohesive platform for all your data needs.
Here's more to explore:
Databricks named a leader in the 2024 Gartner® Magic Quadrant™for Cloud DBMS: https://www.databricks.com/resources/analyst-paper/databricks-named-leader-by-gartner
An open, unified approach to your data, BI and AI workloads: https://www.databricks.com/product/databricks-sql
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements
Chapters
0:00Introduction to challenges2:03Lakehouse Federation overview5:18Database vs. catalog federation7:25Setup and query mechanics11:23Recent product updates13:37Use cases and optimization17:45Roadmap and future features21:59Advanced catalog capabilities23:30Demonstration and wrap-up
FAQs
What is Lakehouse Federation and how does it work?
Lakehouse Federation lets you query data from multiple sources through Unity Catalog without moving it. External databases, warehouses, and catalogs appear as native tables, enabling consistent governance and access controls across your entire data estate.
What data sources can I federate?
Lakehouse Federation supports Hive Metastore, Snowflake, SQL Server, and other databases. The Databricks Data and AI platform continuously adds support for new sources while maintaining consistent governance.
What is lakehouse federation in Unity Catalog?
Lakehouse Federation enables organizations to query and govern data across multiple data sources and catalogs through a unified interface, eliminating the need to replicate data into a central repository. This capability allows compliance teams and data stewards to apply consistent governance policies across distributed data assets while queries transparently access data where it lives. Federation supports hybrid environments combining Databricks with external databases, data warehouses, and other lakehouse systems.
How fresh is the data when queries run after transaction commits?
Lakehouse Federation provides near-real-time query freshness, with data becoming available immediately after transaction commits to the underlying data source. The federation layer leverages each system's native transaction isolation to ensure queries see consistent committed data without additional synchronization delays. Freshness depends on the underlying data source but typically meets real-time analytics requirements for operational decision-making.
Full transcript
0:00 Introduction to challenges
Okay, welcome everybody uh to this session. I'm the room manager and I'm very delighted to introduce Prashant Tank who will present about Lakehouse Federation. Guys, over to you. Awesome. Thank Thank you for the introduction. Hey all, morning. Um, hope you're having a good morning and start your summit this time around. I'm spelled CN and then pronounced and then I'm here today with Zean. Hi guys. Uh, we're going to be talking about you know all the exciting stuff we're doing on the Lakehouse Federation site and you know some of the updates that has happened over the last uh few years or so.
I'm sorry months or so. Um, all right. So just just just as a reminder, a lot of the stuff you're going to see is a forward-looking stuff might change without notice. Um I'm going to skip the intros here. So you know just one one one kind of main point to start here is you know when we kind of look at our customers data ecosystems right their data is scattered right whether that's multiple warehouses, multiple data links, multiple transactional systems uh and a lot of platforms to kind of wrangle all of this data together, right?
It's not really in one place. But your analysis kind of needs to be across all of these different silos right and when you kind of look at it right you know you start with you know these different data sources and formats you kind of end up with you know which makes you end up with different meta stores which ends up having to make you have different governance layers right now you're not only replicating your data or your metadata or or having to move it so that you can join stuff together but you're having to manage the governance multiple times and then when you kind of put all of this together, this is a lot of work, a lot of complexity, right?
To be able to, you know, join your transaction data to your customer list, you have to go through these all these hoops, uh, which is kind of crazy when you think about it. And Lake Federation is the solution for this, right? What we're saying is here is, hey, as a step before you do ETL, right? as a step for you to be able to do discovery analysis, being able to kind of reach all of this data and be ready to be able to ingest or do something with it.
2:03 Lakehouse Federation overview
Right? What we're saying is federated within Unity catalog, have access to all that metadata, all that table information, all of that catalog information as if they were internal tables, right? do your do your exploration and then once you're kind of ready kind of you know do whatever downstream dashboarding ETL ML you know you name it whatever you want to do and the way we look at it we have two kind of types of federation that we kind of keep in our minds one of them is the database federation and you know an easy way to think about database federation is if you're pushing down to another system to run the query right as in pushing down execution that's what we're kind of calling database federation throughout this presentation and on the catalog federation side.
This is everything where we get the information about where the tables live, what their format is, but as opposed to pushing down to let's say these other systems, right? We execute within data bricks using that metadata that we got from other systems. So kind of two flavors here, right? Both of them are kind of valuable in one, right? on the left hand side databases you kind of need them to be able to so that you can use it for you know transactional systems but if you're an open catalog maybe you know you have that other systems and Zan is going to cover a lot more into like you know when uh this makes sense or not but the whole point is we're kind of invested in making this work great and work across a lot of different types of databases and when you can kind of think of the benefits right one of the first one is you know you have everything in one place right I can search about it I can see the lineage about it I can kind of see all the permissions that kind of you have this unified view.
The second one is which kind of comes with the unified view is you can kind of govern it once right. You can basically say hey if I want to have um if I want to have you know different you know assets with this like you know row level policy or this column level policy but I want to make sure that when I join these two tables together from different systems that applies you can do that now because what the federation gives you is these foreign tables these external tables behaving just like any other internal table and our customers love it by the Right?
When I presented this first time like two three years ago, right, we were actually in like some thousands of tens of thousands of queries. But now we see millions of queries a day just going through federated unit catalog connections. And this is not even counting legacy nonuc federation work that already happens in spark which is like a huge part of it as well. So there's a lot of kind of demand on using lakehouse federation as a way for you to discover analyze you know and govern before you kind of decide what you exactly want to do with that you know that workload and to kind of give you a bit more details about how it works how kind of things plug in together I'll hand it off to thanks hopefully you guys can hear me uh maybe can you guys hear me excellent all right so we're going to talk a little bit about how this works so uh as mentioned there's two types of Lakehouse Federation.
5:18 Database vs. catalog federation
There's database federation which again is the you know your maybe your traditional RDBMS query execution is sort of happening uh inside the database uh that you're pushing down into and we'll talk about exactly how that works in a second. And the other type is catalog federation. So let's go through each of those. So in the case of database federation your query is pushed down to the external database right and uh you're effectively leveraging the remote compute of that particular database.
So whether that's SQL Server, Terod data, Oracle, uh so on and so forth, uh we'll utilize uh APIs such as JDBC to be able to communicate with that database and push some part of that query back down into that database to be performed and then the results are aggregated and sent back to uh uh sent back to your uh data bricks worker node. And the obvious uh most common use cases for this are things like ad hoc reporting u also proof of concept work for ETL pipelines.
So if I'm if I'm like you know building a particular pipeline and I want to actually look at the upstream data and you know test some queries on it uh test some operations on it before I I actually start ingesting that data um database federation is a wonderful wonderful way to uh help with this as well as also just broadly to be able to discover um all the different data sources that exist in your enterprise without necessarily having to go through the effort of etling them in uh in order to start realizing value.
And there we go. Uh and the next one is catalog federation. So in the case of catalog federation as was mentioning your query actually runs directly against file storage. So wherever the data lives an iceberg table uh a uh delta table the table metadata is basically synchronized um from the external catalog. So think you know HMS think iceberg rest catalog uh think glue data catalog. We'll go grab the metadata from there and we'll actually read the data uh on on disk on cloud storage wherever it lives.
And obvious use cases for this are, you know, hybrid models where I've got maybe different different data cataloges in my enterprise, uh, different, uh, autonomous units that are sort of managing and maintaining their own cataloges or perhaps like a step in in in migrating to Unity catalog in the case of HMS Federation, which we'll talk about shortly. So, how does this all work, right? Um, so the first thing you do when you actually want to set up Lakehouse Federation is you go set up a credential.
7:25 Setup and query mechanics
And the credential is exactly what you think it is. It allows you, it allows UC to be able to interact with that external system, whether it's a database or an external catalog. Um, and effectively you can do this via SQL API or via our UI. You see here we have all these different fantastic options. Snowflake, data bricks, Salesforce, MySQL. I think there's more more in this list than we have space for on the screen, which is pretty cool.
And that shows how much how much progress uh we've made uh since rolling this out, which is really exciting. Um once that connection is set up um you can then create a foreign catalog in UC which basically points to that connection. So it'll utilize that connection um and reference that connection when you create it. Right? So if you look down here u using connection connection name, right? Like that's that's in the uh the SQL syntax for creating this foreign catalog.
And um you can pass additional options to it uh as well and kind of tell it where you want to mount it effectively inside the UC um namespace hierarchy. And then once that's done, you can now query it like like it's a table that lives in uh you know ADLS or S3 or GCS. You can query it right alongside the rest of your data which is pretty phenomenal if you think about it. Um because I might have some data that lives in a Snowflake instance that's locked in or a terod data instance that has been around for ages and I I want to bring that data and start querying it alongside data that lives in my lake but I don't want to necessarily go through the headache uh of upfront ETL in order to determine if I can derive value from that data.
Right? So this helps you kind of fast forward that process. uh in terms of uh uh you know determining making that making that determination up front whether or not it's it's a key part of your value journey. Now when I run a query and I actually perform the query what actually happens is we do something called an intelligent push down. So I run this query for example selecting age uh and account right from this particular customer table in some some database in this example here and the data bricks query optimizer will actually go and translate the operations in that particular query into the appropriate SQL dialect for that downstream database and what ends up happening is all the things like filter predicates.
So for example the wear clause or region in North America that's actually pushed down to the into the database and run on the database. The aggregation for the count um also pushed down to the database. the scan and projection, right? Actually just selecting the uh the age group uh and uh you know field from uh from that particular table. All of those things are are pushed down into the source database. So when we get the resulting data back uh in UC in in in data bricks um it's targeted and small, right?
So this is good for multiple reasons. One, we're not sending a whole bunch of data over the wire which would be wildly inefficient, but also uh we're not asking too much of the database, right? We we we basically do this in a very intelligent fashion um so that you're not you know putting too much load on a database which you know frankly aren't meant to aren't meant to scale or meet the scale requirements as uh as well as uh your your compute in the lakehouse might be catalog federation as I mentioned works a little bit differently right so I run let's say a similar query right what happens here is I'm actually going to go and grab all the files but before I go and grab all the files for this particular table I'm going to verify the file and metadata by going and talking to that thirdparty catalog so I'll make a call out like the data bricks uh executor node will make a call out to you know glue or your iceberg rest catalog or HMS um verify the location path information um it'll go read from the metadata that's on disk for you know delta or whatever the particular file format is and then it'll execute it like it was a a native file or a native table that was just registered in Unity catalog.
So the benefits here are pretty clear right like you use the native engine execution on storage. Um there's you don't you're not paying for compute in two places which is pretty cool. Um but then most importantly um like from a requirements perspective this really only works with uh lakehouse catalog. So I mentioned things like uh IRC uh blue data catalog etc. Um uh cataloges that effectively support open table formats and open cloud storage.
And this is this is exactly what catalog federation is for. And both these together right they combine and they create the full lakehouse federation picture. And the cool part about this, I don't know if you guys are aware, but like this is already a core part of data bricks pipelines, right? So like example here of like a lineage graph where you can see all these different upstream sources that are coming from different uh lakehouse federated tables that are landing their way into uh you know tables that live inside inside Unity catalog and are are are on open cloud storage and are being of course like then uh used out to create other further derivative tables.
11:23 Recent product updates
So this is pretty exciting stuff if you think about it and it's uh an integral part of our platform. So, I'm going to walk through a couple recent updates. Um, first and foremost, I'm I'm pretty proud of this because I think this is pretty awesome. U, we've we've finally announced some um amazing connectors. So, we have an an Oracle connector uh which allows you to of course connect and uh query Oracle databases, exadata, and more.
Um, we also recently announced a terod data connector. So, now you can connect your uh terod data instances to uh unity catalog using lighthouse federation. And we also went through a recent um pretty big upgrade of our BigQuery connector. So now we're using the latest BigQuery connector from Google which gets you uh better performance and uh and better feature capability as well. We also added in on the catalog federation side um some more exciting pieces.
So the one I'll focus on first is Hive Metas. And this is a pretty big deal uh because Hive Metasaurre now gives you the ability to uh federate and query HMS. So if you think about the Unity catalog migration journey, um what most customers and probably many of you in this room had to do at some point was uh you know use a sync command um and sync tables from hive metas store to unity catalog and kind of go through this step-by-step migration.
The beautiful thing about having high metas store federation is you can actually federate the existing catalog uh that you have right whether it's an external or internal catalog and immediately start using all the getting all the UC benefits of governance on top of that right away without having to necessarily migrate your tables. So this is a pretty big deal and this is also now generally available and we've also rolled out support for the Salesforce data cloud which again is another catalog based federation uh connector as well as AWS glue.
Um, so this kind of completes that like total picture of catalog federation that we're trying to get to. So what are our customers actually doing with this? So I we've talked about a couple use cases and I'm going to I'm going to dive into a little bit more. Um, so I I think the most the most obvious use case that we hear from most customers is that they just want to figure out what's in a particular database, right?
13:37 Use cases and optimization
Like I mean you're a big you're you're a data team and there's probably thousands of different database applications that uh exist or database servers that exist in your enterprise. You have no idea what half of them do, right? And chances are you don't have a catalog uh an enterprise catalog that's up to date and you have all these different transactional sources. Um and there's useful data in there, right? um there's really good data in there that you don't necessarily have pipelines for uh that you can't immediately operationalize and make make use of um in in you know providing your data analytics and obviously then discovery right is one of the most important bits.
But once you have a database, you can just add it via lakehouse federation. And now you with that data registered, you can of course you can govern it. You can pro provide security on top of it. But more importantly, you can just use it to figure out what's in it, right? You can run queries against it. You can uh you know use it to uh use it against other master data or other uh data sources that you have uh in uh in UC and you know try to try to derive value from it.
Um most importantly, you can also query it, right? So like the getting a single view and being able to securely explore all of this data without having to ingest it is pretty powerful. Now we don't necessarily recommend that you replace all your ingestion ingestion pipelines with uh lakehouse federation but it does certainly make the process of getting to data for the purposes of ad hoc reporting or other uh one-off use cases a lot simpler.
And obviously if you need to uh you know scale it up to uh you know much wider consumption then then possibly at that point you can make that uh business case as to whether or not it makes sense to ETL it in. Um the governance piece is really important and mentioned this but like you get all of the lineage insights you get auditing you get permissions. So things like role level security column level masks right a lot of these things simply not possible in the source database uh in some cases you can get all of that with unity catalog.
So even just replacing that uh that query layer with UC and data bricks uh for all of these gives you that you know single homogeneized view of uh your of your of your data state regardless of where the data actually lives. And that's pretty cool stuff. Um, and you do have the option to productionize this, right? So you can use things like materialized views uh to actually aid in building those pipelines or you can you of course use some of our upcoming products like flow and things like that.
Um, but the productionization like uh possibilities are pretty pretty powerful here with materialized use as well. We'll talk a little bit about that. So federation and materialized views. Um, so I I think this is a cool slide. Federation loves materialized views. And I think there's a there's a a reason for this, right? So like if I was to go and query it like let's say let's say for example you have a a particular table in a SQL server uh warehouse that you guys uh uh you know it's it's widely used and you're getting I don't know 10,000 queries against it a day.
Rather than running those 10,000 queries against that SQL server, right? What you most likely want to do is take that data and materialize it in your lakehouse so that when users are querying it they're querying it from cloud storage as opposed to querying it directly from the database. Now in before we had any of this right what you had to do was you had to create a pipeline. You had to go and you know use uh our our old federation technologies to write that data from your from source all the way down to cloud storage.
You had to kind of run your optimizations on it on a regular basis. You had to schedule that pipeline. You had to go through all this like headache and hoopla just to be able to materialize some some some information uh and be able to query it in a more scalable way. Well with materialized views you can do that with like a click of a button, right? So it's like super simple now. um you can effectively you know more or less like click on a particular table and create a materialized view from it or run a simple query and create create a materialized view from it.
And this is pretty awesome because uh you can accelerate all the stuff that you might need to do uh like for example cross uh source joins or like really really like complicated transformations. Um you don't necessarily have to run them on the on the source database. You can instead run them with the scale of your lakehouse. Um, and you can also like as I as I mentioned earlier, offload the access to the underlying databases, reducing the amount of load that you necessarily necessarily have to place on those databases.
All right. Um, so looking ahead, awesome. Thank you for the great intro. Um, I mean, if if if I were to say like 2024 was a year of like, you know, first of all catching up at all the usage I showed you guys because it exploded. So a lot of the work was about scaling, making sure we give you guys the same latency that you're expecting from all these sources. But the second thing we focused a lot on was about how do I add more data sources so that I can kind of cover like 80 90% of what you need.
17:45 Roadmap and future features
Looking ahead, right? What we kind of thinking about is is kind of not adding 10 more 20 more sources, but making the existing work you guys do much more productive and more useful. And we have a bunch of exciting things that are that are planned on the road map. And again, these are all tentative, subject to change. Um, the very first one is remote queries, right? This is the ability for you to completely skip what we're doing with the Spark query planner or like, you know, anything that we're doing on our parsing layer and push down a query to that source system.
And the main use case for this is, you know, a lot of our customers have UDFs that they have in Oracle or they have some procedure they want to run or they have some complicated thing where we may not be be able to push down a certain part. And this is a way for you to be able to sidestep all of that and you know just push down that entire query against any connection that we might have. I mean in this example I gave the you know our Oracle connections but this will basically work with any kind of thing you have.
This is not for all users by the way for your regular users we would still recommend going through foreign cataloges but but for when you need a workaround or when you have a more advanced persona this is something that can help use that. In conjunction with that, what we're also thinking about is how do we extend the data sources so that you can bring your own drivers and start querying without us having to add something into the system.
And that's where the custom connections come comes in along with the remote query that I have. So what we're going to allow you to be able to do is to define a custom connection using a a jar or a driver that you have in database volumes, right? And then through remote query be able to write an arbitrary query against it and then kind of use that in a way. And our our hope is that this covers all that like you know 20% of the databases that we have not covered because we've been really focused on that giving that 80% really well.
Another big one we kind of alluded to this was uh integration of these foreign cataloges and foreign tables into lakeflow connect. So one big thing is you know hey I don't have a CDC connector you guys don't have a CDC connector but I still want to use the JDBC based approach to be able to ingest it and this gives you just that. So using lake low connect and the existing federation connectors what you can do is you can pick a table you know tell us the primary key or like a time stamp column but then we'll go just do like a basic you know last updated and then ingest it over in a resilient fashion you know we'll refresh the query we'll reschedule it if something fails and all of that this is still not CBC by the way but this should be like for those of you who are like you kind of need something a bit more resilient a bit more scaling but I don't have full CDC or we don't have a solution for that this is This is your solution.
Um, kind of on the other side of this, we've been talking about reads a lot, right? But one big thing that we get asked about is rights, right? How do I how can I insert into this database? How can I write create a table in this other system and how can I do that centrally from my notebooks and data books from UC? And we heard you. So, we're basically also looking into enabling this. So the goal here is to be able to do basic DML and DDL operations through your foreign catalogs and kind of being able to write back items uh that you were able to write back before.
And this is this is going to be not a small effort. So you know within a quarter or two you'll kind of see it's happening. The other two are you know requests that we hear all the time just to kind of cover them quickly. Join push downs right so that if you have a complicated join we support this with 50% of our sources but we're going to add it to the rest of the sources as well. and delta sharing support. So if you have a federated table that you want to delta share to maybe your client of yours or to another, you know, organization in your company, you'll be able to do that uh because we're going to make federated tables work with delta sharing as well.
And finally right on the catalog federation side we also have a lot of exciting features and there's a whole session about this by the way if you guys are interested about catalog federation they have a very cool demo and a presentation about you know going deeper dive into some of this stuff but big things are let's say you have glue or HMS you're going to be able to one click convert that into a you know manage table from an external table this is a huge one the other one we're working on is Palunteer catalog federation right being able to uh federate that and make that available as part of your unic catalog environment.
21:59 Advanced catalog capabilities
Uh and finally having a generic way of being able to do IRC iceberg rest catalog uh and being able to federate that and make that be a part of your unit catalog experience. Um, you know, that covers a lot by the way things like Polaris, Gravitana, Big Lake, Metasto, Palanteer is also technically IRC, but you know, we're going to have a generic implementation and then we're also going to have specialized kind of integrations for each of these tools kind of going forward.
All right. So, with that, now is the time for a demo. So our plan was to show you all like a quick uh like you know five minutes covering the UI of how all of this set up showing you some SQL about how all of this is managed and then kind of just walking you through the end to end picture and then hopefully have you know five to 10 minutes extra for any Q&A. So let's let me switch over for a second here. All right. So, let me zoom in a bit.
23:30 Demonstration and wrap-up
Hopefully, this is good enough. All right. So, what you're looking at is our internal staging environment. This is the data bricks workspace. On the left hand side, you see all the, you know, your catalogs, your pipelines, your, you know, your clusters. And then I'm in the catalog explorer page, right? This is basically the page in Unity catalog where you can browse your metadata, your tables, your foreign cataloges, all of that stuff.
So, this is your, you know, center of data. So to be to be able to set up a connection to an external system, you click on external data. Everything starts with what we calling a connection. You can think of a connection as a holder for your credentials and host name and user, you know, user information. So I'm not going to set this up because I already have one set up. But just to give you guys an idea, I will go through this and just to show you.
So you set up the name, you pick the name, right? Then you have, you know, a bunch of names that you can pick from. In this case, let's just pick Oracle since that's what we launched recently. I can add a comment. I said next, it's it's your standard host name. Let's just fill this up for a second just so I can show you the end to end flow. And then I'm going to create a pseudo connection and oh, sorry, Oracle Oracle 2.
And then now remember connection was the holder for your host name and your credentials, all of that information. a foreign catalog uses a connection to basically display all the catalog and the metadata information from that catalog for a given database in that system. So now what I'm going to do is and this is what's going to appear in your Unity catalog page as a catalog that you can browse and see tables and views.
So if you were to do something like this right now I'm going to create a catalog in Unity catalog you see called Oracle catalog using this connection using this service name and then what's going to happen behind the scenes is that's going to basically go scan the metadata and show you the thing. Let me actually now show you one that's set up so that we can show you the benefits of this. So I'm going to switch gears one second here.
So I went ahead and set up and filled in this case a snowflake database but again this could have been any database uh with some demo tables. So what you're seeing here is as I am you know clicking on these things like app what you're doing is you see sending a metadata call back to this system you're loading all of this metadata like about the tables when I clicked on it we got the column information from that system.
So what's happening behind the scenes is we're grabbing metadata, caching metadata, and making it available to you next time you come in. So all of those things are happening just as seamlessly as you would as an internal table, but behind the scenes, we're doing a lot of stuff to make this metadata magic work. And then when I come in here, right, as we were saying, this just looks like any other table, right? I can add tags, I can add row filters, I can add a column masking rule.
You know, there's an AI suggestion which looks great. I can accept this if I wanted to. If I click on sample data, it actually you know kicks off a query against in this case snowflake to run a limit 100 I think query and give me you know the you know the thing I can see the permissions and update and grant other you know you know other principles permissions as we were saying I can add policies right I can come in here and add a row filter column masking all of those things and it will apply and then finally the lineage of it which is which is a big one.
I'm going to come back to lineage as part of the rest of my demo. But the big big item here is that once you define a foreign catalog based on these foreign systems, we treat it just like any other table, you get full Unity catalog capabilities on top of it. Um so now let's switch gears a bit. I'm going to show you all like how some of this stuff is managed in SQL and then I'm going to jump off this show you some queries on top of them.
So the first thing is when you're creating a connection, you can either use that UI I showed you especially if you're going to do something like O based integration or like any interactive flows, but you can also programmatically manage them. So if I go to SQL, I can basically I have a mock connection here, right? I can say you know create connection as a SQL statement here with whatever the parameters for this specific source I have.
And what we'll do is we'll you know go ahead and create a connection with these things and after later on you can also use the SQL command to create the foreign catalog. So we will go scan you know the foreign catalog information sorry connection information use that and then you know do whatever you want and then later on once you have that you can manage the permissions. The whole point of why I'm showing you this is once you have your connection and foreign catalog, you can programmatically manage, you know, permissions life cycle in any policy on top of it without ever coming to the UI.
Um, once I set all of this up, right, I can actually, you know, either in SQL or in the UI just start querying this. For example, if I want to do something like show tables, right, what's happen going to happen is it's going to show you the tables within that schema. I can go ahead and describe the tables that I have that I get from here. These are all things that are kind of hitting uh the external systems metadata and coming in.
Um in this case, let's actually run this query very quickly. Right? We talked about push downs u right and once what's happening here is when I run a query like this, this is a very basic query. What's happening behind the scenes is we're sending a scan into this table with a limit query and pushing that entire thing back to Snowflake. Let's do something a bit more complicated. In this case, I have a group by with an order with a limit with a sum, right?
And I run this. So, what's going to happen is the optimizer is going to look at this query. It's going to look that I'm going against an external system. It's going to understand that I'm doing an aggregation with an order by and a limit. And it's going to basically determine what operations it can push down to that system, plan the query in such a way and do that operation. And when I go to the query profile for that query, which you can go from here, you can actually click on it and see the exact query we're sending down to the federated system.
So in this case, I mean the structure is a bit confusing, but what you see is we did the sum, the group by, the order by, and the limit. So basically like 95% of this query got pushed down and this is a very easy way for you to be able to understand what's getting pushed down troubleshoot and just understand general performance characteristics. Um let's close this up and you get the idea and I can take this thing and I can join it with another table.
I can do anything downstream I want. The larger point is whatever we can push down to a system we'll push down. The rest we'll do in datab bricks. Um just to hit this point across I built a dashboard uh using basically this uh data set that we looked at and it just res rescheduled refresh right now by the way. So what's happening is as I change the country and then if I change the channel and just like that all of those queries got sent to Snowflake in this case run and then get displayed.
You can imagine where I'm going with this. You can do this across multiple sources, multiple joins, materialized, nonmaterialized depending on what your needs are. And then behind the scenes, we will just make this work uh uh for you automatically. Now let's say you want to you have a big join and you don't want to as you know S was saying you don't want to actually pre uh you don't want to do that live because why would you do like a huge like you know trillion row join all the time.
So in this case what we're doing is I have my online user activity in one data source and my churn and returned order activity in delta in the data lake already. So what I'm doing is I'm creating a materialized view that is scheduled to refresh every day uh that is joining these two tables so I don't have to join them on the fly and then when I query this now right as opposed to going against the data source I will directly go against this materialized view.
Let me quickly show you this materialized view. Um, so when when I when I go here, right, I can see the refresh schedule over here, I can see the refresh status. It it refreshed this morning, two hours ago, for example. And the thing I showed I said I was going to show you all was the lineage, which is if I now come to see the lineage of it, right? I can see, you know, at the column level, if I wanted to, um, what each where each of these things are coming from.
In this case, this is coming from this data warehouse and then this one is coming from a delta table. In the zeon example, you had like fiveway join. The whole idea is this is all fully traceable at the column level and also governable at that level. Um, and I believe that was it for today.
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.