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

Feature: Update Models #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

mtsadler-branch
Copy link
Contributor

@mtsadler-branch mtsadler-branch commented Aug 11, 2022

Overview:
This PR serves as Proof-of-concept for how to use org-not-included/dbt_table_diff@v1.

dbt_table_diff will add a comment on Open PRs with Row and Column comparisons between your dev and prod environments.

In .github/workflows/main.yml there is an example Github Workflow, which calls dbt_table_diff and adds a comment on this PR.

Changes:

  • changed id to new_id in models/example/
  • added more rows to my_first_dbt_model (2->3)
  • made it so my_second_dbt_model should have less rows (1->0)

@org-not-included org-not-included deleted a comment from mtsadler Aug 12, 2022
@org-not-included org-not-included deleted a comment from mtsadler Aug 12, 2022
@org-not-included org-not-included deleted a comment from branch-ci Sep 5, 2022
@org-not-included org-not-included deleted a comment from mtsadler Sep 5, 2022
@org-not-included org-not-included deleted a comment from mtsadler Sep 5, 2022
@org-not-included org-not-included deleted a comment from mtsadler Sep 5, 2022
@org-not-included org-not-included deleted a comment from mtsadler Sep 11, 2022
@org-not-included org-not-included deleted a comment from mtsadler Sep 11, 2022
@mtsadler
Copy link


Relevant Files Changed:

- models/example/my_first_dbt_model.sql  
- models/example/my_second_dbt_model.sql  

Failures:

  • check_table_column_count.sql
  • check_table_row_count.sql
  • custom_check.sql

Test: check_table_column_count.sql

  • prod_example.my_first_dbt_model
    • Columns only found in dev_example: new_id
    • Columns only found in prod_example: id
  • prod_example.my_second_dbt_model
    • Columns only found in dev_example: newest_id
    • Columns only found in prod_example: id

Test: check_table_row_count.sql

Table Name Dev Count Prod Count Diff %
my_first_dbt_model 3 2 50.00%
my_second_dbt_model 0 0 0.00%

Custom Test: custom_check.sql

  • prod_example.my_first_dbt_model
    • Results: 24,8,16
  • prod_example.my_second_dbt_model
    • Results: 0,0,0

Copy link

@orgnotincluded orgnotincluded left a comment

Choose a reason for hiding this comment

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

👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants