Skip to content

Allow passing airflow params as job parameter in databricks job #39002

Closed

Description

@SubhamSinghal

Description

Currently if we need to pass any parameter to spark job we need to hardcode parameters in json config. But we want to pass parameters dynamically through airflow.
This feature allows to pass airflow config paramaters as job parameters in spark job.

Use case/motivation

Dynamically update job parameter in spark job

Related issues

no

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. potiuk commented on Mar 2, 2026

    @potiuk
    Member

    @SubhamSinghal We are unassigning you from this issue as part of our updated assignment policy.

    This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

    We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

  2. galafis commented on Mar 16, 2026

    @galafis

    I'd like to take this on. Noticed the previous PR #39007 was closed, and the issue was recently re-labeled as good first issue.

    From what I understand, the goal is to allow Airflow DAG params (e.g., from dag_run.conf) to be passed dynamically as job parameters to Databricks spark jobs, instead of having them hardcoded in the JSON config.

    I'll look into the DatabricksSubmitRunOperator and DatabricksRunNowOperator to understand how json / spark_submit_params are currently handled, and figure out the best way to inject Airflow params via template_fields or an explicit mapping parameter. Will also add tests covering the new behavior.

    I'll open a PR soon.

  3. laurenhall1526-netizen commented on Mar 16, 2026

    @laurenhall1526-netizen
  4. eladkal commented on May 8, 2026

    @eladkal
    Contributor

    cc @moomindani not sure if this one is relevant but if is sounds like a very easy fix?

  5. moomindani commented on May 9, 2026

    @moomindani
    Contributor

    Hi @eladkal — taking this one on. Opened #66613 which builds on @SubhamSinghal's earlier work in #39007 (closed as stale). Picks up @dirrao's and @Lee-W's review feedback (list-comprehension refactor + use of params.dump() to resolve Param objects to their values) and extends the auto-injection from DatabricksCreateJobsOperator to DatabricksRunNowOperator (job_parameters) and DatabricksSubmitRunOperator (per-task dict-shaped slots) per @galafis's suggestion. Verified end-to-end against a real Databricks workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions