Open ben-schreiber opened 5 days ago
Here are two suggestions which came to mind:
The args
parameter could be renamed. Something like,
def invoke(self, invocation_args: List[str], **kwargs) -> dbtRunnerResult: ...
Although, this would be a breaking change and would need to be handled accordingly.
To add a dedicated name for this use-case (e.g. macro_args
or something like that) which then would be translated back to args
def invoke(self, args: List[str], **kwargs) -> dbtRunnerResult:
if 'macro_args' in kwargs:
kwargs['args'] = kwargs.pop('macro_args')
This too would have to be appropriately documented since it breaks from the kwargs
convention of this method.
Is this a new bug in dbt-core?
Current Behavior
Passing the
--args
parameter as a kwarg to thedbtRunner.invoke
method throws aTypeError
. This forces the parameter to only be pass as:This looks to be caused by a naming conflict with the
invoke
method hereExpected Behavior
To also be able to pass it as a kwarg
Steps To Reproduce
Relevant log output
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response