Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Template operator params #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dinigo
Copy link

@dinigo dinigo commented Sep 5, 2022

Right now only env and vars are templated. However it is a common scenario to template some others (like the --full-refresh flag).

This PR does:

  • Split global and command specific params/flags/args
    dbt [GLOBAL PARAMS] <COMMAND> [COMMAND PARAMS]
  • Render the command programatically. Using an easily modifiable TypedDict It's not required to add params to the render function anymore. You would want to:
    1. Add your new flag/param to the corresponding TypedDict in dbt_command_params.py.
    2. Add the param to the DbtBaseOperator constructor
    3. Add te param to the constructor body, where it gets assigned to the right block
  • Fix the testing

Fixed issues:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant