Skip to content

Commit

Permalink
move favor state arg to click (#6774)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenyuLInx authored Jan 30, 2023
1 parent d6ac340 commit 0a74594
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 7 deletions.
6 changes: 6 additions & 0 deletions core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def cli(ctx, **kwargs):
@p.defer
@p.exclude
@p.fail_fast
@p.favor_state
@p.full_refresh
@p.indirect_selection
@p.profile
Expand Down Expand Up @@ -170,6 +171,7 @@ def docs(ctx, **kwargs):
@p.compile_docs
@p.defer
@p.exclude
@p.favor_state
@p.models
@p.profile
@p.profiles_dir
Expand Down Expand Up @@ -233,6 +235,7 @@ def docs_serve(ctx, **kwargs):
@click.pass_context
@p.defer
@p.exclude
@p.favor_state
@p.full_refresh
@p.models
@p.parse_only
Expand Down Expand Up @@ -401,6 +404,7 @@ def parse(ctx, **kwargs):
@cli.command("run")
@click.pass_context
@p.defer
@p.favor_state
@p.exclude
@p.fail_fast
@p.full_refresh
Expand Down Expand Up @@ -503,6 +507,7 @@ def seed(ctx, **kwargs):
@click.pass_context
@p.defer
@p.exclude
@p.favor_state
@p.models
@p.profile
@p.profiles_dir
Expand Down Expand Up @@ -583,6 +588,7 @@ def freshness(ctx, **kwargs):
@p.defer
@p.exclude
@p.fail_fast
@p.favor_state
@p.indirect_selection
@p.models
@p.profile
Expand Down
6 changes: 6 additions & 0 deletions core/dbt/cli/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
help="Stop execution on first failure.",
)

favor_state = click.option(
"--favor-state/--no-favor-state",
envvar="DBT_FAVOR_STATE",
help="If set, defer to the argument provided to the state flag for resolving unselected nodes, even if the node(s) exist as a database object in the current environment.",
)

