diff --git a/cosmos/operators/aws_ecs.py b/cosmos/operators/aws_ecs.py index 7f1d70cd9..780eb5de5 100644 --- a/cosmos/operators/aws_ecs.py +++ b/cosmos/operators/aws_ecs.py @@ -40,7 +40,7 @@ class DbtAwsEcsBaseOperator(AbstractDbtBase, EcsRunTaskOperator): # type: ignor """ template_fields: Sequence[str] = tuple( - list(AbstractDbtBase.template_fields) + list(EcsRunTaskOperator.template_fields) + 'dbt_container_name' + list(AbstractDbtBase.template_fields) + list(EcsRunTaskOperator.template_fields) + list("dbt_container_name") ) intercept_flag = False @@ -50,7 +50,6 @@ def __init__( # arguments required by EcsRunTaskOperator cluster: str, task_definition: str, - dbt_container_name: str, # aws_conn_id: str = DEFAULT_CONN_ID, @@ -105,7 +104,6 @@ def build_command(self, context: Context, cmd_flags: list[str] | None = None) -> # For the first round, we're going to assume that the command is dbt # This means that we don't have openlineage support, but we will create a ticket # to add that in the future - logger.debug('Container name: {}'.format(self.dbt_container_name)) self.dbt_executable_path = "dbt" dbt_cmd, env_vars = self.build_cmd(context=context, cmd_flags=cmd_flags) self.environment_variables = {**env_vars, **self.environment_variables} @@ -121,6 +119,7 @@ def build_command(self, context: Context, cmd_flags: list[str] | None = None) -> ] } + class DbtBuildAwsEcsOperator(DbtBuildMixin, DbtAwsEcsBaseOperator): """ Executes a dbt core build command.