%3 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report 6. model.google_play.int_google_play__store_performance 6. model.google_play.int_google_play__store_performance 6. model.google_play.int_google_play__store_performance->5. model.google_play.google_play__overview_report 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version->1. model.google_play.google_play__app_version_report 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp->7. model.google_play_source.stg_google_play__stats_crashes_app_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version->4. model.google_play.google_play__os_version_report 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp->9. model.google_play_source.stg_google_play__stats_crashes_os_version 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview->5. model.google_play.google_play__overview_report 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp->11. model.google_play_source.stg_google_play__stats_crashes_overview 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version->1. model.google_play.google_play__app_version_report 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp->13. model.google_play_source.stg_google_play__stats_installs_app_version 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country->2. model.google_play.google_play__country_report 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp->15. model.google_play_source.stg_google_play__stats_installs_country 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device->3. model.google_play.google_play__device_report 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp->17. model.google_play_source.stg_google_play__stats_installs_device 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version->4. model.google_play.google_play__os_version_report 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp->19. model.google_play_source.stg_google_play__stats_installs_os_version 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview->5. model.google_play.google_play__overview_report 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp->21. model.google_play_source.stg_google_play__stats_installs_overview 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version->1. model.google_play.google_play__app_version_report 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp->23. model.google_play_source.stg_google_play__stats_ratings_app_version 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country->2. model.google_play.google_play__country_report 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp->25. model.google_play_source.stg_google_play__stats_ratings_country 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device->3. model.google_play.google_play__device_report 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp->27. model.google_play_source.stg_google_play__stats_ratings_device 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version->4. model.google_play.google_play__os_version_report 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp->29. model.google_play_source.stg_google_play__stats_ratings_os_version 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview->5. model.google_play.google_play__overview_report 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp->31. model.google_play_source.stg_google_play__stats_ratings_overview 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country->2. model.google_play.google_play__country_report 33. model.google_play_source.stg_google_play__store_performance_country->6. model.google_play.int_google_play__store_performance 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp->33. model.google_play_source.stg_google_play__store_performance_country 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp->35. model.google_play_source.stg_google_play__store_performance_source 37. seed.google_play_source.google_play__country_codes 37. seed.google_play_source.google_play__country_codes 37. seed.google_play_source.google_play__country_codes->2. model.google_play.google_play__country_report 38. source.google_play_source.google_play.stats_crashes_app_version 38. source.google_play_source.google_play.stats_crashes_app_version 38. source.google_play_source.google_play.stats_crashes_app_version->8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 39. source.google_play_source.google_play.stats_crashes_os_version 39. source.google_play_source.google_play.stats_crashes_os_version 39. source.google_play_source.google_play.stats_crashes_os_version->10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 40. source.google_play_source.google_play.stats_crashes_overview 40. source.google_play_source.google_play.stats_crashes_overview 40. source.google_play_source.google_play.stats_crashes_overview->12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 41. source.google_play_source.google_play.stats_installs_app_version 41. source.google_play_source.google_play.stats_installs_app_version 41. source.google_play_source.google_play.stats_installs_app_version->14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 42. source.google_play_source.google_play.stats_installs_country 42. source.google_play_source.google_play.stats_installs_country 42. source.google_play_source.google_play.stats_installs_country->16. model.google_play_source.stg_google_play__stats_installs_country_tmp 43. source.google_play_source.google_play.stats_installs_device 43. source.google_play_source.google_play.stats_installs_device 43. source.google_play_source.google_play.stats_installs_device->18. model.google_play_source.stg_google_play__stats_installs_device_tmp 44. source.google_play_source.google_play.stats_installs_os_version 44. source.google_play_source.google_play.stats_installs_os_version 44. source.google_play_source.google_play.stats_installs_os_version->20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 45. source.google_play_source.google_play.stats_installs_overview 45. source.google_play_source.google_play.stats_installs_overview 45. source.google_play_source.google_play.stats_installs_overview->22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 46. source.google_play_source.google_play.stats_ratings_app_version 46. source.google_play_source.google_play.stats_ratings_app_version 46. source.google_play_source.google_play.stats_ratings_app_version->24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 47. source.google_play_source.google_play.stats_ratings_country 47. source.google_play_source.google_play.stats_ratings_country 47. source.google_play_source.google_play.stats_ratings_country->26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 48. source.google_play_source.google_play.stats_ratings_device 48. source.google_play_source.google_play.stats_ratings_device 48. source.google_play_source.google_play.stats_ratings_device->28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 49. source.google_play_source.google_play.stats_ratings_os_version 49. source.google_play_source.google_play.stats_ratings_os_version 49. source.google_play_source.google_play.stats_ratings_os_version->30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 50. source.google_play_source.google_play.stats_ratings_overview 50. source.google_play_source.google_play.stats_ratings_overview 50. source.google_play_source.google_play.stats_ratings_overview->32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 51. source.google_play_source.google_play.stats_store_performance_country 51. source.google_play_source.google_play.stats_store_performance_country 51. source.google_play_source.google_play.stats_store_performance_country->34. model.google_play_source.stg_google_play__store_performance_country_tmp 52. source.google_play_source.google_play.stats_store_performance_traffic_source 52. source.google_play_source.google_play.stats_store_performance_traffic_source 52. source.google_play_source.google_play.stats_store_performance_traffic_source->36. model.google_play_source.stg_google_play__store_performance_source_tmp
1. model.google_play.google_play__app_version_report

This SQL query combines and processes data from multiple Google Play app statistics tables (installs, ratings, and crashes) to create a comprehensive app version report. It performs several operations including joining the tables, calculating rolling metrics, filling in missing values, and creating derived metrics such as net device installs. The query handles different granularities of data and ensures consistency across various app versions and dates.

