Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates not resolved in DatabricksNotebookOperator then in DatabricksWorkflowTaskGroup used #45462

Open
1 of 2 tasks
a-baturin opened this issue Jan 7, 2025 · 2 comments
Open
1 of 2 tasks

Comments

@a-baturin
Copy link

Apache Airflow Provider(s)

databricks

Versions of Apache Airflow Providers

apache-airflow-providers-databrick 6.9.0

Apache Airflow version

2.9.2

Operating System

Amazon Linux 2023

Deployment

Amazon (AWS) MWAA

Deployment details

No response

What happened

Templates/macros defined in DatabricksNotebookOperator inside DatabricksWorkflowTaskGroup are passed to Notebook as template text, not as an expected value.
image

What you think should happen instead

Resolution happens on task execution. But Databricks job is already created at that moment

How to reproduce

If you define notebook_params in DatabricksWorkflowTaskGroup templates will be resolved, if in DatabricksNotebookOperator inside DatabricksWorkflowTaskGroup - not resolved.
In provided part of DAG (unrelated removed) param1 correctly passed to notebook, but param2 passed as {{ ds }}

    with DatabricksWorkflowTaskGroup(
...
        notebook_params={"param1": "{{ ds }}"},
    ) as tg:
        task1 = DatabricksNotebookOperator(
...
            notebook_params={"param2": "{{ ds }}"},
        )

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@a-baturin a-baturin added area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 7, 2025
Copy link

boring-cyborg bot commented Jan 7, 2025

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@potiuk
Copy link
Member

potiuk commented Jan 7, 2025

Feel free to implement it if you would like to

@potiuk potiuk removed the needs-triage label for new issues that we didn't triage yet label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants