feat(demo): privy - Fabric Livy without the throttling (POC, do NOT merge) - #262
Draft
Raki (mdrakiburrahman) wants to merge 7 commits into
Draft
feat(demo): privy - Fabric Livy without the throttling (POC, do NOT merge)#262Raki (mdrakiburrahman) wants to merge 7 commits into
Raki (mdrakiburrahman) wants to merge 7 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ported from .temp/privy/scripts/upload_whl.sh, pointed at this repo's built wheel instead of privy's. Uploads dist/dbt_fabricspark-*.whl to the same rakirahman/public container, under whls/<wheel-name>. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Raki (mdrakiburrahman)
marked this pull request as draft
August 2, 2026 19:06
Privy no longer serializes inprocess calls behind a global lock; stdout is captured per thread and calls are dispatched on a thread pool, so concurrent dbt threads execute in parallel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ensure_database_exists issued a 'select 1' through Spark for every model on non-schema lakehouses, costing a full relay round-trip per node. It is now a Jinja no-op when there is no database to create. The privy exec snippet now sets a Spark job group from the dbt node_id so jobs are attributable and cancellable instead of inheriting the notebook's start-up cell description, and skips collect() for statements that expose no output schema. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
I'm using this branch here with Ilaria Battiston (@ila): mdrakiburrahman/openivm-spark#35 So going to keep the PR open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an experimental
method: privyconnection type as an alternative tothe Livy REST client this adapter normally ships with. Instead of talking to
the Livy statements API, it sends
spark.sql(...)over an Azure RelayHybrid Connection right into a Spark session that's primed up and ready to rip.
Why
No throttling.
How it works
flowchart LR dbt["dbt-core"] --> adapter cache[("job cache\n(local file)")] <--> adapter subgraph client["Developer / CI machine"] dbt adapter["dbt-fabricspark\n(method: privy)"] cache end adapter -- "trigger/poll" --> api["Fabric Job API"] api -.starts.-> notebook adapter == "spark.sql" ==> relay relay((Azure Relay)) <==> notebook subgraph fabric["Microsoft Fabric"] api notebook["Notebook\nRelayServer + Spark"] end