IntegrationFeaturizationCleaningAggregationOther
SQL Query
WITH installs AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_app_version
), ratings AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_app_version
), crashes AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_crashes_app_version
), install_metrics AS (
  SELECT
    *,
    SUM(device_installs) OVER (PARTITION BY app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    SUM(device_uninstalls) OVER (PARTITION BY app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM installs
), app_version_join AS (
  SELECT
    COALESCE(install_metrics.date_day, ratings.date_day, crashes.date_day) AS date_day, /* these 3 columns are the grain of this model */
    COALESCE(install_metrics.app_version_code, ratings.app_version_code, crashes.app_version_code) AS app_version_code,
    COALESCE(install_metrics.package_name, ratings.package_name, crashes.package_name) AS package_name,
    COALESCE(install_metrics.active_devices_last_30_days, 0) AS active_devices_last_30_days, /* metrics based on unique devices + users */
    COALESCE(install_metrics.device_installs, 0) AS device_installs,
    COALESCE(install_metrics.device_uninstalls, 0) AS device_uninstalls,
    COALESCE(install_metrics.device_upgrades, 0) AS device_upgrades,
    COALESCE(install_metrics.user_installs, 0) AS user_installs,
    COALESCE(install_metrics.user_uninstalls, 0) AS user_uninstalls,
    COALESCE(crashes.crashes, 0) AS crashes, /* metrics based on events. a user or device can have multiple events in one day */
    COALESCE(crashes.anrs, 0) AS anrs,
    COALESCE(install_metrics.install_events, 0) AS install_events,
    COALESCE(install_metrics.uninstall_events, 0) AS uninstall_events,
    COALESCE(install_metrics.update_events, 0) AS update_events,
    install_metrics.total_device_installs,
    install_metrics.total_device_uninstalls,
    ratings.average_rating, /* this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating */
    ratings.rolling_total_average_rating
  FROM install_metrics
  FULL OUTER JOIN ratings
    ON install_metrics.date_day = ratings.date_day
    AND install_metrics.package_name = ratings.package_name
    AND /* choosing an arbitrary negative integer as we can't coalesce with a string like 'null_version_code'. null app version codes will cause fanout */ COALESCE(install_metrics.app_version_code, -5) = COALESCE(ratings.app_version_code, -5) /* this really doesn't happen IRL but let's be safe */
  FULL OUTER JOIN crashes
    ON COALESCE(install_metrics.date_day, ratings.date_day) = crashes.date_day
    AND COALESCE(install_metrics.package_name, ratings.package_name) = crashes.package_name
    AND COALESCE(install_metrics.app_version_code, ratings.app_version_code, -5) = COALESCE(crashes.app_version_code, -5)
), create_partitions /* to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values */ /* we can't just use last_value(ignore nulls) because of postgres :/ */ AS (
  SELECT
    *,
    SUM(CASE WHEN rolling_total_average_rating IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating_partition,
    SUM(CASE WHEN total_device_installs IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs_partition,
    SUM(CASE WHEN total_device_uninstalls IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls_partition
  FROM app_version_join
), fill_values /* now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch */ AS (
  SELECT
    date_day,
    app_version_code,
    package_name,
    active_devices_last_30_days,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    crashes,
    anrs,
    install_events,
    uninstall_events,
    update_events,
    average_rating,
    FIRST_VALUE(rolling_total_average_rating) OVER (PARTITION BY rolling_total_average_rating_partition, app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating,
    FIRST_VALUE(total_device_installs) OVER (PARTITION BY total_device_installs_partition, app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    FIRST_VALUE(total_device_uninstalls) OVER (PARTITION BY total_device_uninstalls_partition, app_version_code, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM create_partitions
), final AS (
  SELECT
    date_day,
    app_version_code,
    package_name,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    crashes,
    anrs,
    install_events,
    uninstall_events,
    update_events,
    active_devices_last_30_days,
    average_rating,
    rolling_total_average_rating, /* leave null if there are no ratings yet */
    COALESCE(total_device_installs, 0) AS total_device_installs, /* the first day will have NULL values, let's make it 0 */
    COALESCE(total_device_uninstalls, 0) AS total_device_uninstalls,
    COALESCE(total_device_installs, 0) /* calculate difference rolling metric */ - COALESCE(total_device_uninstalls, 0) AS net_device_installs
  FROM fill_values
)
SELECT
  *
FROM final
%3 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report active_devices_last_30_days app_version_code device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events anrs crashes rolling_total_average_rating average_rating total_device_installs total_device_uninstalls net_device_installs 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version app_version_code anrs crashes date_day package_name 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f1 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f1->1. model.google_play.google_play__app_version_report:f12 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f2->1. model.google_play.google_play__app_version_report:f13 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f3->1. model.google_play.google_play__app_version_report:f7 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f4->1. model.google_play.google_play__app_version_report:f9 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version active_devices_last_30_days app_version_code device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f1->1. model.google_play.google_play__app_version_report:f1 13. model.google_play_source.stg_google_play__stats_installs_app_version:f2->1. model.google_play.google_play__app_version_report:f2 13. model.google_play_source.stg_google_play__stats_installs_app_version:f2->1. model.google_play.google_play__app_version_report:f16 13. model.google_play_source.stg_google_play__stats_installs_app_version:f3->1. model.google_play.google_play__app_version_report:f3 13. model.google_play_source.stg_google_play__stats_installs_app_version:f3->1. model.google_play.google_play__app_version_report:f17 13. model.google_play_source.stg_google_play__stats_installs_app_version:f4->1. model.google_play.google_play__app_version_report:f4 13. model.google_play_source.stg_google_play__stats_installs_app_version:f5->1. model.google_play.google_play__app_version_report:f5 13. model.google_play_source.stg_google_play__stats_installs_app_version:f6->1. model.google_play.google_play__app_version_report:f6 13. model.google_play_source.stg_google_play__stats_installs_app_version:f7->1. model.google_play.google_play__app_version_report:f7 13. model.google_play_source.stg_google_play__stats_installs_app_version:f8->1. model.google_play.google_play__app_version_report:f8 13. model.google_play_source.stg_google_play__stats_installs_app_version:f9->1. model.google_play.google_play__app_version_report:f9 13. model.google_play_source.stg_google_play__stats_installs_app_version:f10->1. model.google_play.google_play__app_version_report:f10 13. model.google_play_source.stg_google_play__stats_installs_app_version:f11->1. model.google_play.google_play__app_version_report:f11 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version app_version_code average_rating date_day package_name rolling_total_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f1 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f1->1. model.google_play.google_play__app_version_report:f15 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f2->1. model.google_play.google_play__app_version_report:f7 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f3->1. model.google_play.google_play__app_version_report:f9 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f4->1. model.google_play.google_play__app_version_report:f14
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
app_version_code INT64 Integer value of the version of the app being reported on.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
anrs INT64 Daily application not responding (ANR) reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
crashes INT64 Daily crash reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
total_device_installs INT64 Cumulative number of device installs up to and including this day (aggregated on the dimension of this table). This does not take uninstalls into account and may contain duplicate devices.
total_device_uninstalls INT64 Cumulative number of device uninstalls up to and including this day (aggregated on the dimension of this table). This does not take re-installs into account and may contain duplicate devices.
net_device_installs INT64 Cumulative net number of device installs up to and including this day (aggregated on the dimension of this table). This is the difference of `total_device_installs` and `total_device_uninstalls`.
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version active_devices_last_30_days 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report active_devices_last_30_days 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp active_device_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[active_device_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed value of active_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[active_devices_last_30_days]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly copied after coalescing with 0
Column Lineage
%3 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version app_version_code 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version app_version_code 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version app_version_code 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp app_version_code 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp app_version_code 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp app_version_code 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[app_version_code]
    • Cleaning The column is cast to INT type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • app_version_code: It is directly mapped after casting to INT
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[app_version_code]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • app_version_code: Directly copied
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[app_version_code]
    • Cleaning The column is cast to INT type
    • Filtering Used in CASE statements to filter null values
    • Output Columns:
      • app_version_code: Directly mapped after casting
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[app_version_code]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • app_version_code: Directly copied
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[app_version_code]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to partition data
    • Output Columns:
      • app_version_code: Directly copied to the output
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[app_version_code]
    • Integration Used as a key to join with other tables
    • Deduplication Used to partition data for rolling calculations
    • Output Columns:
      • app_version_code: Directly copied to output
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_installs 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_installs total_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly copied after coalescing with 0
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_uninstalls 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_uninstalls total_device_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly copied after coalescing with 0
      • total_device_uninstalls: Aggregated in a window function
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_upgrades 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_upgrades 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_upgrades 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_upgrades: Aggregated sum of daily_device_upgrades
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_upgrades]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • device_upgrades: Directly copied after coalescing with 0
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version user_installs 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report user_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_user_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_user_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed value of daily_user_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[user_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • user_installs: Directly copied after coalescing with 0
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version user_uninstalls 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report user_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_user_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_user_uninstalls]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed value of daily_user_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[user_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • user_uninstalls: Directly copied after coalescing with 0
Column Lineage
%3 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version date_day 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version date_day 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version date_day 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp date 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp date 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp date 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • date_day: It is directly mapped after casting to DATE
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[date]
    • Cleaning The column is cast as DATE type
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[date_day]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • date_day: Directly copied as part of COALESCE(install_metrics.date_day, ratings.date_day, crashes.date_day)
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[date_day]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to order data
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[date_day]
    • Integration Used as a key to join with other tables
    • Deduplication Used to order data for rolling calculations
    • Output Columns:
      • date_day: Directly copied to output
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version install_events 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report install_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp install_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[install_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Summed value of install_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[install_events]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • install_events: Directly copied after coalescing with 0
Column Lineage
%3 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version package_name 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version package_name 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version package_name 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp package_name 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp package_name 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp package_name 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[package_name]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • package_name: It is directly mapped after casting to TEXT
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • package_name: Directly copied
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[package_name]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • package_name: Directly copied as part of COALESCE(install_metrics.package_name, ratings.package_name, crashes.package_name)
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[package_name]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to partition data
    • Output Columns:
      • package_name: Directly copied to the output
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[package_name]
    • Integration Used as a key to join with other tables
    • Deduplication Used to partition data for rolling calculations
    • Output Columns:
      • package_name: Directly copied to output
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version uninstall_events 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report uninstall_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp uninstall_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[uninstall_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Summed value of uninstall_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as part of the FULL OUTER JOIN operation
    • Output Columns:
      • uninstall_events: It is directly copied to the output column 'uninstall_events'
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version update_events 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report update_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp update_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[update_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Summed value of update_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[update_events]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as part of the FULL OUTER JOIN operation
    • Output Columns:
      • update_events: It is directly copied to the output column 'update_events'
Column Lineage
%3 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version anrs 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report anrs 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp daily_anrs 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[daily_anrs]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • anrs: It is aggregated (SUM) to form the anrs column
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[anrs]
    • Direct Directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • anrs: Directly copied with COALESCE(crashes.anrs, 0)
Column Lineage
%3 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version crashes 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report crashes 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp daily_crashes 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[daily_crashes]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • crashes: It is aggregated (SUM) to form the crashes column
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[crashes]
    • Direct Directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • crashes: Directly copied with COALESCE(crashes.crashes, 0)
Column Lineage
%3 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version rolling_total_average_rating 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report rolling_total_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp total_average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[total_average_rating]
    • Cleaning The column is cast to FLOAT
    • Filtering Used in a CASE statement to filter based on app_version_code
    • Output Columns:
      • rolling_total_average_rating: Conditionally mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[rolling_total_average_rating]
    • Direct Copied without transformation
    • Other Used in a window function to fill in missing values
    • Output Columns:
      • rolling_total_average_rating: Copied and potentially filled in for missing dates
Column Lineage
%3 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version average_rating 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp daily_average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[daily_average_rating]
    • Cleaning The column is cast to FLOAT, with 'NA' values converted to NULL
    • Output Columns:
      • average_rating: Transformed and mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[average_rating]
    • Direct Copied without transformation
    • Output Columns:
      • average_rating: Directly copied to output
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_installs 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_installs total_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly copied after coalescing with 0
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_uninstalls 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_uninstalls total_device_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly copied after coalescing with 0
      • total_device_uninstalls: Aggregated in a window function
2. model.google_play.google_play__country_report

This SQL query combines and processes data from multiple Google Play Store sources to create a comprehensive country-level report. It integrates install metrics, ratings, and store performance data, calculates rolling totals and averages, fills in missing values, and adds geographical information. The query also computes various metrics such as total installs, uninstalls, store conversions, and net device installs.

IntegrationCleaningFeaturizationAggregationOther
SQL Query
WITH installs AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_country
), ratings AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_country
), store_performance AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__store_performance_country
), country_codes AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.google_play__country_codes
), install_metrics AS (
  SELECT
    *,
    SUM(device_installs) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    SUM(device_uninstalls) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM installs
), store_performance_metrics AS (
  SELECT
    *,
    SUM(store_listing_acquisitions) OVER (PARTITION BY country_region, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions,
    SUM(store_listing_visitors) OVER (PARTITION BY country_region, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors
  FROM store_performance
), country_join AS (
  SELECT
    COALESCE(install_metrics.date_day, ratings.date_day, store_performance_metrics.date_day) AS date_day, /* these 3 columns are the grain of this model */
    COALESCE(install_metrics.country, ratings.country, store_performance_metrics.country_region) AS country,
    COALESCE(
      install_metrics.package_name,
      ratings.package_name,
      store_performance_metrics.package_name
    ) AS package_name,
    COALESCE(install_metrics.active_devices_last_30_days, 0) AS active_devices_last_30_days, /* metrics based on unique devices + users */
    COALESCE(install_metrics.device_installs, 0) AS device_installs,
    COALESCE(install_metrics.device_uninstalls, 0) AS device_uninstalls,
    COALESCE(install_metrics.device_upgrades, 0) AS device_upgrades,
    COALESCE(install_metrics.user_installs, 0) AS user_installs,
    COALESCE(install_metrics.user_uninstalls, 0) AS user_uninstalls,
    COALESCE(store_performance_metrics.store_listing_acquisitions, 0) AS store_listing_acquisitions,
    COALESCE(store_performance_metrics.store_listing_visitors, 0) AS store_listing_visitors,
    store_performance_metrics.store_listing_conversion_rate, /* not coalescing if there aren't any visitors */
    COALESCE(install_metrics.install_events, 0) AS install_events, /* metrics based on events. a user or device can have multiple installs in one day */
    COALESCE(install_metrics.uninstall_events, 0) AS uninstall_events,
    COALESCE(install_metrics.update_events, 0) AS update_events,
    install_metrics.total_device_installs,
    install_metrics.total_device_uninstalls,
    ratings.average_rating, /* this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating */
    ratings.rolling_total_average_rating,
    store_performance_metrics.total_store_acquisitions,
    store_performance_metrics.total_store_visitors
  FROM install_metrics
  FULL OUTER JOIN ratings
    ON install_metrics.date_day = ratings.date_day
    AND install_metrics.package_name = ratings.package_name
    AND /* coalesce null countries otherwise they'll cause fanout with the full outer join */ COALESCE(install_metrics.country, 'null_country') = COALESCE(ratings.country, 'null_country') /* in the source package we aggregate all null country records together into one batch per day */
  FULL OUTER JOIN store_performance_metrics
    ON store_performance_metrics.date_day = COALESCE(install_metrics.date_day, ratings.date_day)
    AND store_performance_metrics.package_name = COALESCE(install_metrics.package_name, ratings.package_name)
    AND COALESCE(store_performance_metrics.country_region, 'null_country') = COALESCE(install_metrics.country, ratings.country, 'null_country')
), create_partitions /* to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values */ /* we can't just use last_value(ignore nulls) because of postgres :/ */ AS (
  SELECT
    *,
    SUM(CASE WHEN rolling_total_average_rating IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating_partition,
    SUM(CASE WHEN total_device_installs IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs_partition,
    SUM(CASE WHEN total_device_uninstalls IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls_partition,
    SUM(CASE WHEN total_store_acquisitions IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions_partition,
    SUM(CASE WHEN total_store_visitors IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors_partition
  FROM country_join
), fill_values /* now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch */ AS (
  SELECT
    date_day,
    country,
    package_name,
    active_devices_last_30_days,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    install_events,
    uninstall_events,
    update_events,
    store_listing_acquisitions,
    store_listing_visitors,
    store_listing_conversion_rate,
    average_rating,
    FIRST_VALUE(rolling_total_average_rating) OVER (PARTITION BY rolling_total_average_rating_partition, country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating,
    FIRST_VALUE(total_device_installs) OVER (PARTITION BY total_device_installs_partition, country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    FIRST_VALUE(total_device_uninstalls) OVER (PARTITION BY total_device_uninstalls_partition, country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls,
    FIRST_VALUE(total_store_acquisitions) OVER (PARTITION BY total_store_acquisitions_partition, country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions,
    FIRST_VALUE(total_store_visitors) OVER (PARTITION BY total_store_visitors_partition, country, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors
  FROM create_partitions
), final AS (
  SELECT
    date_day,
    country AS country_short,
    COALESCE(country_codes.alternative_country_name, country_codes.country_name) AS country_long,
    country_codes.region,
    country_codes.sub_region,
    package_name,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    install_events,
    uninstall_events,
    update_events,
    store_listing_acquisitions,
    store_listing_visitors,
    store_listing_conversion_rate,
    active_devices_last_30_days,
    average_rating,
    rolling_total_average_rating, /* leave null if there are no ratings yet */
    COALESCE(total_device_installs, 0) AS total_device_installs, /* the first day will have NULL values, let's make it 0 */
    COALESCE(total_device_uninstalls, 0) AS total_device_uninstalls,
    COALESCE(total_store_acquisitions, 0) AS total_store_acquisitions,
    COALESCE(total_store_visitors, 0) AS total_store_visitors,
    ROUND(
      CAST(total_store_acquisitions AS DECIMAL(28, 6)) / NULLIF(total_store_visitors, 0),
      4
    ) AS rolling_store_conversion_rate, /* calculate percentage and difference rolling metrics */
    COALESCE(total_device_installs, 0) - COALESCE(total_device_uninstalls, 0) AS net_device_installs
  FROM fill_values
  LEFT JOIN country_codes
    ON country_codes.country_code_alpha_2 = fill_values.country
)
SELECT
  *
FROM final
%3 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report active_devices_last_30_days country_short country_long region sub_region device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events rolling_total_average_rating average_rating total_device_installs total_device_uninstalls net_device_installs store_listing_acquisitions store_listing_conversion_rate store_listing_visitors total_store_acquisitions total_store_visitors rolling_store_conversion_rate 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country active_devices_last_30_days country device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f1->2. model.google_play.google_play__country_report:f1 15. model.google_play_source.stg_google_play__stats_installs_country:f2->2. model.google_play.google_play__country_report:f5 15. model.google_play_source.stg_google_play__stats_installs_country:f2->2. model.google_play.google_play__country_report:f17 15. model.google_play_source.stg_google_play__stats_installs_country:f3->2. model.google_play.google_play__country_report:f6 15. model.google_play_source.stg_google_play__stats_installs_country:f3->2. model.google_play.google_play__country_report:f18 15. model.google_play_source.stg_google_play__stats_installs_country:f4->2. model.google_play.google_play__country_report:f7 15. model.google_play_source.stg_google_play__stats_installs_country:f5->2. model.google_play.google_play__country_report:f8 15. model.google_play_source.stg_google_play__stats_installs_country:f6->2. model.google_play.google_play__country_report:f9 15. model.google_play_source.stg_google_play__stats_installs_country:f7->2. model.google_play.google_play__country_report:f10 15. model.google_play_source.stg_google_play__stats_installs_country:f8->2. model.google_play.google_play__country_report:f11 15. model.google_play_source.stg_google_play__stats_installs_country:f9->2. model.google_play.google_play__country_report:f12 15. model.google_play_source.stg_google_play__stats_installs_country:f10->2. model.google_play.google_play__country_report:f13 15. model.google_play_source.stg_google_play__stats_installs_country:f11->2. model.google_play.google_play__country_report:f14 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country country average_rating date_day package_name rolling_total_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f1 25. model.google_play_source.stg_google_play__stats_ratings_country:f1->2. model.google_play.google_play__country_report:f16 25. model.google_play_source.stg_google_play__stats_ratings_country:f2->2. model.google_play.google_play__country_report:f10 25. model.google_play_source.stg_google_play__stats_ratings_country:f3->2. model.google_play.google_play__country_report:f12 25. model.google_play_source.stg_google_play__stats_ratings_country:f4->2. model.google_play.google_play__country_report:f15 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country country_region date_day package_name store_listing_acquisitions store_listing_conversion_rate store_listing_visitors 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 33. model.google_play_source.stg_google_play__store_performance_country:f1->2. model.google_play.google_play__country_report:f10 33. model.google_play_source.stg_google_play__store_performance_country:f2->2. model.google_play.google_play__country_report:f12 33. model.google_play_source.stg_google_play__store_performance_country:f3->2. model.google_play.google_play__country_report:f20 33. model.google_play_source.stg_google_play__store_performance_country:f3->2. model.google_play.google_play__country_report:f23 33. model.google_play_source.stg_google_play__store_performance_country:f4->2. model.google_play.google_play__country_report:f21 33. model.google_play_source.stg_google_play__store_performance_country:f5->2. model.google_play.google_play__country_report:f22 33. model.google_play_source.stg_google_play__store_performance_country:f5->2. model.google_play.google_play__country_report:f24 33. model.google_play_source.stg_google_play__store_performance_country:f5->2. model.google_play.google_play__country_report:f25 37. seed.google_play_source.google_play__country_codes 37. seed.google_play_source.google_play__country_codes country_name alternative_country_name country_code_alpha_2 region sub_region 37. seed.google_play_source.google_play__country_codes:f0->2. model.google_play.google_play__country_report:f2 37. seed.google_play_source.google_play__country_codes:f1->2. model.google_play.google_play__country_report:f2 37. seed.google_play_source.google_play__country_codes:f3->2. model.google_play.google_play__country_report:f3 37. seed.google_play_source.google_play__country_codes:f4->2. model.google_play.google_play__country_report:f4
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
country_short STRING Two-letter abbreviation of the country where the user’s Google account is registered.
country_long STRING Full name of the country.
region STRING Geographical region of the country.
sub_region STRING Geographical subregion of the country.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
total_device_installs INT64 Cumulative number of device installs up to and including this day (aggregated on the dimension of this table). This does not take uninstalls into account and may contain duplicate devices.
total_device_uninstalls INT64 Cumulative number of device uninstalls up to and including this day (aggregated on the dimension of this table). This does not take re-installs into account and may contain duplicate devices.
net_device_installs INT64 Cumulative net number of device installs up to and including this day (aggregated on the dimension of this table). This is the difference of `total_device_installs` and `total_device_uninstalls`.
store_listing_acquisitions INT64 The number of users that visited your store listing and installed your app, who did not have your app installed on any device.
store_listing_conversion_rate FLOAT64 The percentage of store listing visitors who installed your app on a given day. Note: Does not include visits or installs from users who already have your app installed on another device
store_listing_visitors INT64 The number of users that visited your store listing who did not have your app installed on any device.
total_store_acquisitions INT64 Cumulative number of users that visited your store listing and installed your app, who did not have your app installed on any device prior to this.
total_store_visitors INT64 Cumulative number of users that visited your store listing who did not have your app installed on any device at the time.
rolling_store_conversion_rate NUMERIC Rolling percentage of store listing visitors who installed your app within a given country. The ratio of `total_store_acquisitions` to `total_store_visitors`.
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country active_devices_last_30_days 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report active_devices_last_30_days 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp active_device_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[active_device_installs]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed up to calculate the total active devices in the last 30 days
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country country 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country country 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country country_region 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp country 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp country 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp country_region 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[country]
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • country: It is directly mapped without transformation
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[country]
    • Direct The column is directly copied
    • Filtering Used to filter out null values in average_rating calculation
    • Output Columns:
      • country: Directly mapped
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[country_region]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by
    • Output Columns:
      • country_region: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[country]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • country_short: Directly mapped
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[country]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • country_short: Directly copied
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[country_region]
    • Integration Used as a key to join with other tables
    • Cleaning Coalesced with other country columns to handle null values
    • Output Columns:
      • country_short: Directly mapped after coalescing
Column Lineage
%3 37. seed.google_play_source.google_play__country_codes 37. seed.google_play_source.google_play__country_codes alternative_country_name country_name 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_long 37. seed.google_play_source.google_play__country_codes:f1->2. model.google_play.google_play__country_report:f0 37. seed.google_play_source.google_play__country_codes:f0->2. model.google_play.google_play__country_report:f0
2. model.google_play.google_play__country_report
  • Input Column: 37. seed.google_play_source.google_play__country_codes[country_name]
    • Direct The column is directly used as a fallback option in COALESCE
    • Output Columns:
      • country_long: Used in COALESCE(country_codes.alternative_country_name, country_codes.country_name)
  • Input Column: 37. seed.google_play_source.google_play__country_codes[alternative_country_name]
    • Direct The column is directly used as the primary option in COALESCE
    • Output Columns:
      • country_long: Used in COALESCE(country_codes.alternative_country_name, country_codes.country_name)
Column Lineage
%3 37. seed.google_play_source.google_play__country_codes 37. seed.google_play_source.google_play__country_codes region 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report region 37. seed.google_play_source.google_play__country_codes:f0->2. model.google_play.google_play__country_report:f0
2. model.google_play.google_play__country_report
  • Input Column: 37. seed.google_play_source.google_play__country_codes[region]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • region: Directly mapped to the output column 'region'
Column Lineage
%3 37. seed.google_play_source.google_play__country_codes 37. seed.google_play_source.google_play__country_codes sub_region 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report sub_region 37. seed.google_play_source.google_play__country_codes:f0->2. model.google_play.google_play__country_report:f0
2. model.google_play.google_play__country_report
  • Input Column: 37. seed.google_play_source.google_play__country_codes[sub_region]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sub_region: Directly mapped to the output column 'sub_region'
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_installs 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_installs total_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Contributes to this cumulative metric
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_uninstalls 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_uninstalls total_device_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Contributes to this cumulative metric
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_upgrades 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_upgrades 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_upgrades 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_upgrades: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_upgrades]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • device_upgrades: Directly mapped after cleaning
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country user_installs 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report user_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_user_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_user_installs]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed up to calculate the total user installs
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[user_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_installs: Directly mapped after cleaning
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country user_uninstalls 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report user_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_user_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_user_uninstalls]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed up to calculate the total user uninstalls
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[user_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country date_day 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country date_day 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country date_day 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp date 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp date 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp date 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • date_day: It is directly mapped after casting
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by after casting
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[date_day]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • date_day: Directly mapped
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[date_day]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • date_day: Directly copied
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to output
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country install_events 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report install_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp install_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[install_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[install_events]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • install_events: Directly mapped after cleaning
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country package_name 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country package_name 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country package_name 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp package_name 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp package_name 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp package_name 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[package_name]
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • package_name: It is directly mapped without transformation
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by
    • Output Columns:
      • package_name: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[package_name]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • package_name: Directly mapped
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[package_name]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • package_name: Directly copied
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • package_name: Directly copied to output
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country uninstall_events 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report uninstall_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp uninstall_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[uninstall_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[uninstall_events]
    • Direct The column is directly copied to the output without transformation
    • Aggregation It's used in the country_join CTE to coalesce values
    • Output Columns:
      • uninstall_events: Directly copied to the output column of the same name
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country update_events 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report update_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp update_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[update_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[update_events]
    • Direct The column is directly copied to the output without transformation
    • Aggregation It's used in the country_join CTE to coalesce values
    • Output Columns:
      • update_events: Directly copied to the output column of the same name
Column Lineage
%3 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country rolling_total_average_rating 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_total_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp total_average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[total_average_rating]
    • Cleaning Cast to FLOAT
    • Filtering Only included when country is not null
    • Output Columns:
      • rolling_total_average_rating: Transformed and mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[rolling_total_average_rating]
    • Direct Directly copied to the output
    • Other Used in a window function to fill in NULL values for days without ratings
    • Output Columns:
      • rolling_total_average_rating: Copied and potentially filled in for NULL values
Column Lineage
%3 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country average_rating 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp daily_average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[daily_average_rating]
    • Cleaning Cast to TEXT, then to FLOAT, excluding 'NA' values
    • Filtering Only included when country is not null
    • Output Columns:
      • average_rating: Transformed and mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[average_rating]
    • Direct Directly copied to the output
    • Output Columns:
      • average_rating: Directly copied
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_installs 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_installs total_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Contributes to this cumulative metric
Column Lineage
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_uninstalls 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_uninstalls total_device_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Contributes to this cumulative metric
Column Lineage
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_acquisitions 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_acquisitions total_store_acquisitions 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_acquisitions 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_acquisitions]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_acquisitions: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_acquisitions]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_acquisitions: Directly mapped after coalescing
      • total_store_acquisitions: Aggregated into a rolling total
Column Lineage
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_conversion_rate 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_conversion_rate 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_conversion_rate 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_conversion_rate]
    • Aggregation The column is averaged
    • Output Columns:
      • store_listing_conversion_rate: Averaged in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_conversion_rate]
    • Direct Copied to output without transformation
    • Output Columns:
      • store_listing_conversion_rate: Directly copied to output
Column Lineage
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_visitors 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_store_conversion_rate store_listing_visitors total_store_visitors 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f2 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_visitors 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_visitors]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_visitors: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_visitors]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_visitors: Directly mapped after coalescing
      • total_store_visitors: Aggregated into a rolling total
      • rolling_store_conversion_rate: Used in calculation of this derived metric
Column Lineage
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_acquisitions 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_acquisitions total_store_acquisitions 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_acquisitions 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_acquisitions]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_acquisitions: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_acquisitions]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_acquisitions: Directly mapped after coalescing
      • total_store_acquisitions: Aggregated into a rolling total
Column Lineage
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_visitors 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_store_conversion_rate store_listing_visitors total_store_visitors 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f2 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_visitors 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_visitors]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_visitors: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_visitors]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_visitors: Directly mapped after coalescing
      • total_store_visitors: Aggregated into a rolling total
      • rolling_store_conversion_rate: Used in calculation of this derived metric
Column Lineage
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_visitors 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_store_conversion_rate store_listing_visitors total_store_visitors 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f2 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_visitors 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_visitors]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_visitors: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_visitors]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_visitors: Directly mapped after coalescing
      • total_store_visitors: Aggregated into a rolling total
      • rolling_store_conversion_rate: Used in calculation of this derived metric
3. model.google_play.google_play__device_report

This SQL query integrates data from Google Play stats for installs and ratings by device. It performs several operations: 1. Combines install and rating data using a full outer join. 2. Calculates rolling metrics for total installs, uninstalls, and average ratings. 3. Handles null values by creating partitions and propagating non-null values across rows within each partition. 4. Computes additional metrics such as net device installs. The result is a comprehensive daily report of app performance metrics by device and package name.

IntegrationFeaturizationCleaningAggregation
SQL Query
WITH installs AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_device
), ratings AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_device
), install_metrics AS (
  SELECT
    *,
    SUM(device_installs) OVER (PARTITION BY device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    SUM(device_uninstalls) OVER (PARTITION BY device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM installs
), device_join AS (
  SELECT
    COALESCE(install_metrics.date_day, ratings.date_day) AS date_day, /* these 3 columns are the grain of this model */
    COALESCE(install_metrics.device, ratings.device) AS device, /* device type */
    COALESCE(install_metrics.package_name, ratings.package_name) AS package_name,
    COALESCE(install_metrics.active_devices_last_30_days, 0) AS active_devices_last_30_days, /* metrics based on unique devices + users */
    COALESCE(install_metrics.device_installs, 0) AS device_installs,
    COALESCE(install_metrics.device_uninstalls, 0) AS device_uninstalls,
    COALESCE(install_metrics.device_upgrades, 0) AS device_upgrades,
    COALESCE(install_metrics.user_installs, 0) AS user_installs,
    COALESCE(install_metrics.user_uninstalls, 0) AS user_uninstalls,
    COALESCE(install_metrics.install_events, 0) AS install_events, /* metrics based on events. a user or device can have multiple installs in one day */
    COALESCE(install_metrics.uninstall_events, 0) AS uninstall_events,
    COALESCE(install_metrics.update_events, 0) AS update_events,
    install_metrics.total_device_installs,
    install_metrics.total_device_uninstalls,
    ratings.average_rating, /* this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating */
    ratings.rolling_total_average_rating
  FROM install_metrics
  FULL OUTER JOIN ratings
    ON install_metrics.date_day = ratings.date_day
    AND install_metrics.package_name = ratings.package_name
    AND /* coalesce null device types otherwise they'll cause fanout with the full outer join */ COALESCE(install_metrics.device, 'null_device') = COALESCE(ratings.device, 'null_device') /* in the source package we aggregate all null device-type records together into one batch per day */
), create_partitions /* to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values */ /* we can't just use last_value(ignore nulls) because of postgres :/ */ AS (
  SELECT
    *,
    SUM(CASE WHEN rolling_total_average_rating IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating_partition,
    SUM(CASE WHEN total_device_installs IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs_partition,
    SUM(CASE WHEN total_device_uninstalls IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls_partition
  FROM device_join
), fill_values /* now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch */ AS (
  SELECT
    date_day,
    device,
    package_name,
    active_devices_last_30_days,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    install_events,
    uninstall_events,
    update_events,
    average_rating,
    FIRST_VALUE(rolling_total_average_rating) OVER (PARTITION BY rolling_total_average_rating_partition, device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating,
    FIRST_VALUE(total_device_installs) OVER (PARTITION BY total_device_installs_partition, device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    FIRST_VALUE(total_device_uninstalls) OVER (PARTITION BY total_device_uninstalls_partition, device, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM create_partitions
), final AS (
  SELECT
    date_day,
    device,
    package_name,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    install_events,
    uninstall_events,
    update_events,
    active_devices_last_30_days,
    average_rating,
    rolling_total_average_rating, /* leave null if there are no ratings yet */
    COALESCE(total_device_installs, 0) AS total_device_installs, /* the first day will have NULL values, let's make it 0 */
    COALESCE(total_device_uninstalls, 0) AS total_device_uninstalls,
    COALESCE(total_device_installs, 0) /* calculate difference rolling metric */ - COALESCE(total_device_uninstalls, 0) AS net_device_installs
  FROM fill_values
)
SELECT
  *
FROM final
%3 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report active_devices_last_30_days device device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events rolling_total_average_rating average_rating total_device_installs total_device_uninstalls net_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device active_devices_last_30_days device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day device install_events package_name uninstall_events update_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f1->3. model.google_play.google_play__device_report:f2 17. model.google_play_source.stg_google_play__stats_installs_device:f1->3. model.google_play.google_play__device_report:f14 17. model.google_play_source.stg_google_play__stats_installs_device:f2->3. model.google_play.google_play__device_report:f3 17. model.google_play_source.stg_google_play__stats_installs_device:f2->3. model.google_play.google_play__device_report:f15 17. model.google_play_source.stg_google_play__stats_installs_device:f3->3. model.google_play.google_play__device_report:f4 17. model.google_play_source.stg_google_play__stats_installs_device:f4->3. model.google_play.google_play__device_report:f5 17. model.google_play_source.stg_google_play__stats_installs_device:f5->3. model.google_play.google_play__device_report:f6 17. model.google_play_source.stg_google_play__stats_installs_device:f6->3. model.google_play.google_play__device_report:f7 17. model.google_play_source.stg_google_play__stats_installs_device:f7->3. model.google_play.google_play__device_report:f1 17. model.google_play_source.stg_google_play__stats_installs_device:f8->3. model.google_play.google_play__device_report:f8 17. model.google_play_source.stg_google_play__stats_installs_device:f9->3. model.google_play.google_play__device_report:f9 17. model.google_play_source.stg_google_play__stats_installs_device:f10->3. model.google_play.google_play__device_report:f10 17. model.google_play_source.stg_google_play__stats_installs_device:f11->3. model.google_play.google_play__device_report:f11 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device average_rating date_day device package_name rolling_total_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f13 27. model.google_play_source.stg_google_play__stats_ratings_device:f1->3. model.google_play.google_play__device_report:f7 27. model.google_play_source.stg_google_play__stats_ratings_device:f2->3. model.google_play.google_play__device_report:f1 27. model.google_play_source.stg_google_play__stats_ratings_device:f3->3. model.google_play.google_play__device_report:f9 27. model.google_play_source.stg_google_play__stats_ratings_device:f4->3. model.google_play.google_play__device_report:f12
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
device STRING Type of device model. May be NULL if users do not consent to being tracked.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
total_device_installs INT64 Cumulative number of device installs up to and including this day (aggregated on the dimension of this table). This does not take uninstalls into account and may contain duplicate devices.
total_device_uninstalls INT64 Cumulative number of device uninstalls up to and including this day (aggregated on the dimension of this table). This does not take re-installs into account and may contain duplicate devices.
net_device_installs INT64 Cumulative net number of device installs up to and including this day (aggregated on the dimension of this table). This is the difference of `total_device_installs` and `total_device_uninstalls`.
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device active_devices_last_30_days 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report active_devices_last_30_days 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp active_device_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[active_device_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed up to represent the total number of active devices in the last 30 days
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[active_devices_last_30_days]
    • Direct This column is directly copied to the output without transformation
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device device 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp device 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp device 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[device]
    • Direct The column is directly used without transformation
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • device: Directly copied
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[device]
    • Direct The column is directly copied without transformation
    • Filtering Used in CASE statements to determine if other columns should be NULL
    • Output Columns:
      • device: Directly mapped
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for partitioning data
    • Cleaning COALESCE used to handle NULL values
    • Output Columns:
      • device: Directly mapped using COALESCE between install_metrics and ratings
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[device]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_installs 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_installs total_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_installs]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_installs: Aggregated using SUM OVER to calculate cumulative installs
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_uninstalls 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_uninstalls total_device_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_uninstalls]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_uninstalls: Aggregated using SUM OVER to calculate cumulative uninstalls
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_upgrades 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_upgrades 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_upgrades 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_upgrades]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_upgrades: Aggregated sum of daily_device_upgrades
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_upgrades]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • device_upgrades: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device user_installs 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report user_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_user_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_user_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed up to represent the total number of user installs per day
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[user_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • user_installs: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device user_uninstalls 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report user_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_user_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_user_uninstalls]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed up to represent the total number of user uninstalls per day
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[user_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device date_day 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report date_day 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device date_day 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp date 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp date 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[date_day]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for calculating rolling metrics
    • Output Columns:
      • date_day: Directly mapped using COALESCE between install_metrics and ratings
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[date_day]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device install_events 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report install_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp install_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[install_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Summed up to represent the total number of install events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[install_events]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • install_events: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device package_name 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report package_name 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device package_name 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp package_name 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp package_name 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • package_name: Directly copied
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[package_name]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for partitioning data
    • Output Columns:
      • package_name: Directly mapped using COALESCE between install_metrics and ratings
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[package_name]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device uninstall_events 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report uninstall_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp uninstall_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[uninstall_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Summed up to represent the total number of uninstall events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[uninstall_events]
    • Direct This column is directly copied to the output without transformation
    • Output Columns:
      • uninstall_events: Directly copied to the output column of the same name
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device update_events 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report update_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp update_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[update_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Summed up to represent the total number of update events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[update_events]
    • Direct This column is directly copied to the output without transformation
    • Output Columns:
      • update_events: Directly copied to the output column of the same name
Column Lineage
%3 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device rolling_total_average_rating 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report rolling_total_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp total_average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[total_average_rating]
    • Cleaning The column is cleaned by checking if device is NULL
    • Output Columns:
      • rolling_total_average_rating: Mapped after cleaning
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[rolling_total_average_rating]
    • Other This column is propagated across rows within partitions to fill in NULL values
    • Output Columns:
      • rolling_total_average_rating: Propagated and copied to the output
Column Lineage
%3 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device average_rating 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp daily_average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[daily_average_rating]
    • Cleaning The column is cleaned by casting to TEXT, checking for 'NA' values, and then casting to FLOAT
    • Output Columns:
      • average_rating: Mapped after cleaning and transformation
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_installs 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_installs total_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_installs]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_installs: Aggregated using SUM OVER to calculate cumulative installs
Column Lineage
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_uninstalls 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_uninstalls total_device_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_uninstalls]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_uninstalls: Aggregated using SUM OVER to calculate cumulative uninstalls
4. model.google_play.google_play__os_version_report

This SQL query combines and processes data from three different sources (installs, ratings, and crashes) related to Google Play app statistics. It joins these sources, calculates rolling metrics for installs, uninstalls, and ratings, and fills in missing values for certain metrics. The query also computes additional metrics such as net device installs and active devices. The final output provides a comprehensive daily report of various app performance metrics segmented by Android OS version and package name.

IntegrationFeaturizationAggregationCleaning
SQL Query
WITH installs AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_os_version
), ratings AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_os_version
), crashes AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_crashes_os_version
), install_metrics AS (
  SELECT
    *,
    SUM(device_installs) OVER (PARTITION BY android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    SUM(device_uninstalls) OVER (PARTITION BY android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM installs
), app_version_join AS (
  SELECT
    COALESCE(install_metrics.date_day, ratings.date_day, crashes.date_day) AS date_day, /* these 3 columns are the grain of this model */
    COALESCE(
      install_metrics.android_os_version,
      ratings.android_os_version,
      crashes.android_os_version
    ) AS android_os_version,
    COALESCE(install_metrics.package_name, ratings.package_name, crashes.package_name) AS package_name,
    COALESCE(install_metrics.active_devices_last_30_days, 0) AS active_devices_last_30_days, /* metrics based on unique devices + users */
    COALESCE(install_metrics.device_installs, 0) AS device_installs,
    COALESCE(install_metrics.device_uninstalls, 0) AS device_uninstalls,
    COALESCE(install_metrics.device_upgrades, 0) AS device_upgrades,
    COALESCE(install_metrics.user_installs, 0) AS user_installs,
    COALESCE(install_metrics.user_uninstalls, 0) AS user_uninstalls,
    COALESCE(crashes.crashes, 0) AS crashes, /* metrics based on events. a user or device can have multiple events in one day */
    COALESCE(crashes.anrs, 0) AS anrs,
    COALESCE(install_metrics.install_events, 0) AS install_events,
    COALESCE(install_metrics.uninstall_events, 0) AS uninstall_events,
    COALESCE(install_metrics.update_events, 0) AS update_events,
    install_metrics.total_device_installs,
    install_metrics.total_device_uninstalls,
    ratings.average_rating, /* this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating */
    ratings.rolling_total_average_rating
  FROM install_metrics
  FULL OUTER JOIN ratings
    ON install_metrics.date_day = ratings.date_day
    AND install_metrics.package_name = ratings.package_name
    AND /* coalesce null os versions otherwise they'll cause fanout with the full outer join */ COALESCE(install_metrics.android_os_version, 'null_os_version') = COALESCE(ratings.android_os_version, 'null_os_version') /* in the source package we aggregate all null device-type records together into one batch per day */
  FULL OUTER JOIN crashes
    ON COALESCE(install_metrics.date_day, ratings.date_day) = crashes.date_day
    AND COALESCE(install_metrics.package_name, ratings.package_name) = crashes.package_name
    AND /* coalesce null countries otherwise they'll cause fanout with the full outer join */ COALESCE(install_metrics.android_os_version, ratings.android_os_version, 'null_os_version') = COALESCE(crashes.android_os_version, 'null_os_version') /* in the source package we aggregate all null device-type records together into one batch per day */
), create_partitions /* to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values */ /* we can't just use last_value(ignore nulls) because of postgres :/ */ AS (
  SELECT
    *,
    SUM(CASE WHEN rolling_total_average_rating IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating_partition,
    SUM(CASE WHEN total_device_installs IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs_partition,
    SUM(CASE WHEN total_device_uninstalls IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls_partition
  FROM app_version_join
), fill_values /* now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch */ AS (
  SELECT
    date_day,
    android_os_version,
    package_name,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    crashes,
    anrs,
    install_events,
    uninstall_events,
    update_events,
    active_devices_last_30_days,
    average_rating,
    FIRST_VALUE(rolling_total_average_rating) OVER (PARTITION BY rolling_total_average_rating_partition, android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating,
    FIRST_VALUE(total_device_installs) OVER (PARTITION BY total_device_installs_partition, android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    FIRST_VALUE(total_device_uninstalls) OVER (PARTITION BY total_device_uninstalls_partition, android_os_version, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM create_partitions
), final AS (
  SELECT
    date_day,
    android_os_version,
    package_name,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    crashes,
    anrs,
    install_events,
    uninstall_events,
    update_events,
    active_devices_last_30_days,
    average_rating,
    rolling_total_average_rating, /* leave null if there are no ratings yet */
    COALESCE(total_device_installs, 0) AS total_device_installs, /* the first day will have NULL values, let's make it 0 */
    COALESCE(total_device_uninstalls, 0) AS total_device_uninstalls,
    COALESCE(total_device_installs, 0) /* calculate difference rolling metric */ - COALESCE(total_device_uninstalls, 0) AS net_device_installs
  FROM fill_values
)
SELECT
  *
FROM final
%3 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report active_devices_last_30_days android_os_version device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events anrs crashes rolling_total_average_rating average_rating total_device_installs total_device_uninstalls net_device_installs 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version android_os_version anrs crashes date_day package_name 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f1 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f1->4. model.google_play.google_play__os_version_report:f12 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f2->4. model.google_play.google_play__os_version_report:f13 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f3->4. model.google_play.google_play__os_version_report:f7 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f4->4. model.google_play.google_play__os_version_report:f9 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version active_devices_last_30_days android_os_version device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f1->4. model.google_play.google_play__os_version_report:f1 19. model.google_play_source.stg_google_play__stats_installs_os_version:f2->4. model.google_play.google_play__os_version_report:f2 19. model.google_play_source.stg_google_play__stats_installs_os_version:f2->4. model.google_play.google_play__os_version_report:f16 19. model.google_play_source.stg_google_play__stats_installs_os_version:f3->4. model.google_play.google_play__os_version_report:f3 19. model.google_play_source.stg_google_play__stats_installs_os_version:f3->4. model.google_play.google_play__os_version_report:f17 19. model.google_play_source.stg_google_play__stats_installs_os_version:f4->4. model.google_play.google_play__os_version_report:f4 19. model.google_play_source.stg_google_play__stats_installs_os_version:f5->4. model.google_play.google_play__os_version_report:f5 19. model.google_play_source.stg_google_play__stats_installs_os_version:f6->4. model.google_play.google_play__os_version_report:f6 19. model.google_play_source.stg_google_play__stats_installs_os_version:f7->4. model.google_play.google_play__os_version_report:f7 19. model.google_play_source.stg_google_play__stats_installs_os_version:f8->4. model.google_play.google_play__os_version_report:f8 19. model.google_play_source.stg_google_play__stats_installs_os_version:f9->4. model.google_play.google_play__os_version_report:f9 19. model.google_play_source.stg_google_play__stats_installs_os_version:f10->4. model.google_play.google_play__os_version_report:f10 19. model.google_play_source.stg_google_play__stats_installs_os_version:f11->4. model.google_play.google_play__os_version_report:f11 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version average_rating date_day android_os_version package_name rolling_total_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f15 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f1->4. model.google_play.google_play__os_version_report:f7 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f2->4. model.google_play.google_play__os_version_report:f1 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f3->4. model.google_play.google_play__os_version_report:f9 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f4->4. model.google_play.google_play__os_version_report:f14
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
android_os_version STRING Operation System of the android being used. May be NULL if users do not consent to being tracked.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
anrs INT64 Daily application not responding (ANR) reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
crashes INT64 Daily crash reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
total_device_installs INT64 Cumulative number of device installs up to and including this day (aggregated on the dimension of this table). This does not take uninstalls into account and may contain duplicate devices.
total_device_uninstalls INT64 Cumulative number of device uninstalls up to and including this day (aggregated on the dimension of this table). This does not take re-installs into account and may contain duplicate devices.
net_device_installs INT64 Cumulative net number of device installs up to and including this day (aggregated on the dimension of this table). This is the difference of `total_device_installs` and `total_device_uninstalls`.
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version active_devices_last_30_days 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report active_devices_last_30_days 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp active_device_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[active_device_installs]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Aggregated sum of active_device_installs
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[active_devices_last_30_days]
    • Direct The column is directly copied without transformation
    • Integration Used in the FULL OUTER JOIN operations
    • Output Columns:
      • active_devices_last_30_days: Directly mapped with COALESCE to handle potential NULL values
Column Lineage
%3 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version android_os_version 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version android_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version android_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp android_os_version 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp android_os_version 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp android_os_version 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[android_os_version]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by
    • Output Columns:
      • android_os_version: Directly mapped after casting to TEXT
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[android_os_version]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • android_os_version: Directly copied
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[android_os_version]
    • Direct The column is directly copied
    • Filtering Used to conditionally set other columns to NULL
    • Output Columns:
      • android_os_version: Directly mapped
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[android_os_version]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • android_os_version: Directly copied to the output
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[android_os_version]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and PARTITION BY clauses
    • Other Used in COALESCE to handle NULL values in JOIN conditions
    • Output Columns:
      • android_os_version: Directly mapped with COALESCE across different source tables
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[android_os_version]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • android_os_version: Directly copied to the output column of the same name
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_installs 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_installs total_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_installs: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_installs]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_uninstalls 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_uninstalls total_device_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_uninstalls: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_uninstalls]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE
      • total_device_uninstalls: Aggregated in a window function
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_upgrades 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_upgrades 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_upgrades 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_upgrades: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_upgrades]
    • Direct The column is directly copied
    • Output Columns:
      • device_upgrades: Directly mapped with COALESCE
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version user_installs 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report user_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_user_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_user_installs]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • user_installs: Aggregated sum of daily_user_installs
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[user_installs]
    • Direct The column is directly copied
    • Output Columns:
      • user_installs: Directly mapped with COALESCE
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version user_uninstalls 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report user_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_user_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_user_uninstalls]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Aggregated sum of daily_user_uninstalls
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[user_uninstalls]
    • Direct The column is directly copied
    • Output Columns:
      • user_uninstalls: Directly mapped with COALESCE
Column Lineage
%3 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version date_day 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version date_day 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version date_day 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp date 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp date 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp date 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by after casting
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[date_day]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[date_day]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and ORDER BY clauses
    • Output Columns:
      • date_day: Directly mapped with COALESCE across different source tables
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[date_day]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • date_day: Directly copied to the output column of the same name
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version install_events 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report install_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp install_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[install_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • install_events: Aggregated sum of install_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[install_events]
    • Direct The column is directly copied
    • Output Columns:
      • install_events: Directly mapped with COALESCE
Column Lineage
%3 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version package_name 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version package_name 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version package_name 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp package_name 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp package_name 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp package_name 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[package_name]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by
    • Output Columns:
      • package_name: Directly mapped after casting to TEXT
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • package_name: Directly copied
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[package_name]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • package_name: Directly copied to the output
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[package_name]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and PARTITION BY clauses
    • Output Columns:
      • package_name: Directly mapped with COALESCE across different source tables
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[package_name]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • package_name: Directly copied to the output column of the same name
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version uninstall_events 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report uninstall_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp uninstall_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[uninstall_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • uninstall_events: Aggregated sum of uninstall_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • uninstall_events: It is directly mapped to the output column of the same name
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version update_events 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report update_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp update_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[update_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • update_events: Aggregated sum of update_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[update_events]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • update_events: It is directly mapped to the output column of the same name
Column Lineage
%3 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version anrs 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report anrs 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp daily_anrs 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[daily_anrs]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up
    • Output Columns:
      • anrs: Aggregated sum of daily_anrs
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[anrs]
    • Direct The column is directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • anrs: Directly copied to the output, with NULL values replaced by 0
Column Lineage
%3 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version crashes 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report crashes 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp daily_crashes 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[daily_crashes]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up
    • Output Columns:
      • crashes: Aggregated sum of daily_crashes
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[crashes]
    • Direct The column is directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • crashes: Directly copied to the output, with NULL values replaced by 0
Column Lineage
%3 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version rolling_total_average_rating 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report rolling_total_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp total_average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[total_average_rating]
    • Filtering Only set when android_os_version is not NULL
    • Output Columns:
      • rolling_total_average_rating: Mapped after filtering
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[rolling_total_average_rating]
    • Direct The column is directly copied without any transformation
    • Other Used to create partitions for filling in NULL values
    • Output Columns:
      • rolling_total_average_rating: Directly copied to the output column of the same name, with NULL values filled in using partitioning
Column Lineage
%3 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version average_rating 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp daily_average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[daily_average_rating]
    • Cleaning Converted from TEXT to FLOAT, 'NA' values are set to NULL
    • Filtering Only set when android_os_version is not NULL
    • Output Columns:
      • average_rating: Mapped after cleaning and filtering
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output column of the same name
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_installs 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_installs total_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_installs: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_installs]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_uninstalls 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_uninstalls total_device_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_uninstalls: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_uninstalls]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE
      • total_device_uninstalls: Aggregated in a window function
5. model.google_play.google_play__overview_report

This SQL query creates a comprehensive overview report for Google Play app performance. It integrates data from various sources including store performance, installs, ratings, and crashes. The query performs multiple tasks such as rolling up country-level data, calculating cumulative metrics over time, joining different data sets, filling in missing values, and computing derived metrics like conversion rates and net installs. The final output provides a daily snapshot of each app's performance across various dimensions.

IntegrationAggregationFeaturizationCleaningOther
SQL Query
WITH __dbt__cte__int_google_play__store_performance AS (
  WITH store_performance AS (
    SELECT
      *
    FROM TEST.PUBLIC_google_play_source.stg_google_play__store_performance_country
  ), store_performance_rollup AS (
    SELECT
      date_day,
      package_name,
      SUM(store_listing_acquisitions) AS store_listing_acquisitions,
      SUM(store_listing_visitors) AS store_listing_visitors
    FROM store_performance
    GROUP BY
      1,
      2
  ), store_performance_metrics AS (
    SELECT
      *,
      ROUND(store_listing_acquisitions * 1.0 / NULLIF(store_listing_visitors, 0), 4) AS store_listing_conversion_rate,
      SUM(store_listing_acquisitions) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions,
      SUM(store_listing_visitors) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors
    FROM store_performance_rollup
  )
  SELECT
    *
  FROM store_performance_metrics
), installs AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_overview
), ratings AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_overview
), crashes AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_crashes_overview
), store_performance AS (
  SELECT
    *
  FROM __dbt__cte__int_google_play__store_performance /* country rollup */
), install_metrics AS (
  SELECT
    *,
    SUM(device_installs) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    SUM(device_uninstalls) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls
  FROM installs
), overview_join AS (
  SELECT
    COALESCE(
      install_metrics.date_day,
      ratings.date_day,
      store_performance.date_day,
      crashes.date_day
    ) AS date_day, /* these 2 columns are the grain of this model */
    COALESCE(
      install_metrics.package_name,
      ratings.package_name,
      store_performance.package_name,
      crashes.package_name
    ) AS package_name,
    COALESCE(install_metrics.active_devices_last_30_days, 0) AS active_devices_last_30_days, /* metrics based on unique devices + users */
    COALESCE(install_metrics.device_installs, 0) AS device_installs,
    COALESCE(install_metrics.device_uninstalls, 0) AS device_uninstalls,
    COALESCE(install_metrics.device_upgrades, 0) AS device_upgrades,
    COALESCE(install_metrics.user_installs, 0) AS user_installs,
    COALESCE(install_metrics.user_uninstalls, 0) AS user_uninstalls,
    COALESCE(store_performance.store_listing_acquisitions, 0) AS store_listing_acquisitions,
    COALESCE(store_performance.store_listing_visitors, 0) AS store_listing_visitors,
    store_performance.store_listing_conversion_rate, /* not coalescing if there aren't any visitors */
    COALESCE(crashes.crashes, 0) AS crashes, /* metrics based on events. a user or device can have multiple installs in one day */
    COALESCE(crashes.anrs, 0) AS anrs,
    COALESCE(install_metrics.install_events, 0) AS install_events,
    COALESCE(install_metrics.uninstall_events, 0) AS uninstall_events,
    COALESCE(install_metrics.update_events, 0) AS update_events,
    install_metrics.total_device_installs,
    install_metrics.total_device_uninstalls,
    ratings.average_rating, /* this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating. todo: move */
    ratings.rolling_total_average_rating,
    store_performance.total_store_acquisitions,
    store_performance.total_store_visitors
  FROM install_metrics
  FULL OUTER JOIN ratings
    ON install_metrics.date_day = ratings.date_day
    AND install_metrics.package_name = ratings.package_name
  FULL OUTER JOIN store_performance
    ON store_performance.date_day = COALESCE(install_metrics.date_day, ratings.date_day)
    AND store_performance.package_name = COALESCE(install_metrics.package_name, ratings.package_name)
  FULL OUTER JOIN crashes
    ON COALESCE(install_metrics.date_day, ratings.date_day, store_performance.date_day) = crashes.date_day
    AND COALESCE(install_metrics.package_name, ratings.package_name, store_performance.package_name) = crashes.package_name
), create_partitions /* to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values */ /* we can't just use last_value(ignore nulls) because of postgres :/ */ AS (
  SELECT
    *,
    SUM(CASE WHEN rolling_total_average_rating IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating_partition,
    SUM(CASE WHEN total_device_installs IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs_partition,
    SUM(CASE WHEN total_device_uninstalls IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls_partition,
    SUM(CASE WHEN total_store_acquisitions IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions_partition,
    SUM(CASE WHEN total_store_visitors IS NULL THEN 0 ELSE 1 END) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors_partition
  FROM overview_join
), fill_values /* now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch */ AS (
  SELECT
    date_day,
    package_name,
    active_devices_last_30_days,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    crashes,
    anrs,
    install_events,
    uninstall_events,
    update_events,
    store_listing_acquisitions,
    store_listing_visitors,
    store_listing_conversion_rate,
    average_rating,
    FIRST_VALUE(rolling_total_average_rating) OVER (PARTITION BY rolling_total_average_rating_partition, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS rolling_total_average_rating,
    FIRST_VALUE(total_device_installs) OVER (PARTITION BY total_device_installs_partition, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_installs,
    FIRST_VALUE(total_device_uninstalls) OVER (PARTITION BY total_device_uninstalls_partition, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_device_uninstalls,
    FIRST_VALUE(total_store_acquisitions) OVER (PARTITION BY total_store_acquisitions_partition, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions,
    FIRST_VALUE(total_store_visitors) OVER (PARTITION BY total_store_visitors_partition, package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors
  FROM create_partitions
), final AS (
  SELECT
    date_day,
    package_name,
    device_installs,
    device_uninstalls,
    device_upgrades,
    user_installs,
    user_uninstalls,
    crashes,
    anrs,
    install_events,
    uninstall_events,
    update_events,
    store_listing_acquisitions,
    store_listing_visitors,
    store_listing_conversion_rate,
    active_devices_last_30_days,
    average_rating,
    rolling_total_average_rating, /* leave null if there are no ratings yet */
    COALESCE(total_device_installs, 0) AS total_device_installs, /* the first day will have NULL values, let's make it 0 */
    COALESCE(total_device_uninstalls, 0) AS total_device_uninstalls,
    COALESCE(total_store_acquisitions, 0) AS total_store_acquisitions,
    COALESCE(total_store_visitors, 0) AS total_store_visitors,
    ROUND(
      CAST(total_store_acquisitions AS DECIMAL(28, 6)) / NULLIF(total_store_visitors, 0),
      4
    ) AS rolling_store_conversion_rate, /* calculate percentage and difference rolling metrics */
    COALESCE(total_device_installs, 0) - COALESCE(total_device_uninstalls, 0) AS net_device_installs
  FROM fill_values
)
SELECT
  *
FROM final
%3 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report active_devices_last_30_days android_os_version device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events anrs crashes rolling_total_average_rating average_rating total_device_installs total_device_uninstalls net_device_installs store_listing_acquisitions store_listing_conversion_rate store_listing_visitors total_store_acquisitions total_store_visitors rolling_store_conversion_rate 6. model.google_play.int_google_play__store_performance 6. model.google_play.int_google_play__store_performance 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview anrs crashes date_day package_name 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f12 11. model.google_play_source.stg_google_play__stats_crashes_overview:f1->5. model.google_play.google_play__overview_report:f13 11. model.google_play_source.stg_google_play__stats_crashes_overview:f2->5. model.google_play.google_play__overview_report:f7 11. model.google_play_source.stg_google_play__stats_crashes_overview:f3->5. model.google_play.google_play__overview_report:f9 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview active_devices_last_30_days device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f1->5. model.google_play.google_play__overview_report:f2 21. model.google_play_source.stg_google_play__stats_installs_overview:f1->5. model.google_play.google_play__overview_report:f16 21. model.google_play_source.stg_google_play__stats_installs_overview:f2->5. model.google_play.google_play__overview_report:f3 21. model.google_play_source.stg_google_play__stats_installs_overview:f2->5. model.google_play.google_play__overview_report:f17 21. model.google_play_source.stg_google_play__stats_installs_overview:f3->5. model.google_play.google_play__overview_report:f4 21. model.google_play_source.stg_google_play__stats_installs_overview:f4->5. model.google_play.google_play__overview_report:f5 21. model.google_play_source.stg_google_play__stats_installs_overview:f5->5. model.google_play.google_play__overview_report:f6 21. model.google_play_source.stg_google_play__stats_installs_overview:f6->5. model.google_play.google_play__overview_report:f7 21. model.google_play_source.stg_google_play__stats_installs_overview:f7->5. model.google_play.google_play__overview_report:f8 21. model.google_play_source.stg_google_play__stats_installs_overview:f8->5. model.google_play.google_play__overview_report:f9 21. model.google_play_source.stg_google_play__stats_installs_overview:f9->5. model.google_play.google_play__overview_report:f10 21. model.google_play_source.stg_google_play__stats_installs_overview:f10->5. model.google_play.google_play__overview_report:f11 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview average_rating date_day package_name rolling_total_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f15 31. model.google_play_source.stg_google_play__stats_ratings_overview:f1->5. model.google_play.google_play__overview_report:f7 31. model.google_play_source.stg_google_play__stats_ratings_overview:f2->5. model.google_play.google_play__overview_report:f9 31. model.google_play_source.stg_google_play__stats_ratings_overview:f3->5. model.google_play.google_play__overview_report:f14
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
android_os_version None Operation System of the android being used. May be NULL if users do not consent to being tracked.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
anrs INT64 Daily application not responding (ANR) reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
crashes INT64 Daily crash reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
total_device_installs INT64 Cumulative number of device installs up to and including this day (aggregated on the dimension of this table). This does not take uninstalls into account and may contain duplicate devices.
total_device_uninstalls INT64 Cumulative number of device uninstalls up to and including this day (aggregated on the dimension of this table). This does not take re-installs into account and may contain duplicate devices.
net_device_installs INT64 Cumulative net number of device installs up to and including this day (aggregated on the dimension of this table). This is the difference of `total_device_installs` and `total_device_uninstalls`.
store_listing_acquisitions INT64 The number of users that visited your store listing and installed your app, who did not have your app installed on any device.
store_listing_conversion_rate FLOAT64 The percentage of store listing visitors who installed your app on a given day. Note: Does not include visits or installs from users who already have your app installed on another device
store_listing_visitors INT64 The number of users that visited your store listing who did not have your app installed on any device.
total_store_acquisitions INT64 Cumulative number of users that visited your store listing and installed your app, who did not have your app installed on any device prior to this.
total_store_visitors INT64 Cumulative number of users that visited your store listing who did not have your app installed on any device at the time.
rolling_store_conversion_rate NUMERIC Rolling percentage of store listing visitors who installed your app within a given country. The ratio of `total_store_acquisitions` to `total_store_visitors`.
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview active_devices_last_30_days 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report active_devices_last_30_days 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp active_device_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[active_device_installs]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[active_devices_last_30_days]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_installs 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_installs total_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_installs]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_installs: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Aggregated into this cumulative metric
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_uninstalls 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_uninstalls total_device_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_uninstalls]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_uninstalls: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Aggregated into this cumulative metric
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_upgrades 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_upgrades 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_upgrades 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_upgrades]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_upgrades: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_upgrades]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • device_upgrades: Directly mapped after cleaning
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview user_installs 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report user_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_user_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_user_installs]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • user_installs: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[user_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_installs: Directly mapped after cleaning
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview user_uninstalls 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report user_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_user_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_user_uninstalls]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[user_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
Column Lineage
%3 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview date_day 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview date_day 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview date_day 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp date 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp date 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp date 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: It is directly mapped after casting
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in the COALESCE function to determine the final date_day
    • Output Columns:
      • date_day: Part of the COALESCE function to determine the final date_day
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for cumulative calculations
    • Output Columns:
      • date_day: Directly mapped
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[date_day]
    • Integration The column is used as the key to join with other tables
    • Aggregation The column is used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview install_events 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report install_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp install_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[install_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • install_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[install_events]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • install_events: Directly mapped after cleaning
Column Lineage
%3 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview package_name 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview package_name 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview package_name 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp package_name 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp package_name 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp package_name 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[package_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • package_name: It is directly copied
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly copied
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in the COALESCE function to determine the final package_name
    • Output Columns:
      • package_name: Part of the COALESCE function to determine the final package_name
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for partitioning
    • Output Columns:
      • package_name: Directly mapped
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[package_name]
    • Integration The column is used as the key to join with other tables
    • Aggregation The column is used in window functions for partitioning
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview uninstall_events 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report uninstall_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp uninstall_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • uninstall_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[uninstall_events]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • uninstall_events: Directly mapped after cleaning
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview update_events 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report update_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp update_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[update_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • update_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[update_events]
    • Direct The column is directly copied without any transformation
    • Aggregation The column is included in the final SELECT statement
    • Output Columns:
      • update_events: Directly mapped to the output column of the same name
Column Lineage
%3 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview anrs 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report anrs 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp daily_anrs 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[daily_anrs]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • anrs: It is directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[anrs]
    • Direct The column is directly copied without transformation
    • Aggregation The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • anrs: Directly mapped after coalescing with 0
Column Lineage
%3 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview crashes 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report crashes 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp daily_crashes 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[daily_crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: It is directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[crashes]
    • Direct The column is directly copied without transformation
    • Aggregation The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • crashes: Directly mapped after coalescing with 0
Column Lineage
%3 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview rolling_total_average_rating 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report rolling_total_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp total_average_rating 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[total_average_rating]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • rolling_total_average_rating: Directly mapped
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[rolling_total_average_rating]
    • Direct The column is directly copied initially
    • Other The column is used in a complex windowing operation to fill in NULL values
    • Output Columns:
      • rolling_total_average_rating: Copied and then processed to fill in NULL values
Column Lineage
%3 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview average_rating 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp daily_average_rating 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[daily_average_rating]
    • Cleaning The column is cast to FLOAT and 'NA' values are replaced with NULL
    • Output Columns:
      • average_rating: Mapped after cleaning and casting
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_installs 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_installs total_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_installs]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_installs: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Aggregated into this cumulative metric
Column Lineage
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_uninstalls 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_uninstalls total_device_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_uninstalls]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_uninstalls: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Aggregated into this cumulative metric
6. model.google_play.int_google_play__store_performance

This SQL query processes Google Play store performance data. It starts by selecting all data from a staging table, then aggregates store listing acquisitions and visitors by date and package name. Finally, it calculates additional metrics such as conversion rate and cumulative totals for acquisitions and visitors. The result is a comprehensive view of store performance metrics over time for each package.

AggregationFeaturizationIntegration
SQL Query
WITH store_performance AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__store_performance_country
), store_performance_rollup AS (
  SELECT
    date_day,
    package_name,
    SUM(store_listing_acquisitions) AS store_listing_acquisitions,
    SUM(store_listing_visitors) AS store_listing_visitors
  FROM store_performance
  GROUP BY
    1,
    2
), store_performance_metrics AS (
  SELECT
    *,
    ROUND(store_listing_acquisitions * 1.0 / NULLIF(store_listing_visitors, 0), 4) AS store_listing_conversion_rate,
    SUM(store_listing_acquisitions) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_acquisitions,
    SUM(store_listing_visitors) OVER (PARTITION BY package_name ORDER BY date_day ASC rows BETWEEN UNBOUNDED preceding AND CURRENT ROW) AS total_store_visitors
  FROM store_performance_rollup
)
SELECT
  *
FROM store_performance_metrics
%3 6. model.google_play.int_google_play__store_performance 6. model.google_play.int_google_play__store_performance 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country
Name Type Comment
7. model.google_play_source.stg_google_play__stats_crashes_app_version

This SQL query processes data from a staging table for Google Play app crash statistics. It casts columns to specific data types, renames the 'date' column to 'date_day', and aggregates daily ANRs (Application Not Responding) and crashes by date, app version code, and package name.

CleaningAggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_crashes_app_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS app_version_code,
    CAST(NULL AS INT) AS daily_anrs,
    CAST(NULL AS INT) AS daily_crashes,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_version_code,
    package_name,
    SUM(daily_anrs) AS anrs,
    SUM(daily_crashes) AS crashes
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version app_version_code anrs crashes date_day package_name 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp date package_name app_version_code daily_crashes daily_anrs 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f1->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f4 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f2->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f3->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f2 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f4->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f1
Name Type Comment
app_version_code INT64 Integer value of the version of the app being reported on.
anrs INT64 Daily application not responding (ANR) reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
crashes INT64 Daily crash reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp app_version_code 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version app_version_code 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[app_version_code]
    • Cleaning The column is cast to INT type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • app_version_code: It is directly mapped after casting to INT
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[app_version_code]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • app_version_code: Directly copied
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp daily_anrs 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version anrs 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report anrs 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[daily_anrs]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • anrs: It is aggregated (SUM) to form the anrs column
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[anrs]
    • Direct Directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • anrs: Directly copied with COALESCE(crashes.anrs, 0)
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp daily_crashes 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version crashes 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report crashes 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[daily_crashes]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • crashes: It is aggregated (SUM) to form the crashes column
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[crashes]
    • Direct Directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • crashes: Directly copied with COALESCE(crashes.crashes, 0)
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp date 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version date_day 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • date_day: It is directly mapped after casting to DATE
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[date_day]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • date_day: Directly copied as part of COALESCE(install_metrics.date_day, ratings.date_day, crashes.date_day)
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp package_name 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version package_name 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[package_name]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • package_name: It is directly mapped after casting to TEXT
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[package_name]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • package_name: Directly copied as part of COALESCE(install_metrics.package_name, ratings.package_name, crashes.package_name)
8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp

This SQL query selects all columns and rows from the 'stats_crashes_app_version' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple data extraction query without any transformations, filters, or aggregations.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_crashes_app_version
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp _file _line _modified date package_name app_version_code daily_crashes daily_anrs _fivetran_synced 38. source.google_play_source.google_play.stats_crashes_app_version 38. source.google_play_source.google_play.stats_crashes_app_version
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
app_version_code INT64 None
daily_crashes INT64 None
daily_anrs INT64 None
_fivetran_synced STRING None
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp date 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version date_day 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • date_day: It is directly mapped after casting to DATE
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[date_day]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • date_day: Directly copied as part of COALESCE(install_metrics.date_day, ratings.date_day, crashes.date_day)
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp package_name 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version package_name 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[package_name]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • package_name: It is directly mapped after casting to TEXT
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[package_name]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • package_name: Directly copied as part of COALESCE(install_metrics.package_name, ratings.package_name, crashes.package_name)
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp app_version_code 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version app_version_code 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[app_version_code]
    • Cleaning The column is cast to INT type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • app_version_code: It is directly mapped after casting to INT
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[app_version_code]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • app_version_code: Directly copied
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp daily_crashes 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version crashes 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report crashes 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[daily_crashes]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • crashes: It is aggregated (SUM) to form the crashes column
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[crashes]
    • Direct Directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • crashes: Directly copied with COALESCE(crashes.crashes, 0)
Column Lineage
%3 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp daily_anrs 7. model.google_play_source.stg_google_play__stats_crashes_app_version 7. model.google_play_source.stg_google_play__stats_crashes_app_version anrs 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp:f0->7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report anrs 7. model.google_play_source.stg_google_play__stats_crashes_app_version:f0->1. model.google_play.google_play__app_version_report:f0
7. model.google_play_source.stg_google_play__stats_crashes_app_version
  • Input Column: 8. model.google_play_source.stg_google_play__stats_crashes_app_version_tmp[daily_anrs]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • anrs: It is aggregated (SUM) to form the anrs column
1. model.google_play.google_play__app_version_report
  • Input Column: 7. model.google_play_source.stg_google_play__stats_crashes_app_version[anrs]
    • Direct Directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • anrs: Directly copied with COALESCE(crashes.anrs, 0)
9. model.google_play_source.stg_google_play__stats_crashes_os_version

This SQL query processes data from a temporary staging table for Google Play stats on crashes by OS version. It casts columns to specific data types, renames the 'date' column to 'date_day', and aggregates the daily ANRs (Application Not Responding) and crashes by date, Android OS version, and package name.

CleaningAggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_crashes_os_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS TEXT) AS android_os_version,
    CAST(NULL AS INT) AS daily_anrs,
    CAST(NULL AS INT) AS daily_crashes,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    android_os_version,
    package_name,
    SUM(daily_anrs) AS anrs,
    SUM(daily_crashes) AS crashes
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version android_os_version anrs crashes date_day package_name 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp date package_name android_os_version daily_crashes daily_anrs 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f1->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f4 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f2->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f3->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f2 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f4->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f1
Name Type Comment
android_os_version STRING Operation System of the android being used. May be NULL if users do not consent to being tracked.
anrs INT64 Daily application not responding (ANR) reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
crashes INT64 Daily crash reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp android_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version android_os_version 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[android_os_version]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by
    • Output Columns:
      • android_os_version: Directly mapped after casting to TEXT
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[android_os_version]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • android_os_version: Directly copied to the output
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp daily_anrs 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version anrs 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report anrs 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[daily_anrs]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up
    • Output Columns:
      • anrs: Aggregated sum of daily_anrs
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[anrs]
    • Direct The column is directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • anrs: Directly copied to the output, with NULL values replaced by 0
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp daily_crashes 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version crashes 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report crashes 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[daily_crashes]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up
    • Output Columns:
      • crashes: Aggregated sum of daily_crashes
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[crashes]
    • Direct The column is directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • crashes: Directly copied to the output, with NULL values replaced by 0
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp date 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version date_day 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by after casting
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[date_day]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp package_name 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version package_name 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[package_name]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by
    • Output Columns:
      • package_name: Directly mapped after casting to TEXT
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[package_name]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • package_name: Directly copied to the output
10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp

This SQL query selects all columns and rows from the 'stats_crashes_os_version' table in the 'google_play' schema of the 'TEST' database. It appears to be a straightforward data extraction without any transformations, filters, or aggregations.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_crashes_os_version
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp _file _line _modified date package_name android_os_version daily_crashes daily_anrs _fivetran_synced 39. source.google_play_source.google_play.stats_crashes_os_version 39. source.google_play_source.google_play.stats_crashes_os_version
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
android_os_version STRING None
daily_crashes INT64 None
daily_anrs INT64 None
_fivetran_synced STRING None
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp date 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version date_day 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by after casting
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[date_day]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp package_name 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version package_name 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[package_name]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by
    • Output Columns:
      • package_name: Directly mapped after casting to TEXT
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[package_name]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp android_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version android_os_version 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[android_os_version]
    • Cleaning The column is cast to TEXT type
    • Aggregation The column is grouped by
    • Output Columns:
      • android_os_version: Directly mapped after casting to TEXT
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[android_os_version]
    • Direct The column is directly copied to the output
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for window functions
    • Output Columns:
      • android_os_version: Directly copied to the output
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp daily_crashes 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version crashes 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report crashes 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[daily_crashes]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up
    • Output Columns:
      • crashes: Aggregated sum of daily_crashes
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[crashes]
    • Direct The column is directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • crashes: Directly copied to the output, with NULL values replaced by 0
Column Lineage
%3 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp daily_anrs 9. model.google_play_source.stg_google_play__stats_crashes_os_version 9. model.google_play_source.stg_google_play__stats_crashes_os_version anrs 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp:f0->9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report anrs 9. model.google_play_source.stg_google_play__stats_crashes_os_version:f0->4. model.google_play.google_play__os_version_report:f0
9. model.google_play_source.stg_google_play__stats_crashes_os_version
  • Input Column: 10. model.google_play_source.stg_google_play__stats_crashes_os_version_tmp[daily_anrs]
    • Cleaning The column is cast to INT type
    • Aggregation The column is summed up
    • Output Columns:
      • anrs: Aggregated sum of daily_anrs
4. model.google_play.google_play__os_version_report
  • Input Column: 9. model.google_play_source.stg_google_play__stats_crashes_os_version[anrs]
    • Direct The column is directly copied to the output, with COALESCE to handle NULL values
    • Output Columns:
      • anrs: Directly copied to the output, with NULL values replaced by 0
11. model.google_play_source.stg_google_play__stats_crashes_overview

This SQL query performs data type casting and column renaming on the 'stg_google_play__stats_crashes_overview_tmp' table. It casts the 'date' column to DATE type, renames 'daily_anrs' to 'anrs' and 'daily_crashes' to 'crashes', and selects specific columns for the final output. The query doesn't filter, deduplicate, or aggregate data, but focuses on cleaning and standardizing the data format.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_crashes_overview_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS daily_anrs,
    CAST(NULL AS INT) AS daily_crashes,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    package_name,
    daily_anrs AS anrs,
    daily_crashes AS crashes,
    _fivetran_synced
  FROM fields
)
SELECT
  *
FROM final
%3 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview anrs crashes date_day package_name _fivetran_synced 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp date package_name daily_crashes daily_anrs _fivetran_synced 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f2 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f1->11. model.google_play_source.stg_google_play__stats_crashes_overview:f3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f2->11. model.google_play_source.stg_google_play__stats_crashes_overview:f1 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f3->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f4->11. model.google_play_source.stg_google_play__stats_crashes_overview:f4
Name Type Comment
anrs INT64 Daily application not responding (ANR) reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
crashes INT64 Daily crash reports collected from Android devices whose users have opted in to automatically share usage and diagnostics data.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
_fivetran_synced STRING None
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp daily_anrs 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview anrs 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report anrs 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[daily_anrs]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • anrs: It is directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[anrs]
    • Direct The column is directly copied without transformation
    • Aggregation The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • anrs: Directly mapped after coalescing with 0
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp daily_crashes 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview crashes 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report crashes 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[daily_crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: It is directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[crashes]
    • Direct The column is directly copied without transformation
    • Aggregation The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • crashes: Directly mapped after coalescing with 0
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp date 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview date_day 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: It is directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in the COALESCE function to determine the final date_day
    • Output Columns:
      • date_day: Part of the COALESCE function to determine the final date_day
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp package_name 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview package_name 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[package_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • package_name: It is directly copied
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in the COALESCE function to determine the final package_name
    • Output Columns:
      • package_name: Part of the COALESCE function to determine the final package_name
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp _fivetran_synced 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview _fivetran_synced 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: It is directly copied
12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp

This SQL query performs a simple SELECT * operation to retrieve all columns and rows from the 'stats_crashes_overview' table in the 'google_play' schema of the 'TEST' database. It's a straightforward data extraction query without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_crashes_overview
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp _file _line _modified date package_name daily_crashes daily_anrs _fivetran_synced 40. source.google_play_source.google_play.stats_crashes_overview 40. source.google_play_source.google_play.stats_crashes_overview
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
daily_crashes INT64 None
daily_anrs INT64 None
_fivetran_synced STRING None
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp date 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview date_day 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: It is directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in the COALESCE function to determine the final date_day
    • Output Columns:
      • date_day: Part of the COALESCE function to determine the final date_day
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp package_name 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview package_name 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[package_name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • package_name: It is directly copied
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in the COALESCE function to determine the final package_name
    • Output Columns:
      • package_name: Part of the COALESCE function to determine the final package_name
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp daily_crashes 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview crashes 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report crashes 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[daily_crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: It is directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[crashes]
    • Direct The column is directly copied without transformation
    • Aggregation The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • crashes: Directly mapped after coalescing with 0
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp daily_anrs 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview anrs 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report anrs 11. model.google_play_source.stg_google_play__stats_crashes_overview:f0->5. model.google_play.google_play__overview_report:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[daily_anrs]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • anrs: It is directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 11. model.google_play_source.stg_google_play__stats_crashes_overview[anrs]
    • Direct The column is directly copied without transformation
    • Aggregation The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • anrs: Directly mapped after coalescing with 0
Column Lineage
%3 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp _fivetran_synced 11. model.google_play_source.stg_google_play__stats_crashes_overview 11. model.google_play_source.stg_google_play__stats_crashes_overview _fivetran_synced 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp:f0->11. model.google_play_source.stg_google_play__stats_crashes_overview:f0
11. model.google_play_source.stg_google_play__stats_crashes_overview
  • Input Column: 12. model.google_play_source.stg_google_play__stats_crashes_overview_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • _fivetran_synced: It is directly copied
13. model.google_play_source.stg_google_play__stats_installs_app_version

This SQL query performs data transformation and aggregation on Google Play Store app installation statistics. It starts by casting columns to specific data types, then aggregates various installation metrics (such as active devices, installs, uninstalls, and upgrades) by date, app version code, and package name. The query cleans and standardizes the data structure while providing summarized installation statistics for analysis.

CleaningAggregationFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_app_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS active_device_installs,
    CAST(NULL AS INT) AS app_version_code,
    CAST(NULL AS INT) AS current_device_installs,
    CAST(NULL AS INT) AS current_user_installs,
    CAST(NULL AS INT) AS daily_device_installs,
    CAST(NULL AS INT) AS daily_device_uninstalls,
    CAST(NULL AS INT) AS daily_device_upgrades,
    CAST(NULL AS INT) AS daily_user_installs,
    CAST(NULL AS INT) AS daily_user_uninstalls,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS INT) AS install_events,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS INT) AS total_user_installs,
    CAST(NULL AS INT) AS uninstall_events,
    CAST(NULL AS INT) AS update_events
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_version_code,
    package_name,
    SUM(active_device_installs) AS active_devices_last_30_days,
    SUM(daily_device_installs) AS device_installs,
    SUM(daily_device_uninstalls) AS device_uninstalls,
    SUM(daily_device_upgrades) AS device_upgrades,
    SUM(daily_user_installs) AS user_installs,
    SUM(daily_user_uninstalls) AS user_uninstalls,
    SUM(install_events) AS install_events,
    SUM(uninstall_events) AS uninstall_events,
    SUM(update_events) AS update_events
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version active_devices_last_30_days app_version_code device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp date package_name app_version_code daily_device_installs daily_device_uninstalls daily_device_upgrades daily_user_installs daily_user_uninstalls active_device_installs install_events update_events uninstall_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f7 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f1->13. model.google_play_source.stg_google_play__stats_installs_app_version:f9 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f2->13. model.google_play_source.stg_google_play__stats_installs_app_version:f1 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f3->13. model.google_play_source.stg_google_play__stats_installs_app_version:f2 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f4->13. model.google_play_source.stg_google_play__stats_installs_app_version:f3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f5->13. model.google_play_source.stg_google_play__stats_installs_app_version:f4 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f6->13. model.google_play_source.stg_google_play__stats_installs_app_version:f5 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f7->13. model.google_play_source.stg_google_play__stats_installs_app_version:f6 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f8->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f9->13. model.google_play_source.stg_google_play__stats_installs_app_version:f8 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f10->13. model.google_play_source.stg_google_play__stats_installs_app_version:f11 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f11->13. model.google_play_source.stg_google_play__stats_installs_app_version:f10
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
app_version_code INT64 Integer value of the version of the app being reported on.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp active_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version active_devices_last_30_days 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report active_devices_last_30_days 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[active_device_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed value of active_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[active_devices_last_30_days]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp app_version_code 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version app_version_code 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[app_version_code]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • app_version_code: Directly copied
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[app_version_code]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to partition data
    • Output Columns:
      • app_version_code: Directly copied to the output
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_installs total_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly copied after coalescing with 0
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_uninstalls total_device_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly copied after coalescing with 0
      • total_device_uninstalls: Aggregated in a window function
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_upgrades 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_upgrades 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_upgrades 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_upgrades: Aggregated sum of daily_device_upgrades
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_upgrades]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • device_upgrades: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_user_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version user_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report user_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_user_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed value of daily_user_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[user_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • user_installs: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_user_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version user_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report user_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_user_uninstalls]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed value of daily_user_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[user_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • user_uninstalls: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp date 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version date_day 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[date]
    • Cleaning The column is cast as DATE type
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[date_day]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to order data
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp install_events 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version install_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report install_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[install_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Summed value of install_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[install_events]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • install_events: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp package_name 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version package_name 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • package_name: Directly copied
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[package_name]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to partition data
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp uninstall_events 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version uninstall_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report uninstall_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[uninstall_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Summed value of uninstall_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as part of the FULL OUTER JOIN operation
    • Output Columns:
      • uninstall_events: It is directly copied to the output column 'uninstall_events'
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp update_events 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version update_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report update_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[update_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Summed value of update_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[update_events]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as part of the FULL OUTER JOIN operation
    • Output Columns:
      • update_events: It is directly copied to the output column 'update_events'
14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp

This SQL query selects all columns and rows from the table 'stats_installs_app_version' in the 'google_play' schema of the 'TEST' database. It's a simple SELECT * statement without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_installs_app_version
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp _file _line _modified date package_name app_version_code current_device_installs daily_device_installs daily_device_uninstalls daily_device_upgrades current_user_installs total_user_installs daily_user_installs daily_user_uninstalls _fivetran_synced active_device_installs install_events update_events uninstall_events 41. source.google_play_source.google_play.stats_installs_app_version 41. source.google_play_source.google_play.stats_installs_app_version
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
app_version_code INT64 None
current_device_installs INT64 None
daily_device_installs INT64 None
daily_device_uninstalls INT64 None
daily_device_upgrades INT64 None
current_user_installs INT64 None
total_user_installs INT64 None
daily_user_installs INT64 None
daily_user_uninstalls INT64 None
_fivetran_synced STRING None
active_device_installs INT64 None
install_events INT64 None
update_events INT64 None
uninstall_events INT64 None
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp date 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version date_day 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[date]
    • Cleaning The column is cast as DATE type
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[date_day]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to order data
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp package_name 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version package_name 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • package_name: Directly copied
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[package_name]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to partition data
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp app_version_code 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version app_version_code 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[app_version_code]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • app_version_code: Directly copied
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[app_version_code]
    • Integration Used as a key for joining tables
    • Deduplication Used in window functions to partition data
    • Output Columns:
      • app_version_code: Directly copied to the output
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_installs total_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly copied after coalescing with 0
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_uninstalls total_device_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f1
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly copied after coalescing with 0
      • total_device_uninstalls: Aggregated in a window function
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_device_upgrades 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version device_upgrades 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report device_upgrades 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_upgrades: Aggregated sum of daily_device_upgrades
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[device_upgrades]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • device_upgrades: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_user_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version user_installs 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report user_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_user_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed value of daily_user_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[user_installs]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • user_installs: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp daily_user_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version user_uninstalls 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report user_uninstalls 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[daily_user_uninstalls]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed value of daily_user_uninstalls
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[user_uninstalls]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • user_uninstalls: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp active_device_installs 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version active_devices_last_30_days 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report active_devices_last_30_days 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[active_device_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed value of active_device_installs
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[active_devices_last_30_days]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp install_events 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version install_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report install_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[install_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Summed value of install_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[install_events]
    • Direct This column is directly copied to the output
    • Cleaning The column is coalesced with 0 to handle NULL values
    • Output Columns:
      • install_events: Directly copied after coalescing with 0
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp update_events 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version update_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report update_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[update_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Summed value of update_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[update_events]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as part of the FULL OUTER JOIN operation
    • Output Columns:
      • update_events: It is directly copied to the output column 'update_events'
Column Lineage
%3 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp uninstall_events 13. model.google_play_source.stg_google_play__stats_installs_app_version 13. model.google_play_source.stg_google_play__stats_installs_app_version uninstall_events 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp:f0->13. model.google_play_source.stg_google_play__stats_installs_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report uninstall_events 13. model.google_play_source.stg_google_play__stats_installs_app_version:f0->1. model.google_play.google_play__app_version_report:f0
13. model.google_play_source.stg_google_play__stats_installs_app_version
  • Input Column: 14. model.google_play_source.stg_google_play__stats_installs_app_version_tmp[uninstall_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Summed value of uninstall_events
1. model.google_play.google_play__app_version_report
  • Input Column: 13. model.google_play_source.stg_google_play__stats_installs_app_version[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as part of the FULL OUTER JOIN operation
    • Output Columns:
      • uninstall_events: It is directly copied to the output column 'uninstall_events'
15. model.google_play_source.stg_google_play__stats_installs_country

This SQL query transforms and aggregates data from a Google Play stats table. It first casts all columns to specific data types, then aggregates various install and uninstall metrics by date, country, and package name. The query performs data type conversion, renames some columns, and calculates sums for several metrics.

CleaningAggregationFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_country_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS active_device_installs,
    CAST(NULL AS TEXT) AS country,
    CAST(NULL AS INT) AS current_device_installs,
    CAST(NULL AS INT) AS current_user_installs,
    CAST(NULL AS INT) AS daily_device_installs,
    CAST(NULL AS INT) AS daily_device_uninstalls,
    CAST(NULL AS INT) AS daily_device_upgrades,
    CAST(NULL AS INT) AS daily_user_installs,
    CAST(NULL AS INT) AS daily_user_uninstalls,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS INT) AS install_events,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS INT) AS total_user_installs,
    CAST(NULL AS INT) AS uninstall_events,
    CAST(NULL AS INT) AS update_events
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    country,
    package_name,
    SUM(active_device_installs) AS active_devices_last_30_days,
    SUM(daily_device_installs) AS device_installs,
    SUM(daily_device_uninstalls) AS device_uninstalls,
    SUM(daily_device_upgrades) AS device_upgrades,
    SUM(daily_user_installs) AS user_installs,
    SUM(daily_user_uninstalls) AS user_uninstalls,
    SUM(install_events) AS install_events,
    SUM(uninstall_events) AS uninstall_events,
    SUM(update_events) AS update_events
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country active_devices_last_30_days country device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp date package_name country daily_device_installs daily_device_uninstalls daily_device_upgrades daily_user_installs daily_user_uninstalls active_device_installs install_events update_events uninstall_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f7 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f1->15. model.google_play_source.stg_google_play__stats_installs_country:f9 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f2->15. model.google_play_source.stg_google_play__stats_installs_country:f1 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f3->15. model.google_play_source.stg_google_play__stats_installs_country:f2 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f4->15. model.google_play_source.stg_google_play__stats_installs_country:f3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f5->15. model.google_play_source.stg_google_play__stats_installs_country:f4 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f6->15. model.google_play_source.stg_google_play__stats_installs_country:f5 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f7->15. model.google_play_source.stg_google_play__stats_installs_country:f6 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f8->15. model.google_play_source.stg_google_play__stats_installs_country:f0 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f9->15. model.google_play_source.stg_google_play__stats_installs_country:f8 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f10->15. model.google_play_source.stg_google_play__stats_installs_country:f11 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f11->15. model.google_play_source.stg_google_play__stats_installs_country:f10
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
country STRING Two-letter abbreviation of the country where the user’s Google account is registered.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp active_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country active_devices_last_30_days 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report active_devices_last_30_days 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[active_device_installs]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed up to calculate the total active devices in the last 30 days
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp country 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country country 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[country]
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • country: It is directly mapped without transformation
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[country]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • country_short: Directly mapped
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_installs total_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Contributes to this cumulative metric
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_uninstalls total_device_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Contributes to this cumulative metric
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_upgrades 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_upgrades 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_upgrades 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_upgrades: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_upgrades]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • device_upgrades: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_user_installs 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country user_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report user_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_user_installs]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed up to calculate the total user installs
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[user_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_installs: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_user_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country user_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report user_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_user_uninstalls]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed up to calculate the total user uninstalls
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[user_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp date 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country date_day 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • date_day: It is directly mapped after casting
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[date_day]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • date_day: Directly mapped
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp install_events 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country install_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report install_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[install_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[install_events]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • install_events: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp package_name 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country package_name 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[package_name]
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • package_name: It is directly mapped without transformation
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[package_name]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • package_name: Directly mapped
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp uninstall_events 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country uninstall_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report uninstall_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[uninstall_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[uninstall_events]
    • Direct The column is directly copied to the output without transformation
    • Aggregation It's used in the country_join CTE to coalesce values
    • Output Columns:
      • uninstall_events: Directly copied to the output column of the same name
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp update_events 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country update_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report update_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[update_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[update_events]
    • Direct The column is directly copied to the output without transformation
    • Aggregation It's used in the country_join CTE to coalesce values
    • Output Columns:
      • update_events: Directly copied to the output column of the same name
16. model.google_play_source.stg_google_play__stats_installs_country_tmp

This SQL query selects all columns from the 'stats_installs_country' table in the 'google_play' schema of the 'TEST' database. It's a simple SELECT * statement that retrieves all data from the specified table without any modifications, filters, or transformations.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_installs_country
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp _file _line _modified date package_name country current_device_installs daily_device_installs daily_device_uninstalls daily_device_upgrades current_user_installs total_user_installs daily_user_installs daily_user_uninstalls _fivetran_synced active_device_installs install_events update_events uninstall_events 42. source.google_play_source.google_play.stats_installs_country 42. source.google_play_source.google_play.stats_installs_country
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
country STRING None
current_device_installs INT64 None
daily_device_installs INT64 None
daily_device_uninstalls INT64 None
daily_device_upgrades INT64 None
current_user_installs INT64 None
total_user_installs INT64 None
daily_user_installs INT64 None
daily_user_uninstalls INT64 None
_fivetran_synced STRING None
active_device_installs INT64 None
install_events INT64 None
update_events INT64 None
uninstall_events INT64 None
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp date 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country date_day 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • date_day: It is directly mapped after casting
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[date_day]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • date_day: Directly mapped
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp package_name 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country package_name 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[package_name]
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • package_name: It is directly mapped without transformation
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[package_name]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • package_name: Directly mapped
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp country 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country country 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[country]
    • Aggregation The column is grouped by in the final SELECT statement
    • Output Columns:
      • country: It is directly mapped without transformation
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[country]
    • Direct The column is directly copied
    • Integration Used as a key to join with other tables
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • country_short: Directly mapped
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_installs total_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_installs: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Contributes to this cumulative metric
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_uninstalls total_device_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f1
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_uninstalls: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Contributes to this cumulative metric
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_device_upgrades 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country device_upgrades 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report device_upgrades 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT statement
    • Output Columns:
      • device_upgrades: It is aggregated (SUM) to this output column
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[device_upgrades]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • device_upgrades: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_user_installs 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country user_installs 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report user_installs 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_user_installs]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed up to calculate the total user installs
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[user_installs]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_installs: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp daily_user_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country user_uninstalls 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report user_uninstalls 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[daily_user_uninstalls]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed up to calculate the total user uninstalls
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[user_uninstalls]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp active_device_installs 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country active_devices_last_30_days 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report active_devices_last_30_days 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[active_device_installs]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed up to calculate the total active devices in the last 30 days
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp install_events 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country install_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report install_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[install_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[install_events]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • install_events: Directly mapped after cleaning
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp update_events 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country update_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report update_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[update_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[update_events]
    • Direct The column is directly copied to the output without transformation
    • Aggregation It's used in the country_join CTE to coalesce values
    • Output Columns:
      • update_events: Directly copied to the output column of the same name
Column Lineage
%3 16. model.google_play_source.stg_google_play__stats_installs_country_tmp 16. model.google_play_source.stg_google_play__stats_installs_country_tmp uninstall_events 15. model.google_play_source.stg_google_play__stats_installs_country 15. model.google_play_source.stg_google_play__stats_installs_country uninstall_events 16. model.google_play_source.stg_google_play__stats_installs_country_tmp:f0->15. model.google_play_source.stg_google_play__stats_installs_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report uninstall_events 15. model.google_play_source.stg_google_play__stats_installs_country:f0->2. model.google_play.google_play__country_report:f0
15. model.google_play_source.stg_google_play__stats_installs_country
  • Input Column: 16. model.google_play_source.stg_google_play__stats_installs_country_tmp[uninstall_events]
    • Aggregation The column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Directly summed up to the output column of the same name
2. model.google_play.google_play__country_report
  • Input Column: 15. model.google_play_source.stg_google_play__stats_installs_country[uninstall_events]
    • Direct The column is directly copied to the output without transformation
    • Aggregation It's used in the country_join CTE to coalesce values
    • Output Columns:
      • uninstall_events: Directly copied to the output column of the same name
17. model.google_play_source.stg_google_play__stats_installs_device

This SQL query processes data from a Google Play statistics table. It starts by casting columns to specific data types, then aggregates various installation and uninstallation metrics by date, device type, and package name. The query summarizes daily device and user installation activities, including installs, uninstalls, upgrades, and active devices over the last 30 days.

CleaningAggregationFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_device_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS active_device_installs,
    CAST(NULL AS INT) AS current_device_installs,
    CAST(NULL AS INT) AS current_user_installs,
    CAST(NULL AS INT) AS daily_device_installs,
    CAST(NULL AS INT) AS daily_device_uninstalls,
    CAST(NULL AS INT) AS daily_device_upgrades,
    CAST(NULL AS INT) AS daily_user_installs,
    CAST(NULL AS INT) AS daily_user_uninstalls,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS INT) AS install_events,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS INT) AS total_user_installs,
    CAST(NULL AS INT) AS uninstall_events,
    CAST(NULL AS INT) AS update_events
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    device, /* device_type */
    package_name,
    SUM(active_device_installs) AS active_devices_last_30_days,
    SUM(daily_device_installs) AS device_installs,
    SUM(daily_device_uninstalls) AS device_uninstalls,
    SUM(daily_device_upgrades) AS device_upgrades,
    SUM(daily_user_installs) AS user_installs,
    SUM(daily_user_uninstalls) AS user_uninstalls,
    SUM(install_events) AS install_events,
    SUM(uninstall_events) AS uninstall_events,
    SUM(update_events) AS update_events
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device active_devices_last_30_days device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day device install_events package_name uninstall_events update_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp date package_name device daily_device_installs daily_device_uninstalls daily_device_upgrades daily_user_installs daily_user_uninstalls active_device_installs install_events update_events uninstall_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f6 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f1->17. model.google_play_source.stg_google_play__stats_installs_device:f9 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f2->17. model.google_play_source.stg_google_play__stats_installs_device:f7 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f3->17. model.google_play_source.stg_google_play__stats_installs_device:f1 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f4->17. model.google_play_source.stg_google_play__stats_installs_device:f2 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f5->17. model.google_play_source.stg_google_play__stats_installs_device:f3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f6->17. model.google_play_source.stg_google_play__stats_installs_device:f4 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f7->17. model.google_play_source.stg_google_play__stats_installs_device:f5 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f8->17. model.google_play_source.stg_google_play__stats_installs_device:f0 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f9->17. model.google_play_source.stg_google_play__stats_installs_device:f8 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f10->17. model.google_play_source.stg_google_play__stats_installs_device:f11 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f11->17. model.google_play_source.stg_google_play__stats_installs_device:f10
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
device STRING Type of device model. May be NULL if users do not consent to being tracked.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp active_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device active_devices_last_30_days 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report active_devices_last_30_days 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[active_device_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed up to represent the total number of active devices in the last 30 days
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[active_devices_last_30_days]
    • Direct This column is directly copied to the output without transformation
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_installs total_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_installs]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_installs: Aggregated using SUM OVER to calculate cumulative installs
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_uninstalls total_device_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_uninstalls]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_uninstalls: Aggregated using SUM OVER to calculate cumulative uninstalls
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_upgrades 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_upgrades 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_upgrades 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_upgrades]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_upgrades: Aggregated sum of daily_device_upgrades
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_upgrades]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • device_upgrades: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_user_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device user_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report user_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_user_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed up to represent the total number of user installs per day
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[user_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • user_installs: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_user_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device user_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report user_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_user_uninstalls]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed up to represent the total number of user uninstalls per day
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[user_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp date 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device date_day 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report date_day 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[date_day]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for calculating rolling metrics
    • Output Columns:
      • date_day: Directly mapped using COALESCE between install_metrics and ratings
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp device 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[device]
    • Direct The column is directly used without transformation
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • device: Directly copied
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for partitioning data
    • Cleaning COALESCE used to handle NULL values
    • Output Columns:
      • device: Directly mapped using COALESCE between install_metrics and ratings
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp install_events 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device install_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report install_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[install_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Summed up to represent the total number of install events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[install_events]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • install_events: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp package_name 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device package_name 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report package_name 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • package_name: Directly copied
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[package_name]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for partitioning data
    • Output Columns:
      • package_name: Directly mapped using COALESCE between install_metrics and ratings
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp uninstall_events 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device uninstall_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report uninstall_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[uninstall_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Summed up to represent the total number of uninstall events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[uninstall_events]
    • Direct This column is directly copied to the output without transformation
    • Output Columns:
      • uninstall_events: Directly copied to the output column of the same name
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp update_events 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device update_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report update_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[update_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Summed up to represent the total number of update events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[update_events]
    • Direct This column is directly copied to the output without transformation
    • Output Columns:
      • update_events: Directly copied to the output column of the same name
18. model.google_play_source.stg_google_play__stats_installs_device_tmp

This SQL query selects all columns from the 'stats_installs_device' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple data extraction query without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_installs_device
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp _file _line _modified date package_name device current_device_installs daily_device_installs daily_device_uninstalls daily_device_upgrades current_user_installs total_user_installs daily_user_installs daily_user_uninstalls _fivetran_synced active_device_installs install_events update_events uninstall_events 43. source.google_play_source.google_play.stats_installs_device 43. source.google_play_source.google_play.stats_installs_device
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
device STRING None
current_device_installs INT64 None
daily_device_installs INT64 None
daily_device_uninstalls INT64 None
daily_device_upgrades INT64 None
current_user_installs INT64 None
total_user_installs INT64 None
daily_user_installs INT64 None
daily_user_uninstalls INT64 None
_fivetran_synced STRING None
active_device_installs INT64 None
install_events INT64 None
update_events INT64 None
uninstall_events INT64 None
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp date 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device date_day 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report date_day 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[date_day]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for calculating rolling metrics
    • Output Columns:
      • date_day: Directly mapped using COALESCE between install_metrics and ratings
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp package_name 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device package_name 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report package_name 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • package_name: Directly copied
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[package_name]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for partitioning data
    • Output Columns:
      • package_name: Directly mapped using COALESCE between install_metrics and ratings
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp device 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[device]
    • Direct The column is directly used without transformation
    • Aggregation The column is used in GROUP BY clause
    • Output Columns:
      • device: Directly copied
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device]
    • Integration Used as a key in the FULL OUTER JOIN
    • Aggregation Used in window functions for partitioning data
    • Cleaning COALESCE used to handle NULL values
    • Output Columns:
      • device: Directly mapped using COALESCE between install_metrics and ratings
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_installs total_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_installs]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_installs: Aggregated sum of daily_device_installs
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_installs: Aggregated using SUM OVER to calculate cumulative installs
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_uninstalls total_device_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f1
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_uninstalls]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_uninstalls: Aggregated sum of daily_device_uninstalls
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Aggregation Used to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
      • total_device_uninstalls: Aggregated using SUM OVER to calculate cumulative uninstalls
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_device_upgrades 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device device_upgrades 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device_upgrades 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_device_upgrades]
    • Aggregation The column is summed up in the final SELECT
    • Output Columns:
      • device_upgrades: Aggregated sum of daily_device_upgrades
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[device_upgrades]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • device_upgrades: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_user_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device user_installs 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report user_installs 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_user_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_installs: Summed up to represent the total number of user installs per day
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[user_installs]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • user_installs: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp daily_user_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device user_uninstalls 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report user_uninstalls 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[daily_user_uninstalls]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Summed up to represent the total number of user uninstalls per day
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[user_uninstalls]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp active_device_installs 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device active_devices_last_30_days 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report active_devices_last_30_days 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[active_device_installs]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Summed up to represent the total number of active devices in the last 30 days
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[active_devices_last_30_days]
    • Direct This column is directly copied to the output without transformation
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp install_events 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device install_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report install_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[install_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • install_events: Summed up to represent the total number of install events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[install_events]
    • Direct This column is directly copied to the output
    • Integration Used in the FULL OUTER JOIN with COALESCE to handle NULL values
    • Output Columns:
      • install_events: Directly mapped with COALESCE to default to 0 if NULL
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp update_events 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device update_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report update_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[update_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • update_events: Summed up to represent the total number of update events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[update_events]
    • Direct This column is directly copied to the output without transformation
    • Output Columns:
      • update_events: Directly copied to the output column of the same name
Column Lineage
%3 18. model.google_play_source.stg_google_play__stats_installs_device_tmp 18. model.google_play_source.stg_google_play__stats_installs_device_tmp uninstall_events 17. model.google_play_source.stg_google_play__stats_installs_device 17. model.google_play_source.stg_google_play__stats_installs_device uninstall_events 18. model.google_play_source.stg_google_play__stats_installs_device_tmp:f0->17. model.google_play_source.stg_google_play__stats_installs_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report uninstall_events 17. model.google_play_source.stg_google_play__stats_installs_device:f0->3. model.google_play.google_play__device_report:f0
17. model.google_play_source.stg_google_play__stats_installs_device
  • Input Column: 18. model.google_play_source.stg_google_play__stats_installs_device_tmp[uninstall_events]
    • Aggregation This column is summed up in the final SELECT statement
    • Output Columns:
      • uninstall_events: Summed up to represent the total number of uninstall events
3. model.google_play.google_play__device_report
  • Input Column: 17. model.google_play_source.stg_google_play__stats_installs_device[uninstall_events]
    • Direct This column is directly copied to the output without transformation
    • Output Columns:
      • uninstall_events: Directly copied to the output column of the same name
19. model.google_play_source.stg_google_play__stats_installs_os_version

This SQL query processes data from a Google Play stats table. It starts by casting columns to specific data types, then aggregates various install and uninstall metrics by date, package name, and Android OS version. The query performs summations on multiple metrics such as active devices, installs, uninstalls, and upgrades.

CleaningAggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_os_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS active_device_installs,
    CAST(NULL AS TEXT) AS android_os_version,
    CAST(NULL AS INT) AS current_device_installs,
    CAST(NULL AS INT) AS current_user_installs,
    CAST(NULL AS INT) AS daily_device_installs,
    CAST(NULL AS INT) AS daily_device_uninstalls,
    CAST(NULL AS INT) AS daily_device_upgrades,
    CAST(NULL AS INT) AS daily_user_installs,
    CAST(NULL AS INT) AS daily_user_uninstalls,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS INT) AS install_events,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS INT) AS total_user_installs,
    CAST(NULL AS INT) AS uninstall_events,
    CAST(NULL AS INT) AS update_events
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    package_name,
    android_os_version,
    SUM(active_device_installs) AS active_devices_last_30_days,
    SUM(daily_device_installs) AS device_installs,
    SUM(daily_device_uninstalls) AS device_uninstalls,
    SUM(daily_device_upgrades) AS device_upgrades,
    SUM(daily_user_installs) AS user_installs,
    SUM(daily_user_uninstalls) AS user_uninstalls,
    SUM(install_events) AS install_events,
    SUM(uninstall_events) AS uninstall_events,
    SUM(update_events) AS update_events
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version active_devices_last_30_days android_os_version device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp date package_name android_os_version daily_device_installs daily_device_uninstalls daily_device_upgrades daily_user_installs daily_user_uninstalls active_device_installs install_events update_events uninstall_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f7 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f1->19. model.google_play_source.stg_google_play__stats_installs_os_version:f9 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f2->19. model.google_play_source.stg_google_play__stats_installs_os_version:f1 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f3->19. model.google_play_source.stg_google_play__stats_installs_os_version:f2 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f4->19. model.google_play_source.stg_google_play__stats_installs_os_version:f3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f5->19. model.google_play_source.stg_google_play__stats_installs_os_version:f4 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f6->19. model.google_play_source.stg_google_play__stats_installs_os_version:f5 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f7->19. model.google_play_source.stg_google_play__stats_installs_os_version:f6 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f8->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f9->19. model.google_play_source.stg_google_play__stats_installs_os_version:f8 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f10->19. model.google_play_source.stg_google_play__stats_installs_os_version:f11 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f11->19. model.google_play_source.stg_google_play__stats_installs_os_version:f10
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
android_os_version STRING Operation System of the android being used. May be NULL if users do not consent to being tracked.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp active_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version active_devices_last_30_days 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report active_devices_last_30_days 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[active_device_installs]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Aggregated sum of active_device_installs
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[active_devices_last_30_days]
    • Direct The column is directly copied without transformation
    • Integration Used in the FULL OUTER JOIN operations
    • Output Columns:
      • active_devices_last_30_days: Directly mapped with COALESCE to handle potential NULL values
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp android_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version android_os_version 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[android_os_version]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • android_os_version: Directly copied
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[android_os_version]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and PARTITION BY clauses
    • Other Used in COALESCE to handle NULL values in JOIN conditions
    • Output Columns:
      • android_os_version: Directly mapped with COALESCE across different source tables
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_installs total_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_installs: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_installs]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_uninstalls total_device_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_uninstalls: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_uninstalls]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE
      • total_device_uninstalls: Aggregated in a window function
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_upgrades 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_upgrades 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_upgrades 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_upgrades: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_upgrades]
    • Direct The column is directly copied
    • Output Columns:
      • device_upgrades: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_user_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version user_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report user_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_user_installs]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • user_installs: Aggregated sum of daily_user_installs
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[user_installs]
    • Direct The column is directly copied
    • Output Columns:
      • user_installs: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_user_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version user_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report user_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_user_uninstalls]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Aggregated sum of daily_user_uninstalls
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[user_uninstalls]
    • Direct The column is directly copied
    • Output Columns:
      • user_uninstalls: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp date 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version date_day 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[date_day]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and ORDER BY clauses
    • Output Columns:
      • date_day: Directly mapped with COALESCE across different source tables
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp install_events 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version install_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report install_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[install_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • install_events: Aggregated sum of install_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[install_events]
    • Direct The column is directly copied
    • Output Columns:
      • install_events: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp package_name 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version package_name 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • package_name: Directly copied
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[package_name]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and PARTITION BY clauses
    • Output Columns:
      • package_name: Directly mapped with COALESCE across different source tables
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp uninstall_events 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version uninstall_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report uninstall_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[uninstall_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • uninstall_events: Aggregated sum of uninstall_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • uninstall_events: It is directly mapped to the output column of the same name
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp update_events 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version update_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report update_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[update_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • update_events: Aggregated sum of update_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[update_events]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • update_events: It is directly mapped to the output column of the same name
20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp

This SQL query selects all columns from the 'stats_installs_os_version' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple selection of the entire table without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_installs_os_version
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp _file _line _modified date package_name android_os_version current_device_installs daily_device_installs daily_device_uninstalls daily_device_upgrades current_user_installs total_user_installs daily_user_installs daily_user_uninstalls _fivetran_synced active_device_installs install_events update_events uninstall_events 44. source.google_play_source.google_play.stats_installs_os_version 44. source.google_play_source.google_play.stats_installs_os_version
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
android_os_version STRING None
current_device_installs INT64 None
daily_device_installs INT64 None
daily_device_uninstalls INT64 None
daily_device_upgrades INT64 None
current_user_installs INT64 None
total_user_installs INT64 None
daily_user_installs INT64 None
daily_user_uninstalls INT64 None
_fivetran_synced STRING None
active_device_installs INT64 None
install_events INT64 None
update_events INT64 None
uninstall_events INT64 None
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp date 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version date_day 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[date_day]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and ORDER BY clauses
    • Output Columns:
      • date_day: Directly mapped with COALESCE across different source tables
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp package_name 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version package_name 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • package_name: Directly copied
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[package_name]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and PARTITION BY clauses
    • Output Columns:
      • package_name: Directly mapped with COALESCE across different source tables
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp android_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version android_os_version 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[android_os_version]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by in the final SELECT
    • Output Columns:
      • android_os_version: Directly copied
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[android_os_version]
    • Direct The column is directly copied
    • Integration Used as a key in JOIN operations and PARTITION BY clauses
    • Other Used in COALESCE to handle NULL values in JOIN conditions
    • Output Columns:
      • android_os_version: Directly mapped with COALESCE across different source tables
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_installs total_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_installs]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_installs: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_installs]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_installs
    • Output Columns:
      • device_installs: Directly mapped with COALESCE
      • total_device_installs: Aggregated in a window function
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_uninstalls total_device_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f1
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_uninstalls]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_uninstalls: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_uninstalls]
    • Direct The column is directly copied
    • Aggregation Used in a window function to calculate total_device_uninstalls
    • Output Columns:
      • device_uninstalls: Directly mapped with COALESCE
      • total_device_uninstalls: Aggregated in a window function
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_device_upgrades 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version device_upgrades 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report device_upgrades 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_device_upgrades]
    • Aggregation The column is summed in the final SELECT
    • Output Columns:
      • device_upgrades: Summed value of this column
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[device_upgrades]
    • Direct The column is directly copied
    • Output Columns:
      • device_upgrades: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_user_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version user_installs 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report user_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_user_installs]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • user_installs: Aggregated sum of daily_user_installs
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[user_installs]
    • Direct The column is directly copied
    • Output Columns:
      • user_installs: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp daily_user_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version user_uninstalls 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report user_uninstalls 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[daily_user_uninstalls]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • user_uninstalls: Aggregated sum of daily_user_uninstalls
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[user_uninstalls]
    • Direct The column is directly copied
    • Output Columns:
      • user_uninstalls: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp active_device_installs 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version active_devices_last_30_days 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report active_devices_last_30_days 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[active_device_installs]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • active_devices_last_30_days: Aggregated sum of active_device_installs
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[active_devices_last_30_days]
    • Direct The column is directly copied without transformation
    • Integration Used in the FULL OUTER JOIN operations
    • Output Columns:
      • active_devices_last_30_days: Directly mapped with COALESCE to handle potential NULL values
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp install_events 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version install_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report install_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[install_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • install_events: Aggregated sum of install_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[install_events]
    • Direct The column is directly copied
    • Output Columns:
      • install_events: Directly mapped with COALESCE
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp update_events 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version update_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report update_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[update_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • update_events: Aggregated sum of update_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[update_events]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • update_events: It is directly mapped to the output column of the same name
Column Lineage
%3 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp uninstall_events 19. model.google_play_source.stg_google_play__stats_installs_os_version 19. model.google_play_source.stg_google_play__stats_installs_os_version uninstall_events 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp:f0->19. model.google_play_source.stg_google_play__stats_installs_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report uninstall_events 19. model.google_play_source.stg_google_play__stats_installs_os_version:f0->4. model.google_play.google_play__os_version_report:f0
19. model.google_play_source.stg_google_play__stats_installs_os_version
  • Input Column: 20. model.google_play_source.stg_google_play__stats_installs_os_version_tmp[uninstall_events]
    • Aggregation This column is summed in the final SELECT statement
    • Output Columns:
      • uninstall_events: Aggregated sum of uninstall_events
4. model.google_play.google_play__os_version_report
  • Input Column: 19. model.google_play_source.stg_google_play__stats_installs_os_version[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • uninstall_events: It is directly mapped to the output column of the same name
21. model.google_play_source.stg_google_play__stats_installs_overview

This SQL query stages data from a temporary table, casts various fields to specific data types, renames some columns, and selects a subset of columns for the final output. It primarily focuses on Google Play app install statistics, including device installs, uninstalls, upgrades, and user-related metrics.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_installs_overview_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS active_device_installs,
    CAST(NULL AS INT) AS current_device_installs,
    CAST(NULL AS INT) AS current_user_installs,
    CAST(NULL AS INT) AS daily_device_installs,
    CAST(NULL AS INT) AS daily_device_uninstalls,
    CAST(NULL AS INT) AS daily_device_upgrades,
    CAST(NULL AS INT) AS daily_user_installs,
    CAST(NULL AS INT) AS daily_user_uninstalls,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS INT) AS install_events,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS INT) AS total_user_installs,
    CAST(NULL AS INT) AS uninstall_events,
    CAST(NULL AS INT) AS update_events
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    package_name,
    active_device_installs AS active_devices_last_30_days,
    daily_device_installs AS device_installs,
    daily_device_uninstalls AS device_uninstalls,
    daily_device_upgrades AS device_upgrades,
    daily_user_installs AS user_installs,
    daily_user_uninstalls AS user_uninstalls,
    install_events,
    uninstall_events,
    update_events,
    _fivetran_synced
  FROM fields
)
SELECT
  *
FROM final
%3 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview active_devices_last_30_days device_installs device_uninstalls device_upgrades user_installs user_uninstalls date_day install_events package_name uninstall_events update_events _fivetran_synced 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp date package_name daily_device_installs daily_device_uninstalls daily_device_upgrades daily_user_installs daily_user_uninstalls _fivetran_synced active_device_installs install_events update_events uninstall_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f6 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f1->21. model.google_play_source.stg_google_play__stats_installs_overview:f8 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f2->21. model.google_play_source.stg_google_play__stats_installs_overview:f1 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f3->21. model.google_play_source.stg_google_play__stats_installs_overview:f2 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f4->21. model.google_play_source.stg_google_play__stats_installs_overview:f3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f5->21. model.google_play_source.stg_google_play__stats_installs_overview:f4 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f6->21. model.google_play_source.stg_google_play__stats_installs_overview:f5 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f7->21. model.google_play_source.stg_google_play__stats_installs_overview:f11 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f8->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f9->21. model.google_play_source.stg_google_play__stats_installs_overview:f7 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f10->21. model.google_play_source.stg_google_play__stats_installs_overview:f10 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f11->21. model.google_play_source.stg_google_play__stats_installs_overview:f9
Name Type Comment
active_devices_last_30_days INT64 The number of active devices on which your app is installed. An active device is one that has been turned on at least once in the past 30 days.
device_installs INT64 Devices on which users installed your app on this day. An individual user can have multiple device installs.
device_uninstalls INT64 The number of devices from which users uninstalled your app on a given day.
device_upgrades INT64 The number of devices from which users upgraded your app on a given day.
user_installs INT64 The number of users who installed your app and did not have it installed on any other devices at the time on a given day.
user_uninstalls INT64 The number of users who uninstalled your app from all of their devices on this day.
date_day DATE The date on which the data is reported.
install_events INT64 The number of times your app was installed, including devices on which the app had been installed previously. This does not include pre-installs or device reactivations.
package_name STRING The package name of the app owning the report data.
uninstall_events INT64 The number of times your app was uninstalled. This does not include inactive devices.
update_events INT64 The number of times your app was updated.
_fivetran_synced STRING None
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp active_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview active_devices_last_30_days 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report active_devices_last_30_days 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[active_device_installs]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[active_devices_last_30_days]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_installs total_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_installs]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_installs: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Aggregated into this cumulative metric
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_uninstalls total_device_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_uninstalls]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_uninstalls: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Aggregated into this cumulative metric
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_upgrades 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_upgrades 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_upgrades 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_upgrades]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_upgrades: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_upgrades]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • device_upgrades: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_user_installs 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview user_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report user_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_user_installs]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • user_installs: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[user_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_installs: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_user_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview user_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report user_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_user_uninstalls]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[user_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp date 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview date_day 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for cumulative calculations
    • Output Columns:
      • date_day: Directly mapped
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp install_events 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview install_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report install_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[install_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • install_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[install_events]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • install_events: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp package_name 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview package_name 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly copied
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for partitioning
    • Output Columns:
      • package_name: Directly mapped
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp uninstall_events 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview uninstall_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report uninstall_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • uninstall_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[uninstall_events]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • uninstall_events: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp update_events 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview update_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report update_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[update_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • update_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[update_events]
    • Direct The column is directly copied without any transformation
    • Aggregation The column is included in the final SELECT statement
    • Output Columns:
      • update_events: Directly mapped to the output column of the same name
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp _fivetran_synced 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview _fivetran_synced 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP in the fields CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped after cleaning
22. model.google_play_source.stg_google_play__stats_installs_overview_tmp

This SQL query selects all columns and rows from the 'stats_installs_overview' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple data extraction query without any transformations, filters, or aggregations.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_installs_overview
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp _file _line _modified date package_name current_device_installs daily_device_installs daily_device_uninstalls daily_device_upgrades current_user_installs total_user_installs daily_user_installs daily_user_uninstalls _fivetran_synced active_device_installs install_events update_events uninstall_events 45. source.google_play_source.google_play.stats_installs_overview 45. source.google_play_source.google_play.stats_installs_overview
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
current_device_installs INT64 None
daily_device_installs INT64 None
daily_device_uninstalls INT64 None
daily_device_upgrades INT64 None
current_user_installs INT64 None
total_user_installs INT64 None
daily_user_installs INT64 None
daily_user_uninstalls INT64 None
_fivetran_synced STRING None
active_device_installs INT64 None
install_events INT64 None
update_events INT64 None
uninstall_events INT64 None
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp date 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview date_day 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for cumulative calculations
    • Output Columns:
      • date_day: Directly mapped
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp package_name 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview package_name 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly copied
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for partitioning
    • Output Columns:
      • package_name: Directly mapped
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_installs total_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_installs]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_installs: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_installs: Directly mapped after cleaning
      • total_device_installs: Aggregated into this cumulative metric
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_uninstalls total_device_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f1
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_uninstalls]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_uninstalls: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Aggregation Used in a window function to calculate cumulative totals
    • Output Columns:
      • device_uninstalls: Directly mapped after cleaning
      • total_device_uninstalls: Aggregated into this cumulative metric
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_device_upgrades 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview device_upgrades 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report device_upgrades 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_device_upgrades]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • device_upgrades: Directly copied and renamed
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[device_upgrades]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • device_upgrades: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_user_installs 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview user_installs 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report user_installs 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_user_installs]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • user_installs: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[user_installs]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_installs: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp daily_user_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview user_uninstalls 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report user_uninstalls 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[daily_user_uninstalls]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[user_uninstalls]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • user_uninstalls: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp _fivetran_synced 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview _fivetran_synced 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP in the fields CTE
    • Output Columns:
      • _fivetran_synced: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp active_device_installs 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview active_devices_last_30_days 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report active_devices_last_30_days 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[active_device_installs]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[active_devices_last_30_days]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • active_devices_last_30_days: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp install_events 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview install_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report install_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[install_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • install_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[install_events]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • install_events: Directly mapped after cleaning
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp update_events 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview update_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report update_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[update_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • update_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[update_events]
    • Direct The column is directly copied without any transformation
    • Aggregation The column is included in the final SELECT statement
    • Output Columns:
      • update_events: Directly mapped to the output column of the same name
Column Lineage
%3 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp uninstall_events 21. model.google_play_source.stg_google_play__stats_installs_overview 21. model.google_play_source.stg_google_play__stats_installs_overview uninstall_events 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp:f0->21. model.google_play_source.stg_google_play__stats_installs_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report uninstall_events 21. model.google_play_source.stg_google_play__stats_installs_overview:f0->5. model.google_play.google_play__overview_report:f0
21. model.google_play_source.stg_google_play__stats_installs_overview
  • Input Column: 22. model.google_play_source.stg_google_play__stats_installs_overview_tmp[uninstall_events]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the fields CTE
    • Output Columns:
      • uninstall_events: Directly mapped after cleaning
5. model.google_play.google_play__overview_report
  • Input Column: 21. model.google_play_source.stg_google_play__stats_installs_overview[uninstall_events]
    • Direct The column is directly copied without transformation
    • Cleaning The column is coalesced with 0 in case of NULL values
    • Output Columns:
      • uninstall_events: Directly mapped after cleaning
23. model.google_play_source.stg_google_play__stats_ratings_app_version

This SQL query performs data cleaning and transformation on the Google Play app ratings data. It casts columns to specific data types, handles null values, and renames some columns. The query also converts the 'daily_average_rating' from text to float, excluding 'NA' values, and applies conditional logic to filter out null app_version_code entries for certain columns.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_app_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS INT) AS app_version_code,
    CAST(NULL AS TEXT) AS daily_average_rating,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS FLOAT) AS total_average_rating
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_version_code,
    package_name,
    CASE
      WHEN app_version_code IS NULL
      THEN NULL
      ELSE CAST(NULLIF(CAST(daily_average_rating AS TEXT), 'NA') AS FLOAT)
    END AS average_rating,
    CASE WHEN app_version_code IS NULL THEN NULL ELSE total_average_rating END AS rolling_total_average_rating
  FROM fields
  GROUP BY
    1,
    2,
    3,
    4,
    5
)
SELECT
  *
FROM final
%3 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version app_version_code average_rating date_day package_name rolling_total_average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp date package_name app_version_code daily_average_rating total_average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f2 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f1->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f2->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f3->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f1 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f4->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f4
Name Type Comment
app_version_code INT64 Integer value of the version of the app being reported on.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp app_version_code 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version app_version_code 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[app_version_code]
    • Cleaning The column is cast to INT type
    • Filtering Used in CASE statements to filter null values
    • Output Columns:
      • app_version_code: Directly mapped after casting
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[app_version_code]
    • Integration Used as a key to join with other tables
    • Deduplication Used to partition data for rolling calculations
    • Output Columns:
      • app_version_code: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp daily_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[daily_average_rating]
    • Cleaning The column is cast to FLOAT, with 'NA' values converted to NULL
    • Output Columns:
      • average_rating: Transformed and mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[average_rating]
    • Direct Copied without transformation
    • Output Columns:
      • average_rating: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp date 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version date_day 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[date_day]
    • Integration Used as a key to join with other tables
    • Deduplication Used to order data for rolling calculations
    • Output Columns:
      • date_day: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp package_name 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version package_name 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[package_name]
    • Integration Used as a key to join with other tables
    • Deduplication Used to partition data for rolling calculations
    • Output Columns:
      • package_name: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp total_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version rolling_total_average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report rolling_total_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[total_average_rating]
    • Cleaning The column is cast to FLOAT
    • Filtering Used in a CASE statement to filter based on app_version_code
    • Output Columns:
      • rolling_total_average_rating: Conditionally mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[rolling_total_average_rating]
    • Direct Copied without transformation
    • Other Used in a window function to fill in missing values
    • Output Columns:
      • rolling_total_average_rating: Copied and potentially filled in for missing dates
24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp

This SQL query selects all columns from the 'stats_ratings_app_version' table in the 'google_play' schema of the 'TEST' database. It's a straightforward SELECT * statement without any filtering, transformations, or joins.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_ratings_app_version
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp _file _line _modified date package_name app_version_code daily_average_rating total_average_rating _fivetran_synced 46. source.google_play_source.google_play.stats_ratings_app_version 46. source.google_play_source.google_play.stats_ratings_app_version
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
app_version_code INT64 None
daily_average_rating STRING None
total_average_rating FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp date 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version date_day 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report date_day 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[date_day]
    • Integration Used as a key to join with other tables
    • Deduplication Used to order data for rolling calculations
    • Output Columns:
      • date_day: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp package_name 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version package_name 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report package_name 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[package_name]
    • Integration Used as a key to join with other tables
    • Deduplication Used to partition data for rolling calculations
    • Output Columns:
      • package_name: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp app_version_code 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version app_version_code 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report app_version_code 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[app_version_code]
    • Cleaning The column is cast to INT type
    • Filtering Used in CASE statements to filter null values
    • Output Columns:
      • app_version_code: Directly mapped after casting
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[app_version_code]
    • Integration Used as a key to join with other tables
    • Deduplication Used to partition data for rolling calculations
    • Output Columns:
      • app_version_code: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp daily_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[daily_average_rating]
    • Cleaning The column is cast to FLOAT, with 'NA' values converted to NULL
    • Output Columns:
      • average_rating: Transformed and mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[average_rating]
    • Direct Copied without transformation
    • Output Columns:
      • average_rating: Directly copied to output
Column Lineage
%3 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp total_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version 23. model.google_play_source.stg_google_play__stats_ratings_app_version rolling_total_average_rating 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp:f0->23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0 1. model.google_play.google_play__app_version_report 1. model.google_play.google_play__app_version_report rolling_total_average_rating 23. model.google_play_source.stg_google_play__stats_ratings_app_version:f0->1. model.google_play.google_play__app_version_report:f0
23. model.google_play_source.stg_google_play__stats_ratings_app_version
  • Input Column: 24. model.google_play_source.stg_google_play__stats_ratings_app_version_tmp[total_average_rating]
    • Cleaning The column is cast to FLOAT
    • Filtering Used in a CASE statement to filter based on app_version_code
    • Output Columns:
      • rolling_total_average_rating: Conditionally mapped
1. model.google_play.google_play__app_version_report
  • Input Column: 23. model.google_play_source.stg_google_play__stats_ratings_app_version[rolling_total_average_rating]
    • Direct Copied without transformation
    • Other Used in a window function to fill in missing values
    • Output Columns:
      • rolling_total_average_rating: Copied and potentially filled in for missing dates
25. model.google_play_source.stg_google_play__stats_ratings_country

This SQL query processes data from a Google Play stats ratings source. It casts various fields to specific data types, handles null values, and performs some data cleaning. The query specifically focuses on date, country, package name, daily average rating, and total average rating. It converts the daily average rating from text to float, excluding 'NA' values, and only includes ratings when a country is specified. The final output includes a date_day, country, package_name, average_rating, and rolling_total_average_rating.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_country_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS TEXT) AS country,
    CAST(NULL AS TEXT) AS daily_average_rating,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS FLOAT) AS total_average_rating
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    country,
    package_name,
    CASE
      WHEN country IS NULL
      THEN NULL
      ELSE CAST(NULLIF(CAST(daily_average_rating AS TEXT), 'NA') AS FLOAT)
    END AS average_rating,
    CASE WHEN country IS NULL THEN NULL ELSE total_average_rating END AS rolling_total_average_rating
  FROM fields
  GROUP BY
    1,
    2,
    3,
    4,
    5
)
SELECT
  *
FROM final
%3 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country country average_rating date_day package_name rolling_total_average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp date package_name country daily_average_rating total_average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f2 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f1->25. model.google_play_source.stg_google_play__stats_ratings_country:f3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f2->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f3->25. model.google_play_source.stg_google_play__stats_ratings_country:f1 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f4->25. model.google_play_source.stg_google_play__stats_ratings_country:f4
Name Type Comment
country STRING Two-letter abbreviation of the country where the user’s Google account is registered.
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp country 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country country 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[country]
    • Direct The column is directly copied
    • Filtering Used to filter out null values in average_rating calculation
    • Output Columns:
      • country: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[country]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • country_short: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp daily_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[daily_average_rating]
    • Cleaning Cast to TEXT, then to FLOAT, excluding 'NA' values
    • Filtering Only included when country is not null
    • Output Columns:
      • average_rating: Transformed and mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[average_rating]
    • Direct Directly copied to the output
    • Output Columns:
      • average_rating: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp date 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country date_day 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[date_day]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • date_day: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp package_name 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country package_name 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[package_name]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • package_name: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp total_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country rolling_total_average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_total_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[total_average_rating]
    • Cleaning Cast to FLOAT
    • Filtering Only included when country is not null
    • Output Columns:
      • rolling_total_average_rating: Transformed and mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[rolling_total_average_rating]
    • Direct Directly copied to the output
    • Other Used in a window function to fill in NULL values for days without ratings
    • Output Columns:
      • rolling_total_average_rating: Copied and potentially filled in for NULL values
26. model.google_play_source.stg_google_play__stats_ratings_country_tmp

This SQL query selects all columns and rows from the table 'stats_ratings_country' in the 'google_play' schema of the 'TEST' database. It's a straightforward SELECT * statement without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_ratings_country
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp _file _line _modified date package_name country daily_average_rating total_average_rating _fivetran_synced 47. source.google_play_source.google_play.stats_ratings_country 47. source.google_play_source.google_play.stats_ratings_country
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
country STRING None
daily_average_rating STRING None
total_average_rating FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp date 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country date_day 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[date_day]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • date_day: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp package_name 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country package_name 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[package_name]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • package_name: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp country 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country country 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[country]
    • Direct The column is directly copied
    • Filtering Used to filter out null values in average_rating calculation
    • Output Columns:
      • country: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[country]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output
    • Output Columns:
      • country_short: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp daily_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[daily_average_rating]
    • Cleaning Cast to TEXT, then to FLOAT, excluding 'NA' values
    • Filtering Only included when country is not null
    • Output Columns:
      • average_rating: Transformed and mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[average_rating]
    • Direct Directly copied to the output
    • Output Columns:
      • average_rating: Directly copied
Column Lineage
%3 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp total_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country 25. model.google_play_source.stg_google_play__stats_ratings_country rolling_total_average_rating 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp:f0->25. model.google_play_source.stg_google_play__stats_ratings_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_total_average_rating 25. model.google_play_source.stg_google_play__stats_ratings_country:f0->2. model.google_play.google_play__country_report:f0
25. model.google_play_source.stg_google_play__stats_ratings_country
  • Input Column: 26. model.google_play_source.stg_google_play__stats_ratings_country_tmp[total_average_rating]
    • Cleaning Cast to FLOAT
    • Filtering Only included when country is not null
    • Output Columns:
      • rolling_total_average_rating: Transformed and mapped
2. model.google_play.google_play__country_report
  • Input Column: 25. model.google_play_source.stg_google_play__stats_ratings_country[rolling_total_average_rating]
    • Direct Directly copied to the output
    • Other Used in a window function to fill in NULL values for days without ratings
    • Output Columns:
      • rolling_total_average_rating: Copied and potentially filled in for NULL values
27. model.google_play_source.stg_google_play__stats_ratings_device

This SQL query performs data cleaning and transformation on the Google Play stats ratings device data. It casts various fields to appropriate data types, handles null values, and reformats the average rating and total average rating fields. The query also renames some columns for clarity.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_device_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS TEXT) AS daily_average_rating,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS FLOAT) AS total_average_rating
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    device,
    package_name,
    CASE
      WHEN device IS NULL
      THEN NULL
      ELSE CAST(NULLIF(CAST(daily_average_rating AS TEXT), 'NA') AS FLOAT)
    END AS average_rating,
    CASE WHEN device IS NULL THEN NULL ELSE total_average_rating END AS rolling_total_average_rating
  FROM fields
  GROUP BY
    1,
    2,
    3,
    4,
    5
)
SELECT
  *
FROM final
%3 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device average_rating date_day device package_name rolling_total_average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp date package_name device daily_average_rating total_average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f1 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f1->27. model.google_play_source.stg_google_play__stats_ratings_device:f3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f2->27. model.google_play_source.stg_google_play__stats_ratings_device:f2 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f3->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f4->27. model.google_play_source.stg_google_play__stats_ratings_device:f4
Name Type Comment
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
date_day DATE The date on which the data is reported.
device STRING Type of device model. May be NULL if users do not consent to being tracked.
package_name STRING The package name of the app owning the report data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp daily_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[daily_average_rating]
    • Cleaning The column is cleaned by casting to TEXT, checking for 'NA' values, and then casting to FLOAT
    • Output Columns:
      • average_rating: Mapped after cleaning and transformation
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp date 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device date_day 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report date_day 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[date_day]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp device 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device device 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[device]
    • Direct The column is directly copied without transformation
    • Filtering Used in CASE statements to determine if other columns should be NULL
    • Output Columns:
      • device: Directly mapped
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[device]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp package_name 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device package_name 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report package_name 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[package_name]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp total_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device rolling_total_average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report rolling_total_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[total_average_rating]
    • Cleaning The column is cleaned by checking if device is NULL
    • Output Columns:
      • rolling_total_average_rating: Mapped after cleaning
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[rolling_total_average_rating]
    • Other This column is propagated across rows within partitions to fill in NULL values
    • Output Columns:
      • rolling_total_average_rating: Propagated and copied to the output
28. model.google_play_source.stg_google_play__stats_ratings_device_tmp

This SQL query selects all columns and rows from the 'stats_ratings_device' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple data extraction query without any transformations, filters, or aggregations.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_ratings_device
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp _file _line _modified date package_name device daily_average_rating total_average_rating _fivetran_synced 48. source.google_play_source.google_play.stats_ratings_device 48. source.google_play_source.google_play.stats_ratings_device
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
device STRING None
daily_average_rating STRING None
total_average_rating FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp date 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device date_day 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report date_day 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[date_day]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp package_name 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device package_name 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report package_name 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[package_name]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp device 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device device 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report device 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[device]
    • Direct The column is directly copied without transformation
    • Filtering Used in CASE statements to determine if other columns should be NULL
    • Output Columns:
      • device: Directly mapped
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[device]
    • Integration Used as a key to join with the installs table
    • Aggregation Used in partitioning for rolling calculations
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp daily_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[daily_average_rating]
    • Cleaning The column is cleaned by casting to TEXT, checking for 'NA' values, and then casting to FLOAT
    • Output Columns:
      • average_rating: Mapped after cleaning and transformation
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output
Column Lineage
%3 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp total_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device 27. model.google_play_source.stg_google_play__stats_ratings_device rolling_total_average_rating 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp:f0->27. model.google_play_source.stg_google_play__stats_ratings_device:f0 3. model.google_play.google_play__device_report 3. model.google_play.google_play__device_report rolling_total_average_rating 27. model.google_play_source.stg_google_play__stats_ratings_device:f0->3. model.google_play.google_play__device_report:f0
27. model.google_play_source.stg_google_play__stats_ratings_device
  • Input Column: 28. model.google_play_source.stg_google_play__stats_ratings_device_tmp[total_average_rating]
    • Cleaning The column is cleaned by checking if device is NULL
    • Output Columns:
      • rolling_total_average_rating: Mapped after cleaning
3. model.google_play.google_play__device_report
  • Input Column: 27. model.google_play_source.stg_google_play__stats_ratings_device[rolling_total_average_rating]
    • Other This column is propagated across rows within partitions to fill in NULL values
    • Output Columns:
      • rolling_total_average_rating: Propagated and copied to the output
29. model.google_play_source.stg_google_play__stats_ratings_os_version

This SQL query performs data cleaning and transformation on the Google Play Store ratings data. It casts columns to appropriate data types, handles null values, and renames some columns. The query also performs some data cleaning by converting 'NA' values to NULL in the daily_average_rating column and conditionally setting values to NULL based on the android_os_version column.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_os_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS TEXT) AS android_os_version,
    CAST(NULL AS TEXT) AS daily_average_rating,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS FLOAT) AS total_average_rating
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    android_os_version,
    package_name,
    CASE
      WHEN android_os_version IS NULL
      THEN NULL
      ELSE CAST(NULLIF(CAST(daily_average_rating AS TEXT), 'NA') AS FLOAT)
    END AS average_rating,
    CASE WHEN android_os_version IS NULL THEN NULL ELSE total_average_rating END AS rolling_total_average_rating
  FROM fields
  GROUP BY
    1,
    2,
    3,
    4,
    5
)
SELECT
  *
