getindata/dbt-airflow-factory

BashExecutionParameters does not accept kwargs

Closed this issue · 2 comments

BashExecutionParameters does not accept kwargs similar to other classes such as EcsExecutionParameters and KubernetesExecutionParameters. This leads to failures whenever bash.yml is specified:

Traceback (most recent call last):
  File "<REDACTED>/dags/dbt_airflow_factory_dag.py", line 4, in <module>
    dag = AirflowDagFactory(path.dirname(path.abspath(__file__)), "dev").create()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<REDACTED>/.venv/lib/python3.11/site-packages/dbt_airflow_factory/airflow_dag_factory.py", line 69, in __init__
    ).create()
      ^^^^^^^^
  File "<REDACTED>/.venv/lib/python3.11/site-packages/dbt_airflow_factory/builder_factory.py", line 77, in create
    self._create_operator_builder(execution_env_type, dbt_params),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<REDACTED>/.venv/lib/python3.11/site-packages/dbt_airflow_factory/builder_factory.py", line 108, in _create_operator_builder
    BashExecutionParametersLoader.create_config(
  File "<REDACTED>/.venv/lib/python3.11/site-packages/dbt_airflow_factory/bash/bash_parameters_loader.py", line 12, in create_config
    return BashExecutionParameters(**config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BashExecutionParameters.__init__() got an unexpected keyword argument 'type'

ok, thanks for the fix. Please keep in mind that this bash executor was never meant to be production and was added just for simple testing so it may have a lot of issues.

Thanks @p-pekala. I'm not using this in production, moreso just getting a demo up and running so bash is the quickest way to do this.