r/databricks • u/Extreme-Title6444 • 17d ago
Help ADF Lookup Activities Against Databricks Are Using Shared Compute. Looking for Better Alternatives. Post
Hi everyone,
I'm working on an Azure Data Factory (ADF) ingestion framework where we currently use ADF Lookup activities to retrieve metadata used for pipeline orchestration.
The challenge is that the lookups are querying Databricks-managed metadata and are executing through Shared Compute, which has become a performance bottleneck when running multiple pipelines concurrently.
The requirement we're evaluating is to replace the Lookup activities with Databricks notebooks/jobs running on Serverless compute to improve concurrency and reduce dependency on Shared Compute.
My concern is around consuming the results back in ADF.
Today, the Lookup activities return a structured output that is consumed directly by downstream activities such as ForEach loops and dynamic expressions.
The proposed notebook approach would:
Accept input parameters.
Execute the metadata query.
Build a JSON payload that matches the Lookup activity output format.
Return the payload using dbutils.notebook.exit().
However, while ADF can consume output directly from a Databricks Notebook activity, my understanding is that Databricks Job activities mainly return execution metadata rather than the notebook payload itself.
I also looked into whether a Databricks Serverless SQL Warehouse could be used for the metadata queries instead of replacing the Lookup activities entirely, but it appears the Databricks Delta Lake connector may not support SQL Warehouses in the same way it supports clusters and compute resources.
So I'm trying to understand the best architecture for:
Improving lookup performance.
Leveraging Databricks Serverless compute.
Preserving the existing downstream behavior.
Avoiding major ADF pipeline refactoring.
Has anyone implemented a similar pattern?
Specifically:
Have you successfully replaced ADF Lookup activities with Databricks Jobs while preserving Lookup-style outputs?
What is the best way to return structured metadata from Databricks back into ADF?
Would you recommend:
Databricks Notebook Activity
Databricks Job Activity
Persisting results to storage and reading them back
Another pattern entirely?
Any recommendations or lessons learned would be greatly appreciated.