FROM final
%3 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version average_rating date_day android_os_version package_name rolling_total_average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp date package_name android_os_version daily_average_rating total_average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f1 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f1->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f2->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f2 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f3->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f4->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f4
Name Type Comment
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
date_day DATE The date on which the data is reported.
android_os_version STRING Type of device model. May be NULL if users do not consent to being tracked.
package_name STRING The package name of the app owning the report data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp daily_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[daily_average_rating]
    • Cleaning Converted from TEXT to FLOAT, 'NA' values are set to NULL
    • Filtering Only set when android_os_version is not NULL
    • Output Columns:
      • average_rating: Mapped after cleaning and filtering
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp date 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version date_day 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[date_day]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • date_day: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp android_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version android_os_version 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[android_os_version]
    • Direct The column is directly copied
    • Filtering Used to conditionally set other columns to NULL
    • Output Columns:
      • android_os_version: Directly mapped
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[android_os_version]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • android_os_version: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp package_name 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version package_name 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[package_name]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • package_name: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp total_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version rolling_total_average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report rolling_total_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[total_average_rating]
    • Filtering Only set when android_os_version is not NULL
    • Output Columns:
      • rolling_total_average_rating: Mapped after filtering
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[rolling_total_average_rating]
    • Direct The column is directly copied without any transformation
    • Other Used to create partitions for filling in NULL values
    • Output Columns:
      • rolling_total_average_rating: Directly copied to the output column of the same name, with NULL values filled in using partitioning
