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

Update dim__orgs.sql #183

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

Update dim__orgs.sql #183

wants to merge 12 commits into from

Conversation

diveart
Copy link
Collaborator

@diveart diveart commented Jul 26, 2024

No description provided.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

@diveart diveart added demo demo PR to show features and removed demo demo PR to show features labels Nov 11, 2024
datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

datafold[bot]

This comment was marked as resolved.

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.

✨ AI Overview

This AI-generated summary of your pull request analyzes your code changes and their potential impact on your data. As this feature is still experimental, please review the details carefully.

  • Major changes to organization identifiers: The modification to org_id using modulo operations (org_id % 49) reduces the total number of organizations from 788 to 541. This has cascading effects on downstream tables, particularly impacting SALES__SYNC which shows a 45% reduction in records.

  • Subscription plan reclassification: The new logic automatically classifies organizations with 1 or fewer users as 'Individual' plans, affecting 200 subscription plan records. Additionally, null prices are now defaulted to 0, which could impact financial calculations and reporting accuracy.

  • Modified user count calculation: The change to num_users calculation (count(distinct user_id) + org_id % 2) affects 263 organizations and has significant downstream impact on financial metrics. Both monthly and yearly financial tables show substantial differences in subscriber counts and revenue calculations.

🕵️ Details

View CI Run Details →

Base branch Pull Request branch
master (7334c0f) snowflake-patch-1 (e3fa207)
Tables modified: 1 (details)
  • Different: 1
DEMO.CORE.DIM__ORGS
Primary keys ORG_ID
master snowflake-patch-1
DIFFERENCES
  Total rows ~788 ~541 -31.3%
 Columns with changed type/order: 1
column change
NUM_USERS NUMBER(18,0) → NUMBER(38,0)  
  Exclusive PKs ~257 ~10
 4 column(s) with differing values
column number of rows
NUM_USERS ~263  49.5%
SUB_PLAN ~200  37.7%
SUB_PRICE ~200  37.7%
SUB_CREATED_AT ~55  10.4%
View details →
 
Unchanged Attributes
Total columns 6
Common unique PKs 531
Rows with NULL PKs 0
Rows with duplicate PKs 0

Downstream tables: 3 (details)
  • Different: 3
DEMO.CORE.FCT__YEARLY__FINANCIALS
Primary keys DATE_YEAR
master snowflake-patch-1
DIFFERENCES
  Total rows ~2 ~1 -50.0%
  Exclusive PKs ~1 ~0
 2 column(s) with differing values
column number of rows
YEARLY_REVENUE ~1  100.0%
YEARLY_SUBSCRIBERS ~1  100.0%
View details →
 
Unchanged Attributes
Total columns 3
Schema changes 0
Common unique PKs 1
Rows with NULL PKs 0
Rows with duplicate PKs 0
 
 Modified upstream models   model.demo.dim__orgs

DEMO.CORE.FCT__MONTHLY__FINANCIALS
Primary keys DATE_MONTH
master snowflake-patch-1
DIFFERENCES
  Total rows ~11 ~8 -27.3%
  Exclusive PKs ~3 ~0
 2 column(s) with differing values
column number of rows
CNT_SUBSCRIBERS ~7  87.5%
SUM_REVENUE ~7  87.5%
View details →
 
Unchanged Attributes
Total columns 3
Schema changes 0
Common unique PKs 8
Rows with NULL PKs 0
Rows with duplicate PKs 0
 
 Modified upstream models   model.demo.dim__orgs

DEMO.CORE.SALES__SYNC
Primary keys ORG_ID
master snowflake-patch-1
DIFFERENCES
  Total rows ~20 ~11 -45.0%
  Exclusive PKs ~20 ~11
View details →
 
Unchanged Attributes
Total columns 2
Schema changes 0
Common unique PKs 0
Rows with NULL PKs 0
Rows with duplicate PKs 0
Columns with different values 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.

2 participants