Skip to content

DatabricksSubmitRunOperator and DatabricksRunNowOperator cannot define .json as template_ext #23622

Description

@jonathansp

Apache Airflow version

2.2.2

What happened

Introduced here 0a2d0d1 databricks operators now define template_ext property as ('.json',). This change broke a few dags we have currently as they basically define a config json file that needs to be posted to databricks. Example:

DatabricksRunNowOperator(
    task_id=...,
    job_name=...,
    python_params=["app.py", "--config", "/path/to/config/inside-docker-image.json"],
    databricks_conn_id=...,
    email_on_failure=...,
)

This snippet will make airflow to load /path/to/config/inside-docker-image.json and it is not desired.

@utkarsharma2 @potiuk can this change be reverted, please? It's causing headaches when a json file is provided as part of the dag parameters.

What you think should happen instead

Use a more specific extension for databricks operators, like .json-tpl

How to reproduce

No response

Operating System

Any

Versions of Apache Airflow Providers

apache-airflow-providers-databricks==2.6.0

Deployment

Virtualenv installation

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on May 10, 2022

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. eladkal commented on May 10, 2022

    @eladkal
    Contributor

    I think this is the same problem we had with K8s #17186 ?

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