30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp

This SQL query selects all columns and rows from the table 'stats_ratings_os_version' in the 'google_play' schema of the 'TEST' database. It's a simple SELECT * statement that retrieves all data from the specified table without any transformation, filtering, or manipulation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_ratings_os_version
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp _file _line _modified date package_name android_os_version daily_average_rating total_average_rating _fivetran_synced 49. source.google_play_source.google_play.stats_ratings_os_version 49. source.google_play_source.google_play.stats_ratings_os_version
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
android_os_version STRING None
daily_average_rating STRING None
total_average_rating FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp date 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version date_day 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report date_day 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[date_day]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • date_day: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp package_name 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version package_name 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report package_name 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[package_name]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • package_name: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp android_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version android_os_version 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report android_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[android_os_version]
    • Direct The column is directly copied
    • Filtering Used to conditionally set other columns to NULL
    • Output Columns:
      • android_os_version: Directly mapped
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[android_os_version]
    • Integration Used as a key to join with other tables
    • Deduplication Used to create a unique identifier for each row along with other columns
    • Output Columns:
      • android_os_version: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp daily_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[daily_average_rating]
    • Cleaning Converted from TEXT to FLOAT, 'NA' values are set to NULL
    • Filtering Only set when android_os_version is not NULL
    • Output Columns:
      • average_rating: Mapped after cleaning and filtering
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output column of the same name
Column Lineage
%3 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp total_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version 29. model.google_play_source.stg_google_play__stats_ratings_os_version rolling_total_average_rating 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp:f0->29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0 4. model.google_play.google_play__os_version_report 4. model.google_play.google_play__os_version_report rolling_total_average_rating 29. model.google_play_source.stg_google_play__stats_ratings_os_version:f0->4. model.google_play.google_play__os_version_report:f0
29. model.google_play_source.stg_google_play__stats_ratings_os_version
  • Input Column: 30. model.google_play_source.stg_google_play__stats_ratings_os_version_tmp[total_average_rating]
    • Filtering Only set when android_os_version is not NULL
    • Output Columns:
      • rolling_total_average_rating: Mapped after filtering
