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 #157

Closed
wants to merge 3 commits into 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 Run Details →

Base branch Pull Request branch
master-bigquery (417ccea) update-dim_orgs (724e639)
Data Diffs of tables modified in this pull request: 3
  • Different: 2
  • Identical: 1
datafold-demo-429713.prod.dim__orgs
Primary keys org_id
DIFFERENCES
 3 column(s) with differing values
column number of rows
sub_plan 149  58.9%
sub_price 70  27.7%
num_users 47  18.6%
View details →
 
Unchanged Attributes
Total rows 253
Total columns 6
Schema changes 0
Common unique PKs 253
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0

datafold-demo-429713.prod.sales__sync
Primary keys org_id
master-bigquery update-dim_orgs
DIFFERENCES
  Total rows 29 60 +106.9%
  Exclusive PKs 0 31
View details →
 
Unchanged Attributes
Total columns 2
Schema changes 0
Common unique PKs 29
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

datafold-demo-429713.prod.dim__users
Primary keys user_id
View details →
 
Unchanged Attributes
Total rows 618
Total columns 1
Schema changes 0
Common unique PKs 618
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
datafold-demo-429713.prod.fct__yearly__financials (table) Run Data Diff →
datafold-demo-429713.prod.fct__monthly__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 Run Details →

Base branch Pull Request branch
master-bigquery (417ccea) update-dim_orgs (724e639)
Data Diffs of tables modified in this pull request: 3
  • Different: 2
  • Identical: 1
datafold-demo-429713.prod.sales__sync
Primary keys org_id
master-bigquery update-dim_orgs
DIFFERENCES
  Total rows 29 60 +106.9%
  Exclusive PKs 0 31
View details →
 
Unchanged Attributes
Total columns 2
Schema changes 0
Common unique PKs 29
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 0

datafold-demo-429713.prod.dim__orgs
Primary keys org_id
DIFFERENCES
 3 column(s) with differing values
column number of rows
sub_plan 149  58.9%
sub_price 70  27.7%
num_users 47  18.6%
View details →
 
Unchanged Attributes
Total rows 253
Total columns 6
Schema changes 0
Common unique PKs 253
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0

datafold-demo-429713.prod.dim__users
Primary keys user_id
View details →
 
Unchanged Attributes
Total rows 618
Total columns 1
Schema changes 0
Common unique PKs 618
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
datafold-demo-429713.prod.fct__monthly__financials
Primary keys date_month
DIFFERENCES
 1 column(s) with differing values
column number of rows
sum_revenue 4  100.0%
View details →
 
Unchanged Attributes
Total rows 4
Total columns 3
Schema changes 0
Common unique PKs 4
Added/removed rows 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
 
 Modified upstream models   model.demo.dim__orgs

datafold-demo-429713.prod.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

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.

1 participant