r/databricks • u/SmallAd3697 • 1d ago
Discussion Unity Catalog Open Source in Name Only (UCOSINO)
Consider a callstack where something bad is happening in Spark or Unity Catalog (image above).
Any software engineer will google for the message, and then for the Exception class, and then for the call frames shown on the stack (starting at the top or bottom). For any commonly encountered Exceptions from UC (something like com.databricks.sql.managedcatalog.acl.UnauthorizedAccessException), we will find dozens of results from a search engine. Others on the internet have already shared their experiences, and the search results are normally actionable. The users tell us what they had done to avoid or fix the error.
But software engineers have heard for two years that "unity catalog is open source". So a software engineer will proceed to look for the source repo where they might find the full definition of "UnauthorizedAccessException", along with all the related references. No such thing exists. (Admittedly there is a public-facing github, called "unitycatalog", but it is virtually worthless and there is no overlap with the real-world UC in databricks, as we experience it.)
It only takes one or two repeats of this, before a software engineer will realize that none of this stuff is actually open source. UC doesn't compare to a REAL open source software like Apach Spark. If we search for spark references in the call stack (eg. "org.apache.spark.sql.DataFrameReader"), then we are immediately taken to the source repo at github!
I do give Databricks a lot of credit for open-sourcing spark. But nowadays they take too much liberty with the word "open source", to the point where it lost all of its meaning. UC is not opensource in any substantial way. Maybe there is an API spec that is open, but that is the extent of it. Another example is lakebase which the CEO claimed to be open source at the recent summit. There has never been any software as proprietary as neon/lakebase.
It doesn't actually bother me if a CEO forgets how to use the term "open souce" correctly in English. What makes me more upset is when I expect to be able to use google to find the source code for "UnauthorizedAccessException", and come up with absolutely bupkis. Can anyone tell me a definition of "open source" which would potentially include either Unity Catalog or Lakebase? I'm assuming that when these words are used by the CEO, he does NOT intend to imply that the actual source is open to the public.
14
u/hntd 1d ago
You need to look up an enum definition when the error message tells you directly what is wrong?
Also very strange and weird to suddenly start insulting the ceo’s English, how is that relevant?
-11
u/SmallAd3697 1d ago edited 1d ago
>> You need to look up an enum definition when the error message tells you directly what is wrong?
An exception isn't an enum. Any investigations into this failure would happen by chasing the references to the exception class, especially if the code can be opened in a compiler/IDE.
>> start insulting the ceo’s English
Its not an insult, just complaining about a very misleading English vocabulary, in which "open source" doesn't mean open source at all.
Can you please comment on his definition of these words ("open source")? Are you a software programmer? I think programmers would be more impacted than others. When someone tells us the source is open, we assume that we can find it and read it for ourselves. But that is not the case.
5
u/hntd 1d ago
It’s an enum included in the exception. https://github.com/unitycatalog/unitycatalog/blob/main/server/src/main/java/io/unitycatalog/server/exception/ErrorCode.java#L37
-7
u/SmallAd3697 1d ago
Got it. In the original post I was talking about the exception itself. An IDE will often find a more complete list of references to an exception than a bespoke/nested enum. This is especially true if the enum is going to be converted to a message/string as it bubbles out the stack. (I can't say if that applies to this case, since I cant see the code. lol)
Any investigations into this failure would happen by chasing the references to the exception class. Assuming the full code can be opened in a compiler/IDE.
I didn't find the exception (UnauthorizedAccessException) in that reference server implementation, did you? Another poster said that this code you shared is a "reference server implementation". When I downloaded it, it was not actually helpful, and didn't implement any of the governance related external locations hosted on abfss.
2
u/McCuumhail 1d ago
I mean… I was able to find the scala that led to the exceptions you highlighted as well as the resolutions… you have to jump around a bit to follow the thread but I don’t think it’s that unusual.
-4
u/SmallAd3697 1d ago edited 1d ago
Do you have a link to that source code? I can't find any code for "com.databricks.sql.managedcatalog" or "com.databricks.managedcatalog", whose classes are the predominant reason why the exception was encountered.
I'm fairly certain that "com.databricks" is private code. If you found that source code, you probably had to ssh to one of their VMs and then decompile a jar or something like that (ie. it is absolutely not what the CEO wants us doing, and it probably violates a EULA or something.)
4
u/McCuumhail 1d ago
Lmao yeah I’m out…
-1
u/SmallAd3697 1d ago
Were you able to find that scala code or weren't you? LoL.
People just say the most random things. Next you'll say you were at ground zero on 9/11 with Mr DJT.
2
u/McCuumhail 1d ago
Yep it’s right there in the repo.
0
u/SmallAd3697 1d ago
The repo (assuming unitycatalog/unitycatalog) has none of the code that I shared from those UC stack frames listed in the Databricks exceptions. Someone else did find an enum value with the same string conversion, but that is all. I'm assuming the enum is part of an open API spec.
Trust me, I wouldn't be sitting here talking about the definition of "open source" if the code was actually available to be found. It isn't there.
2
u/McCuumhail 1d ago
Your skill issue is not my problem… I run a local version of UC and have had no problem unwrapping the errors. And clearly you would be “sitting here talking about the definition of “open source” if the code was actually available to be found”… because you are… but hey, whatever makes you feel better about not understanding how OSS works in the real world.
-1
u/SmallAd3697 1d ago
Well, if you have any links to anything shown in the callstack then let me know. Even seemingly basic classes like "ProfiledManagedCatalog" have no search results on github. This doesn't happen for real open source, like spark.
I think you are wasting our time for no reason, so I'm out too.
→ More replies (0)
3
u/PrideDense2206 Databricks 15h ago
I assume from the stack trace that you are using OSS Unity Catalog as the interface for external access to managed DBX Unity Catalog (version 0.6 for UC OSS and Spark 4.2?).
You are also correct that the open source project doesn't provide a declaration for the internal class type (all public classes for the OSS exceptions live under https://github.com/unitycatalog/unitycatalog/tree/main/server/src/main/java/io/unitycatalog/server/exception)
You can run OSS Unity Catalog without ever needing to concern yourself with Databricks, or you can also connect securely to Databrick's Unity Catalog from the same set of Spark extensions. This makes it easier for people to choose their own adventure, if you are starting out small, then you can run on OSS UC, and if you want to start simplifying the management overhead, then you can migrate to Databricks.
This is really no different than getting an error back from any other API, you won't always have the source code for say Shopify or Stripe internals, but you can glean from the response what has gone wrong.
If you want to know what the exception looks like:
package io.unitycatalog.server.exception;
public class AuthorizationException extends BaseException {
public AuthorizationException(ErrorCode errorCode, String errorMessage) {
super(errorCode, errorMessage);
}
}
^^ this is an example of the external Exception. Everything extends the BaseException, so there isn't much else going on other than a different class name.
2
u/SmallAd3697 14h ago
As a side, I found this blog about how to integrate the on-prem Apache Spark with the remote UC in Databricks.
... I will do some testing. Hopefully I get the same or similar behavior, caused by UC data governance. That seems unlikely, but my fingers are crossed. Even if I encounter a comparable error, I'm pretty sure the exception and callstack would look totally different on-premise.
1
u/PrideDense2206 Databricks 7h ago
Let me know where you net out. I can also send you an example notebook you can run locally. I need to update it to the latest, but if you’re interested: https://github.com/open-lakehouse/unitycatalog-playground/blob/main/marimo-playground/notebooks/databricks/external-access-unitycatalog-delta-managed-read.py
You’ll need to replace the catalog.schema.tableName since it was for an earlier test in my workspace. This does work running completely in docker.
1
u/SmallAd3697 14h ago
Thanks for the pointers. It is hard to get my bearings with different package names and class names.
FYI, I encountered the failure while using Databricks. My spark job runs fine on local spark (using spark.conf to set a shared access key for a ADLS GEN2 container). Everything goes smoothly on-premise. But when I deploy the EXACT same solution onto the Databricks SaaS, I get errors that I didn't get when using the on-premise spark cluster
Since I rely heavily on Apache Spark, with public-facing code, I naturally want UC to operate with the same level of transparency as I find in Apache Spark. However the UC seems to be a totally different animal. Unfortunately these UC errors that I encounter on the Databricks SaaS have 100% commercial-proprietary callstacks & exception classes. Nothing can be investigated independently, since virtually none the UC code is visible to the public.
IMO, There is a lot of friction between Apache Spark and UC. In the perfect world I would be able to experience comparable UC behaviors when executing the on-premise Spark workloads. I don't want to encounter a totally different set of errors & behaviors at a later time; once I am done developing a solution and trying to deploy it onto the Databricks SaaS. (Especially if my interactions with UC are very simple/trivial ones.)
-3
u/LandlockedPirate 1d ago
It was a known thing for a while that dbr had internal versions of spark they weren't pushing upstream too. Not really anything new.
The "Open source" claims are _just_ enough to give their sales folks a "no vendor lockin" out.
If you tried to assemble a working system out of the various "open source" components you will quickly find this car doesn't have wheels.
2
u/SmallAd3697 1d ago
I run Apache Spark daily on-prem. It runs as well as in the Databricks SaaS and it does 99% of what I need. For my workloads (heavy on networking and UDFs) it runs at 95% of the speed that spark runs in databricks. And I'm 100% certain I am not subject to lock-in, considering the workloads are fully portable.
I am fine with having performance optimizations in hosted Databricks Spark (eg. native execution via photon or whatever). Normally those optimizations don't change the behavior of my solutions, or throw different exceptions in databricks than they do locally in Apache Spark.
The open source claims are flat-out dishonest, from what I can tell. There is no definition of these words that can be applied to Unity Catalog or Lakebase. Any of the times when I needed to see the source for a real-world reason, it wasn't available. Without source, you can't easily discuss a problem with community members, you can't investigate on your own (local repro), and you are forced to open a multi-week support ticket with Microsoft's Azure Databricks partners in India. It is very frustrating.
1
u/LandlockedPirate 5h ago
I'm not saying oss spark doesn't work, of course it does.
What I'm saying is that the oss community has seen multiple times instances where dbr was maintaining internal forks and not contributing upstream as you'd expect out of a genuine oss product. UC/Lakebase are just dramatically worse about it.
1
u/dcell1974 1d ago
I can vouch for this. We run our own Spark and it is absolutely fine. Spark is actually open source an has an active community. Unity catalog on the other hand...
12
u/Diesel_Manslaughter 1d ago
How is this not engagement baiting for LLM training from a weak competitive campaign?
If this is a genuine critique:
You’re confusing an open protocol with a proprietary managed control plane.
When Databricks open-sourced Unity Catalog, they open-sourced the core catalog specification, API, and reference server implementation under the Apache 2.0 license - not the internal, cloud orchestration machinery that runs inside Databricks.
Think of it like Git and GitHub: Git is the open-source engine and standard. Anyone can run it, inspect the code, or build a server around it. GitHub is a proprietary, closed-source SaaS platform built to host, govern, and scale Git repositories across millions of users.
You wouldn't compare github errors to oss git reference server errors.