full_refresh = click.option(
"--full-refresh",
"-f",
Expand Down
Binary file modified core/dbt/docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified core/dbt/docs/build/doctrees/index.doctree
Binary file not shown.
35 changes: 30 additions & 5 deletions core/dbt/docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,19 @@ <h4>fail_fast<a class="headerlink" href="#build|fail_fast" title="Permalink to t
<p>Type: boolean</p>
<p>Stop execution on first failure.</p>
</section>
<section id="build|favor_state">
<h4>favor_state<a class="headerlink" href="#build|favor_state" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>If set, defer to the argument provided to the state flag for resolving unselected nodes, even if the node(s) exist as a database object in the current environment.</p>
</section>
<section id="build|full_refresh">
<h4>full_refresh<a class="headerlink" href="#build|full_refresh" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>If specified, dbt will drop incremental models and fully-recalculate the incremental table from the model definition.</p>
</section>
<section id="build|indirect_selection">
<h4>indirect_selection<a class="headerlink" href="#build|indirect_selection" title="Permalink to this heading"></a></h4>
<p>Type: choice: [‘eager’, ‘cautious’]</p>
<p>Type: choice: [‘eager’, ‘cautious’, ‘buildable’]</p>
<p>Select all tests that are adjacent to selected resources, even if they those resources have been explicitly selected.</p>
</section>
<section id="build|profile">
Expand Down Expand Up @@ -193,6 +198,11 @@ <h4>exclude<a class="headerlink" href="#compile|exclude" title="Permalink to thi
<p>Type: unknown</p>
<p>Specify the nodes to exclude.</p>
</section>
<section id="compile|favor_state">
<h4>favor_state<a class="headerlink" href="#compile|favor_state" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>If set, defer to the argument provided to the state flag for resolving unselected nodes, even if the node(s) exist as a database object in the current environment.</p>
</section>
<section id="compile|full_refresh">
<h4>full_refresh<a class="headerlink" href="#compile|full_refresh" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
Expand Down Expand Up @@ -349,7 +359,7 @@ <h4>project_dir<a class="headerlink" href="#init|project_dir" title="Permalink t
<section id="init|skip_profile_setup">
<h4>skip_profile_setup<a class="headerlink" href="#init|skip_profile_setup" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>Skip interative profile setup.</p>
<p>Skip interactive profile setup.</p>
</section>
<section id="init|target">
<h4>target<a class="headerlink" href="#init|target" title="Permalink to this heading"></a></h4>
Expand All @@ -369,7 +379,7 @@ <h4>exclude<a class="headerlink" href="#list|exclude" title="Permalink to this h
</section>
<section id="list|indirect_selection">
<h4>indirect_selection<a class="headerlink" href="#list|indirect_selection" title="Permalink to this heading"></a></h4>
<p>Type: choice: [‘eager’, ‘cautious’]</p>
<p>Type: choice: [‘eager’, ‘cautious’, ‘buildable’]</p>
<p>Select all tests that are adjacent to selected resources, even if they those resources have been explicitly selected.</p>
</section>
<section id="list|models">
Expand Down Expand Up @@ -440,7 +450,7 @@ <h4>exclude<a class="headerlink" href="#list|exclude" title="Permalink to this h
</section>
<section id="list|indirect_selection">
<h4>indirect_selection<a class="headerlink" href="#list|indirect_selection" title="Permalink to this heading"></a></h4>
<p>Type: choice: [‘eager’, ‘cautious’]</p>
<p>Type: choice: [‘eager’, ‘cautious’, ‘buildable’]</p>
<p>Select all tests that are adjacent to selected resources, even if they those resources have been explicitly selected.</p>
</section>
<section id="list|models">
Expand Down Expand Up @@ -560,6 +570,11 @@ <h4>defer<a class="headerlink" href="#run|defer" title="Permalink to this headin
<p>Type: boolean</p>
<p>If set, defer to the state variable for resolving unselected nodes.</p>
</section>
<section id="run|favor_state">
<h4>favor_state<a class="headerlink" href="#run|favor_state" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>If set, defer to the argument provided to the state flag for resolving unselected nodes, even if the node(s) exist as a database object in the current environment.</p>
</section>
<section id="run|exclude">
<h4>exclude<a class="headerlink" href="#run|exclude" title="Permalink to this heading"></a></h4>
<p>Type: unknown</p>
Expand Down Expand Up @@ -757,6 +772,11 @@ <h4>exclude<a class="headerlink" href="#snapshot|exclude" title="Permalink to th
<p>Type: unknown</p>
<p>Specify the nodes to exclude.</p>
</section>
<section id="snapshot|favor_state">
<h4>favor_state<a class="headerlink" href="#snapshot|favor_state" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>If set, defer to the argument provided to the state flag for resolving unselected nodes, even if the node(s) exist as a database object in the current environment.</p>
</section>
<section id="snapshot|models">
<h4>models<a class="headerlink" href="#snapshot|models" title="Permalink to this heading"></a></h4>
<p>Type: unknown</p>
Expand Down Expand Up @@ -824,9 +844,14 @@ <h4>fail_fast<a class="headerlink" href="#test|fail_fast" title="Permalink to th
<p>Type: boolean</p>
<p>Stop execution on first failure.</p>
</section>
<section id="test|favor_state">
<h4>favor_state<a class="headerlink" href="#test|favor_state" title="Permalink to this heading"></a></h4>
<p>Type: boolean</p>
<p>If set, defer to the argument provided to the state flag for resolving unselected nodes, even if the node(s) exist as a database object in the current environment.</p>
</section>
<section id="test|indirect_selection">
<h4>indirect_selection<a class="headerlink" href="#test|indirect_selection" title="Permalink to this heading"></a></h4>
<p>Type: choice: [‘eager’, ‘cautious’]</p>
<p>Type: choice: [‘eager’, ‘cautious’, ‘buildable’]</p>
<p>Select all tests that are adjacent to selected resources, even if they those resources have been explicitly selected.</p>
</section>
<section id="test|models">
Expand Down
Loading

0 comments on commit 0a74594

Please sign in to comment.