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

Refactor dim_orgs and incorporate changes into sales_sync #125

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

Conversation

leoebfolsom
Copy link
Collaborator

  1. Update logic of dim_orgs.created_at
    • The dim_orgs model is built around the first user sign_up event, but I noticed we have an org_created event that might make more sense to use.
    • Seems very likely that there could be a big time difference between an org creation and the first user signing in, or an org never having a user sign in.
    • So, we're swapping sign_up events for org_created events in model dim_orgs
  2. Set dim_orgs.sub_price to 0 when the value would be null.
  3. Recategorize dim_orgs.sub_plan to Individual when num_users is 1
  4. Include Individual opportunities in the Sales Sync.
  5. Trivial change to num_users.

Copy link

@datafold datafold bot left a comment

Choose a reason for hiding this comment

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

View CI Job Details →
Base branch Pull Request branch
master (1504585) update-dim_users-dim_orgs (9df55af)
Data Diffs of tables modified in this pull request: 3
  • Different: 2
  • Identical: 1
DEMO.CORE.SALES_SYNC
Primary keys ORG_ID
master update-dim_users-dim...
DIFFERENCES
  Total rows 4 5 +25.0%
  Exclusive PKs 0 1
View details →
 
2 potential data app dependencies
 
Unchanged Attributes
Total columns 2
Schema changes 0
Common unique PKs 4
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

DEMO.CORE.DIM_ORGS
Primary keys ORG_ID
DIFFERENCES
 3 column(s) with differing values
column number of rows
SUB_PLAN 101  64.3%
NUM_USERS 31  19.7%
SUB_PRICE 21  13.4%
View details →
 
18 potential data app dependencies
 
Unchanged Attributes
Total rows 157
Total columns 6
Schema changes 0
Common unique PKs 157
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0

DEMO.CORE.DIM_USERS
Primary keys USER_ID
View details →
 
Unchanged Attributes
Total rows 475
Total columns 1
Schema changes 0
Common unique PKs 475
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

Skipped Data Diffs of downstream tables: 2 Add "datafold:diff-all-downstream" label to this pull request to diff all affected tables
DEMO.CORE.fct_monthly_financials (table) Run Data Diff →
DEMO.CORE.fct_yearly_financials (table) Run Data Diff →

Copy link

@datafold datafold bot left a comment

Choose a reason for hiding this comment

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

View CI Job Details →
Base branch Pull Request branch
master (1504585) update-dim_users-dim_orgs (9df55af)
Data Diffs of tables modified in this pull request: 3
  • Different: 2
  • Identical: 1
DEMO.CORE.SALES_SYNC
Primary keys ORG_ID
master update-dim_users-dim...
DIFFERENCES
  Total rows 4 5 +25.0%
  Exclusive PKs 0 1
View details →
 
2 potential data app dependencies
 
Unchanged Attributes
Total columns 2
Schema changes 0
Common unique PKs 4
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

DEMO.CORE.DIM_ORGS
Primary keys ORG_ID
DIFFERENCES
 3 column(s) with differing values
column number of rows
SUB_PLAN 101  64.3%
NUM_USERS 31  19.7%
SUB_PRICE 21  13.4%
View details →
 
18 potential data app dependencies
 
Unchanged Attributes
Total rows 157
Total columns 6
Schema changes 0
Common unique PKs 157
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0

DEMO.CORE.DIM_USERS
Primary keys USER_ID
View details →
 
Unchanged Attributes
Total rows 475
Total columns 1
Schema changes 0
Common unique PKs 475
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

Data Diffs of downstream tables: 2
  • Different: 2
DEMO.CORE.FCT_MONTHLY_FINANCIALS
Primary keys DATE_MONTH
DIFFERENCES
 1 column(s) with differing values
column number of rows
SUM_REVENUE 6  100.0%
View details →
 
4 potential data app dependencies
 
Unchanged Attributes
Total rows 6
Total columns 3
Schema changes 0
Common unique PKs 6
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
 
 Modified upstream models   model.demo.dim_orgs

DEMO.CORE.FCT_YEARLY_FINANCIALS
Primary keys DATE_YEAR
DIFFERENCES
 1 column(s) with differing values
column number of rows
YEARLY_REVENUE 1  100.0%
View details →
 
Unchanged Attributes
Total rows 1
Total columns 3
Schema changes 0
Common unique PKs 1
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
 
 Modified upstream models   model.demo.dim_orgs

@leoebfolsom leoebfolsom requested a review from glebmezh May 1, 2024 15:37
Copy link

@glebmezh glebmezh left a comment

Choose a reason for hiding this comment

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

Thanks, the data diff looks good!

Copy link

@datafold datafold bot left a comment

Choose a reason for hiding this comment

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

View CI Run Details →
Base branch Pull Request branch
master (1504585) update-dim_users-dim_orgs (9df55af)
Data Diffs of tables modified in this pull request: 3
  • Different: 2
  • Identical: 1
DEMO.CORE.SALES_SYNC
Primary keys ORG_ID
master update-dim_users-dim...
DIFFERENCES
  Total rows 4 3 -25.0%
  Exclusive PKs 2 1
View details →
 
Unchanged Attributes
Total columns 2
Schema changes 0
Common unique PKs 2
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

DEMO.CORE.DIM_ORGS
Primary keys ORG_ID
master update-dim_users-dim...
DIFFERENCES
  Total rows 157 146 -7.0%
  Exclusive PKs 11 0
 2 column(s) with differing values
column number of rows
CREATED_AT 112  76.7%
SUB_PLAN 94  64.4%
View details →
 
11 potential data app dependencies
 
Unchanged Attributes
Total columns 6
Schema changes 0
Common unique PKs 146
Rows with NULL PKs 0
Rows with duplicate PKs 0

DEMO.CORE.DIM_USERS
Primary keys USER_ID
View details →
 
Unchanged Attributes
Total rows 475
Total columns 1
Schema changes 0
Common unique PKs 475
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

Skipped Data Diffs of downstream tables: 2 Add "datafold:diff-all-downstream" label to this pull request to diff all affected tables
DEMO.CORE.fct_monthly_financials (table) Run Data Diff →
DEMO.CORE.fct_yearly_financials (table) Run Data Diff →

@leoebfolsom leoebfolsom added demo demo PR to show features Snowflake labels Jul 19, 2024
@pvenigal pvenigal added demo demo PR to show features datafold and removed demo demo PR to show features datafold labels Jul 22, 2024
@pvenigal pvenigal removed the datafold label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants