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

Source freshness task node selection and cli command parity #3554

Merged
merged 6 commits into from
Jul 21, 2021

Conversation

kwigley
Copy link
Contributor

@kwigley kwigley commented Jul 9, 2021

resolves #2987

Description

  • adds support for node selection (--select, --exclude, --selector)
  • aligns selection syntax with other commands: dbt source freshness --select raw_payments -> dbt source freshness --select source:raw_payments
  • rename cli and rpc command to source freshness
  • continue to support source snapshot-freshness via cli and rpc

Note: There is no deprecation warning for using the old command name, it wasn't as simple as I initially thought (#3565)

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

@cla-bot cla-bot bot added the cla:yes label Jul 9, 2021
@kwigley kwigley changed the title Source freshness selection and command parity Source freshness task node selection and cli command parity Jul 9, 2021
@kwigley kwigley temporarily deployed to Postgres July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Redshift July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Redshift July 9, 2021 20:36 Inactive
@kwigley kwigley temporarily deployed to Postgres July 12, 2021 15:25 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 12, 2021 15:25 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 12, 2021 15:25 Inactive
@kwigley kwigley temporarily deployed to Redshift July 12, 2021 15:25 Inactive
@kwigley kwigley temporarily deployed to Redshift July 12, 2021 15:25 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 12, 2021 15:25 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 12, 2021 15:25 Inactive
@kwigley kwigley requested review from jtcohen6, a team, nathaniel-may and iknox-fa and removed request for a team July 13, 2021 14:01
@kwigley kwigley marked this pull request as ready for review July 13, 2021 14:01
@kwigley kwigley self-assigned this Jul 13, 2021
Copy link
Contributor

@nathaniel-may nathaniel-may 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! I like the added test cases. I think it could use more comments specifically around describing how each function fits in to the bigger picture and exactly what the goal of each test case is. Otherwise lgtm.

@@ -137,11 +137,10 @@ def raise_on_first_error(self):
return False

def get_selection_spec(self) -> SelectionSpec:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is kind of non-obvious what's happening here. A comment could be useful.

@kwigley kwigley temporarily deployed to Bigquery July 13, 2021 15:49 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 13, 2021 15:49 Inactive
@kwigley kwigley temporarily deployed to Redshift July 13, 2021 15:49 Inactive
@kwigley kwigley temporarily deployed to Redshift July 13, 2021 15:49 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 19, 2021 15:11 Inactive
@kwigley kwigley force-pushed the feature/source-freshness-parity branch from d0512eb to ebb5720 Compare July 19, 2021 18:03
@kwigley kwigley temporarily deployed to Postgres July 19, 2021 18:09 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 19, 2021 18:09 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 19, 2021 18:09 Inactive
@kwigley kwigley temporarily deployed to Redshift July 19, 2021 18:09 Inactive
@kwigley kwigley temporarily deployed to Redshift July 19, 2021 18:09 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 19, 2021 18:09 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 19, 2021 18:09 Inactive
@kwigley kwigley force-pushed the feature/source-freshness-parity branch from ebb5720 to 56b1436 Compare July 20, 2021 17:46
@kwigley kwigley temporarily deployed to Snowflake July 20, 2021 17:49 Inactive
@kwigley kwigley temporarily deployed to Snowflake July 20, 2021 17:50 Inactive
@kwigley kwigley temporarily deployed to Redshift July 20, 2021 17:50 Inactive
@kwigley kwigley temporarily deployed to Redshift July 20, 2021 17:50 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 20, 2021 17:50 Inactive
@kwigley kwigley temporarily deployed to Bigquery July 20, 2021 17:50 Inactive
@kwigley kwigley merged commit 3dd486d into develop Jul 21, 2021
@kwigley kwigley deleted the feature/source-freshness-parity branch July 21, 2021 14:31
iknox-fa pushed a commit that referenced this pull request Feb 8, 2022
* cli: add selection args for source freshness command

* rename command to `source freshness` and maintain alias to old command

* update and add tests for source freshness command and node selection

* update changelog, add comments

* fix formatting

* update changelog

automatic commit by git-black, original commits:
  3dd486d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parity for source freshness task/command
4 participants