4. model.google_play.google_play__os_version_report
  • Input Column: 29. model.google_play_source.stg_google_play__stats_ratings_os_version[rolling_total_average_rating]
    • Direct The column is directly copied without any transformation
    • Other Used to create partitions for filling in NULL values
    • Output Columns:
      • rolling_total_average_rating: Directly copied to the output column of the same name, with NULL values filled in using partitioning
31. model.google_play_source.stg_google_play__stats_ratings_overview

This SQL query performs data type casting and cleaning on the 'stg_google_play__stats_ratings_overview' table. It casts the 'date' column to DATE type, converts the 'daily_average_rating' from TEXT to FLOAT (replacing 'NA' values with NULL), and renames some columns. The query also selects specific columns for the final output.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__stats_ratings_overview_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS TEXT) AS daily_average_rating,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS FLOAT) AS total_average_rating
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    package_name,
    CAST(NULLIF(CAST(daily_average_rating AS TEXT), 'NA') AS FLOAT) AS average_rating,
    total_average_rating AS rolling_total_average_rating,
    _fivetran_synced
  FROM fields
)
SELECT
  *
FROM final
%3 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview average_rating date_day package_name rolling_total_average_rating _fivetran_synced 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp date package_name daily_average_rating total_average_rating _fivetran_synced 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f1 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f1->31. model.google_play_source.stg_google_play__stats_ratings_overview:f2 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f2->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f3->31. model.google_play_source.stg_google_play__stats_ratings_overview:f3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f4->31. model.google_play_source.stg_google_play__stats_ratings_overview:f4
Name Type Comment
average_rating FLOAT64 Average star rating this app has received across all ratings submitted on a given day.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
rolling_total_average_rating FLOAT64 Average star rating this app received across all ratings submitted up to and including the past day. For each user submitting a rating, only their most recent rating of the app is counted.
_fivetran_synced STRING None
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp daily_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview average_rating 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[daily_average_rating]
    • Cleaning The column is cast to FLOAT and 'NA' values are replaced with NULL
    • Output Columns:
      • average_rating: Mapped after cleaning and casting
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp date 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview date_day 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[date_day]
    • Integration The column is used as the key to join with other tables
    • Aggregation The column is used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp package_name 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview package_name 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[package_name]
    • Integration The column is used as the key to join with other tables
    • Aggregation The column is used in window functions for partitioning
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp total_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview rolling_total_average_rating 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report rolling_total_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[total_average_rating]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • rolling_total_average_rating: Directly mapped
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[rolling_total_average_rating]
    • Direct The column is directly copied initially
    • Other The column is used in a complex windowing operation to fill in NULL values
    • Output Columns:
      • rolling_total_average_rating: Copied and then processed to fill in NULL values
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp _fivetran_synced 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview _fivetran_synced 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • _fivetran_synced: Directly mapped
32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp

