Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional shorthand to full refresh command #5879

Merged
merged 4 commits into from
Sep 21, 2022

Conversation

dave-connors-3
Copy link
Contributor

@dave-connors-3 dave-connors-3 commented Sep 19, 2022

resolves #5878

Description

Adds an optional shorthand for the --full-refresh flag!

dbt build -fr for an incremental model passes:

image

and acts as expected:

�[0m16:11:54.082634 [debug] [Thread-7  ]: Began running node model.davebt.incremental
�[0m16:11:54.083352 [info ] [Thread-7  ]: 4 of 5 START sql incremental model dbt_dconnors.incremental .................... [RUN]
�[0m16:11:54.085262 [debug] [Thread-7  ]: Acquiring new snowflake connection "model.davebt.incremental"
�[0m16:11:54.085788 [debug] [Thread-7  ]: Began compiling node model.davebt.incremental
�[0m16:11:54.086130 [debug] [Thread-7  ]: Compiling model.davebt.incremental
�[0m16:11:54.104372 [debug] [Thread-7  ]: Writing injected SQL for node "model.davebt.incremental"
�[0m16:11:54.105039 [debug] [Thread-7  ]: finished collecting timing info
�[0m16:11:54.105302 [debug] [Thread-7  ]: Began executing node model.davebt.incremental
�[0m16:11:54.153305 [debug] [Thread-7  ]: Writing runtime sql for node "model.davebt.incremental"
�[0m16:11:54.154408 [debug] [Thread-7  ]: Using snowflake connection "model.davebt.incremental"
�[0m16:11:54.154609 [debug] [Thread-7  ]: On model.davebt.incremental: /* {"app": "dbt", "dbt_version": "1.3.0b2", "profile_name": "dbt_metrics_integration_tests", "target_name": "snowflake", "node_id": "model.davebt.incremental"} */
create or replace transient table development.dbt_dconnors.incremental  as
        (

with 

final as (

    select * from development.dbt_dconnors.mock_incrementing_source

    
)

select * from final
        );

Opening as a draft for now, assuming I need some testing here, but didn't find a test that quite looked like the right place at first glance!

Checklist

@cla-bot cla-bot bot added the cla:yes label Sep 19, 2022
@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@jtcohen6 jtcohen6 added cli Team:Execution ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering labels Sep 20, 2022
@jtcohen6
Copy link
Contributor

Personally, I like -fr ("for real"), though I could also see an argument for -f ("force," a la git push)

@dave-connors-3 dave-connors-3 marked this pull request as ready for review September 21, 2022 15:53
@dave-connors-3 dave-connors-3 requested a review from a team September 21, 2022 15:53
@dave-connors-3 dave-connors-3 requested a review from a team as a code owner September 21, 2022 15:53
@gshank
Copy link
Contributor

gshank commented Sep 21, 2022

I would be happy with just updating one of the existing tests/functional tests that do "--full-refresh" with the new shortcut, such as tests/functional/materializations/test_runtime_materialization.py

Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@stu-k stu-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing stands out 👍

@iknox-fa iknox-fa self-requested a review September 21, 2022 16:33
Copy link
Contributor

@iknox-fa iknox-fa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@gshank gshank closed this Sep 21, 2022
@gshank gshank reopened this Sep 21, 2022
@gshank gshank merged commit c109f39 into main Sep 21, 2022
@gshank gshank deleted the feature/full-refresh-flag-shorthand branch September 21, 2022 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes cli ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1204] [Feature] Add shorthand for --full-refresh flag
6 participants