This SQL query selects all columns and rows from the 'stats_ratings_overview' table in the 'google_play' schema of the 'TEST' database. It's a simple SELECT * statement that retrieves all data from the specified table without any modification, filtering, or transformation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_ratings_overview
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp a _file _line _modified date package_name daily_average_rating total_average_rating _fivetran_synced 50. source.google_play_source.google_play.stats_ratings_overview 50. source.google_play_source.google_play.stats_ratings_overview
Name Type Comment
a INT64 None
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
daily_average_rating STRING None
total_average_rating FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp date 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview date_day 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report date_day 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Directly mapped after casting
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[date_day]
    • Integration The column is used as the key to join with other tables
    • Aggregation The column is used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp package_name 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview package_name 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report package_name 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[package_name]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • package_name: Directly mapped
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[package_name]
    • Integration The column is used as the key to join with other tables
    • Aggregation The column is used in window functions for partitioning
    • Output Columns:
      • package_name: Directly copied to the output
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp daily_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview average_rating 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[daily_average_rating]
    • Cleaning The column is cast to FLOAT and 'NA' values are replaced with NULL
    • Output Columns:
      • average_rating: Mapped after cleaning and casting
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[average_rating]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • average_rating: Directly copied to the output
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp total_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview rolling_total_average_rating 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0 5. model.google_play.google_play__overview_report 5. model.google_play.google_play__overview_report rolling_total_average_rating 31. model.google_play_source.stg_google_play__stats_ratings_overview:f0->5. model.google_play.google_play__overview_report:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[total_average_rating]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • rolling_total_average_rating: Directly mapped
5. model.google_play.google_play__overview_report
  • Input Column: 31. model.google_play_source.stg_google_play__stats_ratings_overview[rolling_total_average_rating]
    • Direct The column is directly copied initially
    • Other The column is used in a complex windowing operation to fill in NULL values
    • Output Columns:
      • rolling_total_average_rating: Copied and then processed to fill in NULL values
Column Lineage
%3 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp _fivetran_synced 31. model.google_play_source.stg_google_play__stats_ratings_overview 31. model.google_play_source.stg_google_play__stats_ratings_overview _fivetran_synced 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp:f0->31. model.google_play_source.stg_google_play__stats_ratings_overview:f0
31. model.google_play_source.stg_google_play__stats_ratings_overview
  • Input Column: 32. model.google_play_source.stg_google_play__stats_ratings_overview_tmp[_fivetran_synced]
    • Direct The column is directly copied without transformation
    • Output Columns:
      • _fivetran_synced: Directly mapped
33. model.google_play_source.stg_google_play__store_performance_country

This SQL query processes data from a Google Play store performance table. It starts by casting columns to specific data types, then aggregates the data by date, country region, and package name. The query calculates the sum of store listing acquisitions and visitors, and the average conversion rate for each group.

CleaningAggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__store_performance_country_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS TEXT) AS country_region,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS INT) AS store_listing_acquisitions,
    CAST(NULL AS FLOAT) AS store_listing_conversion_rate,
    CAST(NULL AS INT) AS store_listing_visitors
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    country_region,
    package_name,
    SUM(store_listing_acquisitions) AS store_listing_acquisitions,
    AVG(store_listing_conversion_rate) AS store_listing_conversion_rate,
    SUM(store_listing_visitors) AS store_listing_visitors
  FROM fields
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM final
%3 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country country_region date_day package_name store_listing_acquisitions store_listing_conversion_rate store_listing_visitors 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp date package_name country_region store_listing_acquisitions store_listing_visitors store_listing_conversion_rate 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f1 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f1->33. model.google_play_source.stg_google_play__store_performance_country:f2 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f2->33. model.google_play_source.stg_google_play__store_performance_country:f0 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f3->33. model.google_play_source.stg_google_play__store_performance_country:f3 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f4->33. model.google_play_source.stg_google_play__store_performance_country:f5 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f5->33. model.google_play_source.stg_google_play__store_performance_country:f4
Name Type Comment
country_region STRING Two-letter abbreviation of the country or region where the user’s Google account is registered.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
store_listing_acquisitions INT64 The number of users that visited your store listing and installed your app, who did not have your app installed on any device.
store_listing_conversion_rate FLOAT64 The percentage of store listing visitors who installed your app on a given day. Note: Does not include visits or installs from users who already have your app installed on another device
store_listing_visitors INT64 The number of users that visited your store listing who did not have your app installed on any device.
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp country_region 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country country_region 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[country_region]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by
    • Output Columns:
      • country_region: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[country_region]
    • Integration Used as a key to join with other tables
    • Cleaning Coalesced with other country columns to handle null values
    • Output Columns:
      • country_short: Directly mapped after coalescing
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp date 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country date_day 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by after casting
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to output
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp package_name 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country package_name 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by
    • Output Columns:
      • package_name: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • package_name: Directly copied to output
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_acquisitions 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_acquisitions 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_acquisitions total_store_acquisitions 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_acquisitions]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_acquisitions: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_acquisitions]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_acquisitions: Directly mapped after coalescing
      • total_store_acquisitions: Aggregated into a rolling total
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_conversion_rate 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_conversion_rate 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_conversion_rate 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_conversion_rate]
    • Aggregation The column is averaged
    • Output Columns:
      • store_listing_conversion_rate: Averaged in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_conversion_rate]
    • Direct Copied to output without transformation
    • Output Columns:
      • store_listing_conversion_rate: Directly copied to output
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_visitors 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_visitors 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_store_conversion_rate store_listing_visitors total_store_visitors 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f2 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_visitors]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_visitors: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_visitors]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_visitors: Directly mapped after coalescing
      • total_store_visitors: Aggregated into a rolling total
      • rolling_store_conversion_rate: Used in calculation of this derived metric
34. model.google_play_source.stg_google_play__store_performance_country_tmp

This SQL query selects all columns from the 'stats_store_performance_country' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple data extraction query without any transformation, filtering, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_store_performance_country
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp _file _line _modified date package_name country_region store_listing_acquisitions store_listing_visitors store_listing_conversion_rate _fivetran_synced 51. source.google_play_source.google_play.stats_store_performance_country 51. source.google_play_source.google_play.stats_store_performance_country
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
country_region STRING None
store_listing_acquisitions INT64 None
store_listing_visitors INT64 None
store_listing_conversion_rate FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp date 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country date_day 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report date_day 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[date]
    • Cleaning The column is cast to DATE type
    • Aggregation The column is grouped by after casting
    • Output Columns:
      • date_day: Directly mapped after casting to DATE
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[date_day]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • date_day: Directly copied to output
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp package_name 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country package_name 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report package_name 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[package_name]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by
    • Output Columns:
      • package_name: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[package_name]
    • Integration Used as a key to join with other tables
    • Aggregation Used in window functions for rolling calculations
    • Output Columns:
      • package_name: Directly copied to output
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp country_region 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country country_region 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report country_short 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[country_region]
    • Direct The column is directly used without transformation
    • Aggregation The column is grouped by
    • Output Columns:
      • country_region: Directly mapped
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[country_region]
    • Integration Used as a key to join with other tables
    • Cleaning Coalesced with other country columns to handle null values
    • Output Columns:
      • country_short: Directly mapped after coalescing
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_acquisitions 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_acquisitions 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_acquisitions total_store_acquisitions 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_acquisitions]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_acquisitions: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_acquisitions]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_acquisitions: Directly mapped after coalescing
      • total_store_acquisitions: Aggregated into a rolling total
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_visitors 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_visitors 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report rolling_store_conversion_rate store_listing_visitors total_store_visitors 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f1 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f2 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_visitors]
    • Aggregation The column is summed up
    • Output Columns:
      • store_listing_visitors: Summed up in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_visitors]
    • Aggregation Used in window functions for rolling calculations
    • Cleaning Coalesced to handle null values
    • Output Columns:
      • store_listing_visitors: Directly mapped after coalescing
      • total_store_visitors: Aggregated into a rolling total
      • rolling_store_conversion_rate: Used in calculation of this derived metric
Column Lineage
%3 34. model.google_play_source.stg_google_play__store_performance_country_tmp 34. model.google_play_source.stg_google_play__store_performance_country_tmp store_listing_conversion_rate 33. model.google_play_source.stg_google_play__store_performance_country 33. model.google_play_source.stg_google_play__store_performance_country store_listing_conversion_rate 34. model.google_play_source.stg_google_play__store_performance_country_tmp:f0->33. model.google_play_source.stg_google_play__store_performance_country:f0 2. model.google_play.google_play__country_report 2. model.google_play.google_play__country_report store_listing_conversion_rate 33. model.google_play_source.stg_google_play__store_performance_country:f0->2. model.google_play.google_play__country_report:f0
33. model.google_play_source.stg_google_play__store_performance_country
  • Input Column: 34. model.google_play_source.stg_google_play__store_performance_country_tmp[store_listing_conversion_rate]
    • Aggregation The column is averaged
    • Output Columns:
      • store_listing_conversion_rate: Averaged in the final output
2. model.google_play.google_play__country_report
  • Input Column: 33. model.google_play_source.stg_google_play__store_performance_country[store_listing_conversion_rate]
    • Direct Copied to output without transformation
    • Output Columns:
      • store_listing_conversion_rate: Directly copied to output
35. model.google_play_source.stg_google_play__store_performance_source

This SQL query performs several operations on data from the Google Play Store performance source. It starts by selecting all columns from a temporary table, then casts them to specific data types. The query then renames some columns, creates a surrogate key using MD5 hash of multiple columns, and selects the final set of columns. The purpose seems to be standardizing the data structure and creating a unique identifier for each record.

CleaningFeaturizationOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_google_play_source.stg_google_play__store_performance_source_tmp
), fields AS (
  SELECT
    CAST(NULL AS TEXT) AS _file,
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS _line,
    CAST(NULL AS TIMESTAMP) AS _modified,
    CAST(NULL AS DATE) AS date,
    CAST(NULL AS TEXT) AS package_name,
    CAST(NULL AS TEXT) AS search_term,
    CAST(NULL AS INT) AS store_listing_acquisitions,
    CAST(NULL AS FLOAT) AS store_listing_conversion_rate,
    CAST(NULL AS INT) AS store_listing_visitors,
    CAST(NULL AS TEXT) AS traffic_source,
    CAST(NULL AS TEXT) AS utm_campaign,
    CAST(NULL AS TEXT) AS utm_source
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    package_name,
    traffic_source,
    search_term,
    utm_campaign,
    utm_source,
    store_listing_acquisitions,
    store_listing_conversion_rate,
    store_listing_visitors,
    MD5(
      CAST(COALESCE(CAST(date AS TEXT), '_dbt_utils_surrogate_key_null_') || '-' || COALESCE(CAST(package_name AS TEXT), '_dbt_utils_surrogate_key_null_') || '-' || COALESCE(CAST(traffic_source AS TEXT), '_dbt_utils_surrogate_key_null_') || '-' || COALESCE(CAST(search_term AS TEXT), '_dbt_utils_surrogate_key_null_') || '-' || COALESCE(CAST(utm_campaign AS TEXT), '_dbt_utils_surrogate_key_null_') || '-' || COALESCE(CAST(utm_source AS TEXT), '_dbt_utils_surrogate_key_null_') AS TEXT)
    ) AS traffic_source_unique_key, /* make a surrogate key as the PK involves quite a few columns */
    _fivetran_synced
  FROM fields
)
SELECT
  *
FROM final
%3 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source_unique_key date_day package_name search_term store_listing_acquisitions store_listing_conversion_rate store_listing_visitors traffic_source utm_campaign utm_source _fivetran_synced 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp date package_name traffic_source search_term utm_source utm_campaign store_listing_acquisitions store_listing_visitors store_listing_conversion_rate _fivetran_synced 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f1->35. model.google_play_source.stg_google_play__store_performance_source:f2 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f1->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f2->35. model.google_play_source.stg_google_play__store_performance_source:f7 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f2->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f3->35. model.google_play_source.stg_google_play__store_performance_source:f3 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f3->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f4->35. model.google_play_source.stg_google_play__store_performance_source:f9 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f4->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f5->35. model.google_play_source.stg_google_play__store_performance_source:f8 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f5->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f6->35. model.google_play_source.stg_google_play__store_performance_source:f4 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f7->35. model.google_play_source.stg_google_play__store_performance_source:f6 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f8->35. model.google_play_source.stg_google_play__store_performance_source:f5 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f9->35. model.google_play_source.stg_google_play__store_performance_source:f10
Name Type Comment
traffic_source_unique_key STRING Surrogate key hashed on `date_day`, `package_name`, `traffic_source`, `search_term`, `utm_campaign`, and `utm_source`.
date_day DATE The date on which the data is reported.
package_name STRING The package name of the app owning the report data.
search_term STRING The term the user searched for before navigating to your store listing. Only available when the traffic source is Google Play search. Note: Can be Other this value does not reach certain minimum thresholds
store_listing_acquisitions INT64 The number of users that visited your store listing and installed your app, who did not have your app installed on any device.
store_listing_conversion_rate FLOAT64 The percentage of store listing visitors who installed your app on a given day. Note: Does not include visits or installs from users who already have your app installed on another device
store_listing_visitors INT64 The number of users that visited your store listing who did not have your app installed on any device.
traffic_source STRING How the user got to your store listing: Google Play search, Third-party referral, Google Play explore, or Other.
utm_campaign STRING The value of the utm_campaign URL parameter in deep links to your store listing. Only available when the traffic source is a third-party referral. Note: Can be Other this value does not reach certain minimum thresholds
utm_source STRING The value of the utm_source URL parameter in deep links to your store listing. Only available when the traffic source is a third-party referral. Note: Can be Other this value does not reach certain minimum thresholds
_fivetran_synced STRING None
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp date package_name search_term traffic_source utm_campaign utm_source 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source date_day package_name search_term traffic_source traffic_source_unique_key utm_campaign utm_source 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f4 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f1->35. model.google_play_source.stg_google_play__store_performance_source:f1 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f1->35. model.google_play_source.stg_google_play__store_performance_source:f4 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f3->35. model.google_play_source.stg_google_play__store_performance_source:f3 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f3->35. model.google_play_source.stg_google_play__store_performance_source:f4 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f2->35. model.google_play_source.stg_google_play__store_performance_source:f2 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f2->35. model.google_play_source.stg_google_play__store_performance_source:f4 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f5->35. model.google_play_source.stg_google_play__store_performance_source:f6 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f5->35. model.google_play_source.stg_google_play__store_performance_source:f4 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f4->35. model.google_play_source.stg_google_play__store_performance_source:f5 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f4->35. model.google_play_source.stg_google_play__store_performance_source:f4
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[date]
    • Cleaning The column is cast to DATE type
    • Other Used in creating the surrogate key
    • Output Columns:
      • date_day: Directly mapped after casting
      • traffic_source_unique_key: Part of the MD5 hash
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[package_name]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • package_name: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[traffic_source]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • traffic_source: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[search_term]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • search_term: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[utm_source]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • utm_source: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[utm_campaign]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • utm_campaign: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp date 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source date_day traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[date]
    • Cleaning The column is cast to DATE type
    • Other Used in creating the surrogate key
    • Output Columns:
      • date_day: Directly mapped after casting
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp package_name 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source package_name traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[package_name]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • package_name: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp search_term 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source search_term traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[search_term]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • search_term: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp store_listing_acquisitions 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source store_listing_acquisitions 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[store_listing_acquisitions]
    • Direct The column is directly copied
    • Output Columns:
      • store_listing_acquisitions: Directly copied
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp store_listing_conversion_rate 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source store_listing_conversion_rate 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[store_listing_conversion_rate]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as FLOAT in the 'fields' CTE
    • Output Columns:
      • store_listing_conversion_rate: Directly copied after casting
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp store_listing_visitors 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source store_listing_visitors 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[store_listing_visitors]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • store_listing_visitors: Directly copied after casting
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp traffic_source 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[traffic_source]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • traffic_source: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp utm_campaign 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source_unique_key utm_campaign 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[utm_campaign]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • utm_campaign: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp utm_source 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source_unique_key utm_source 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[utm_source]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • utm_source: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp _fivetran_synced 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source _fivetran_synced 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly copied after casting
36. model.google_play_source.stg_google_play__store_performance_source_tmp

This SQL query selects all columns from the 'stats_store_performance_traffic_source' table in the 'google_play' schema of the 'TEST' database. It appears to be a simple SELECT * statement without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.google_play.stats_store_performance_traffic_source
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp _file _line _modified date package_name traffic_source search_term utm_source utm_campaign store_listing_acquisitions store_listing_visitors store_listing_conversion_rate _fivetran_synced 52. source.google_play_source.google_play.stats_store_performance_traffic_source 52. source.google_play_source.google_play.stats_store_performance_traffic_source
Name Type Comment
_file STRING None
_line INT64 None
_modified STRING None
date DATE None
package_name STRING None
traffic_source STRING None
search_term STRING None
utm_source STRING None
utm_campaign STRING None
store_listing_acquisitions INT64 None
store_listing_visitors INT64 None
store_listing_conversion_rate FLOAT64 None
_fivetran_synced STRING None
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp date 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source date_day traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[date]
    • Cleaning The column is cast to DATE type
    • Other Used in creating the surrogate key
    • Output Columns:
      • date_day: Directly mapped after casting
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp package_name 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source package_name traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[package_name]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • package_name: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp traffic_source 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[traffic_source]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • traffic_source: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp search_term 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source search_term traffic_source_unique_key 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[search_term]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • search_term: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp utm_source 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source_unique_key utm_source 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[utm_source]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • utm_source: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp utm_campaign 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source traffic_source_unique_key utm_campaign 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f1 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[utm_campaign]
    • Direct The column is directly copied
    • Other Used in creating the surrogate key
    • Output Columns:
      • utm_campaign: Directly copied
      • traffic_source_unique_key: Part of the MD5 hash
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp store_listing_acquisitions 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source store_listing_acquisitions 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[store_listing_acquisitions]
    • Direct The column is directly copied
    • Output Columns:
      • store_listing_acquisitions: Directly copied
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp store_listing_visitors 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source store_listing_visitors 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[store_listing_visitors]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • store_listing_visitors: Directly copied after casting
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp store_listing_conversion_rate 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source store_listing_conversion_rate 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[store_listing_conversion_rate]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as FLOAT in the 'fields' CTE
    • Output Columns:
      • store_listing_conversion_rate: Directly copied after casting
Column Lineage
%3 36. model.google_play_source.stg_google_play__store_performance_source_tmp 36. model.google_play_source.stg_google_play__store_performance_source_tmp _fivetran_synced 35. model.google_play_source.stg_google_play__store_performance_source 35. model.google_play_source.stg_google_play__store_performance_source _fivetran_synced 36. model.google_play_source.stg_google_play__store_performance_source_tmp:f0->35. model.google_play_source.stg_google_play__store_performance_source:f0
35. model.google_play_source.stg_google_play__store_performance_source
  • Input Column: 36. model.google_play_source.stg_google_play__store_performance_source_tmp[_fivetran_synced]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE
    • Output Columns:
      • _fivetran_synced: Directly copied after casting
37. seed.google_play_source.google_play__country_codes
The model details are not provided
38. source.google_play_source.google_play.stats_crashes_app_version
The model details are not provided
39. source.google_play_source.google_play.stats_crashes_os_version
The model details are not provided
40. source.google_play_source.google_play.stats_crashes_overview
The model details are not provided
41. source.google_play_source.google_play.stats_installs_app_version
The model details are not provided
42. source.google_play_source.google_play.stats_installs_country
The model details are not provided
43. source.google_play_source.google_play.stats_installs_device
The model details are not provided
44. source.google_play_source.google_play.stats_installs_os_version
The model details are not provided
45. source.google_play_source.google_play.stats_installs_overview
The model details are not provided
46. source.google_play_source.google_play.stats_ratings_app_version
The model details are not provided
47. source.google_play_source.google_play.stats_ratings_country
The model details are not provided
48. source.google_play_source.google_play.stats_ratings_device
The model details are not provided
49. source.google_play_source.google_play.stats_ratings_os_version
The model details are not provided
50. source.google_play_source.google_play.stats_ratings_overview
The model details are not provided
51. source.google_play_source.google_play.stats_store_performance_country
The model details are not provided
52. source.google_play_source.google_play.stats_store_performance_traffic_source
The model details are not provided