%3 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report 7. model.apple_store.int_apple_store__app_store_overview 7. model.apple_store.int_apple_store__app_store_overview 7. model.apple_store.int_apple_store__app_store_overview->3. model.apple_store.apple_store__overview_report 8. model.apple_store.int_apple_store__app_store_source_type 8. model.apple_store.int_apple_store__app_store_source_type 8. model.apple_store.int_apple_store__app_store_source_type->5. model.apple_store.apple_store__source_type_report 9. model.apple_store.int_apple_store__crashes_app_version 9. model.apple_store.int_apple_store__crashes_app_version 9. model.apple_store.int_apple_store__crashes_app_version->1. model.apple_store.apple_store__app_version_report 10. model.apple_store.int_apple_store__crashes_device 10. model.apple_store.int_apple_store__crashes_device 10. model.apple_store.int_apple_store__crashes_device->2. model.apple_store.apple_store__device_report 11. model.apple_store.int_apple_store__crashes_overview 11. model.apple_store.int_apple_store__crashes_overview 11. model.apple_store.int_apple_store__crashes_overview->3. model.apple_store.apple_store__overview_report 12. model.apple_store.int_apple_store__downloads_overview 12. model.apple_store.int_apple_store__downloads_overview 12. model.apple_store.int_apple_store__downloads_overview->3. model.apple_store.apple_store__overview_report 13. model.apple_store.int_apple_store__downloads_source_type 13. model.apple_store.int_apple_store__downloads_source_type 13. model.apple_store.int_apple_store__downloads_source_type->5. model.apple_store.apple_store__source_type_report 14. model.apple_store.int_apple_store__platform_version 14. model.apple_store.int_apple_store__platform_version 14. model.apple_store.int_apple_store__platform_version->4. model.apple_store.apple_store__platform_version_report 15. model.apple_store.int_apple_store__usage_overview 15. model.apple_store.int_apple_store__usage_overview 15. model.apple_store.int_apple_store__usage_overview->3. model.apple_store.apple_store__overview_report 16. model.apple_store.int_apple_store__usage_source_type 16. model.apple_store.int_apple_store__usage_source_type 16. model.apple_store.int_apple_store__usage_source_type->5. model.apple_store.apple_store__source_type_report 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app->1. model.apple_store.apple_store__app_version_report 17. model.apple_store_source.stg_apple_store__app->2. model.apple_store.apple_store__device_report 17. model.apple_store_source.stg_apple_store__app->3. model.apple_store.apple_store__overview_report 17. model.apple_store_source.stg_apple_store__app->4. model.apple_store.apple_store__platform_version_report 17. model.apple_store_source.stg_apple_store__app->5. model.apple_store.apple_store__source_type_report 17. model.apple_store_source.stg_apple_store__app->6. model.apple_store.apple_store__territory_report 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device->2. model.apple_store.apple_store__device_report 18. model.apple_store_source.stg_apple_store__app_store_device->7. model.apple_store.int_apple_store__app_store_overview 18. model.apple_store_source.stg_apple_store__app_store_device->8. model.apple_store.int_apple_store__app_store_source_type 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp->18. model.apple_store_source.stg_apple_store__app_store_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version->4. model.apple_store.apple_store__platform_version_report 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp->20. model.apple_store_source.stg_apple_store__app_store_platform_version 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory->6. model.apple_store.apple_store__territory_report 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp->22. model.apple_store_source.stg_apple_store__app_store_territory 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp->17. model.apple_store_source.stg_apple_store__app 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version->9. model.apple_store.int_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version->10. model.apple_store.int_apple_store__crashes_device 25. model.apple_store_source.stg_apple_store__crashes_app_version->11. model.apple_store.int_apple_store__crashes_overview 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp->25. model.apple_store_source.stg_apple_store__crashes_app_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version->14. model.apple_store.int_apple_store__platform_version 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp->27. model.apple_store_source.stg_apple_store__crashes_platform_version 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device->2. model.apple_store.apple_store__device_report 29. model.apple_store_source.stg_apple_store__downloads_device->12. model.apple_store.int_apple_store__downloads_overview 29. model.apple_store_source.stg_apple_store__downloads_device->13. model.apple_store.int_apple_store__downloads_source_type 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp->29. model.apple_store_source.stg_apple_store__downloads_device 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version->4. model.apple_store.apple_store__platform_version_report 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp->31. model.apple_store_source.stg_apple_store__downloads_platform_version 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory->6. model.apple_store.apple_store__territory_report 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp->33. model.apple_store_source.stg_apple_store__downloads_territory 35. model.apple_store_source.stg_apple_store__sales_account 35. model.apple_store_source.stg_apple_store__sales_account 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp->35. model.apple_store_source.stg_apple_store__sales_account 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version->1. model.apple_store.apple_store__app_version_report 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp->37. model.apple_store_source.stg_apple_store__usage_app_version 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device->2. model.apple_store.apple_store__device_report 39. model.apple_store_source.stg_apple_store__usage_device->15. model.apple_store.int_apple_store__usage_overview 39. model.apple_store_source.stg_apple_store__usage_device->16. model.apple_store.int_apple_store__usage_source_type 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp->39. model.apple_store_source.stg_apple_store__usage_device 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version->4. model.apple_store.apple_store__platform_version_report 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp->41. model.apple_store_source.stg_apple_store__usage_platform_version 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory->6. model.apple_store.apple_store__territory_report 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp->43. model.apple_store_source.stg_apple_store__usage_territory 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes->6. model.apple_store.apple_store__territory_report 46. source.apple_store_source.apple_store.app 46. source.apple_store_source.apple_store.app 46. source.apple_store_source.apple_store.app->24. model.apple_store_source.stg_apple_store__app_tmp 47. source.apple_store_source.apple_store.app_store_platform_version_source_type_report 47. source.apple_store_source.apple_store.app_store_platform_version_source_type_report 47. source.apple_store_source.apple_store.app_store_platform_version_source_type_report->21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 48. source.apple_store_source.apple_store.app_store_source_type_device_report 48. source.apple_store_source.apple_store.app_store_source_type_device_report 48. source.apple_store_source.apple_store.app_store_source_type_device_report->19. model.apple_store_source.stg_apple_store__app_store_device_tmp 49. source.apple_store_source.apple_store.app_store_territory_source_type_report 49. source.apple_store_source.apple_store.app_store_territory_source_type_report 49. source.apple_store_source.apple_store.app_store_territory_source_type_report->23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 50. source.apple_store_source.apple_store.crashes_app_version_device_report 50. source.apple_store_source.apple_store.crashes_app_version_device_report 50. source.apple_store_source.apple_store.crashes_app_version_device_report->26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 51. source.apple_store_source.apple_store.crashes_platform_version_device_report 51. source.apple_store_source.apple_store.crashes_platform_version_device_report 51. source.apple_store_source.apple_store.crashes_platform_version_device_report->28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 52. source.apple_store_source.apple_store.downloads_platform_version_source_type_report 52. source.apple_store_source.apple_store.downloads_platform_version_source_type_report 52. source.apple_store_source.apple_store.downloads_platform_version_source_type_report->32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 53. source.apple_store_source.apple_store.downloads_source_type_device_report 53. source.apple_store_source.apple_store.downloads_source_type_device_report 53. source.apple_store_source.apple_store.downloads_source_type_device_report->30. model.apple_store_source.stg_apple_store__downloads_device_tmp 54. source.apple_store_source.apple_store.downloads_territory_source_type_report 54. source.apple_store_source.apple_store.downloads_territory_source_type_report 54. source.apple_store_source.apple_store.downloads_territory_source_type_report->34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 55. source.apple_store_source.apple_store.sales_account 55. source.apple_store_source.apple_store.sales_account 55. source.apple_store_source.apple_store.sales_account->36. model.apple_store_source.stg_apple_store__sales_account_tmp 56. source.apple_store_source.apple_store.usage_app_version_source_type_report 56. source.apple_store_source.apple_store.usage_app_version_source_type_report 56. source.apple_store_source.apple_store.usage_app_version_source_type_report->38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 57. source.apple_store_source.apple_store.usage_platform_version_source_type_report 57. source.apple_store_source.apple_store.usage_platform_version_source_type_report 57. source.apple_store_source.apple_store.usage_platform_version_source_type_report->42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 58. source.apple_store_source.apple_store.usage_source_type_device_report 58. source.apple_store_source.apple_store.usage_source_type_device_report 58. source.apple_store_source.apple_store.usage_source_type_device_report->40. model.apple_store_source.stg_apple_store__usage_device_tmp 59. source.apple_store_source.apple_store.usage_territory_source_type_report 59. source.apple_store_source.apple_store.usage_territory_source_type_report 59. source.apple_store_source.apple_store.usage_territory_source_type_report->44. model.apple_store_source.stg_apple_store__usage_territory_tmp
1. model.apple_store.apple_store__app_version_report

This SQL query combines data from multiple sources related to Apple Store app usage and crashes. It joins information about apps, their usage statistics, and crash reports, aggregating data by date, app ID, source type, and app version. The query creates a comprehensive report that includes various metrics such as active devices, installations, sessions, and crashes for each app version.

IntegrationAggregationCleaning
SQL Query
WITH __dbt__cte__int_apple_store__crashes_app_version AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      app_version,
      CAST(NULL AS TEXT) AS source_type,
      SUM(crashes) AS crashes
    FROM base
    GROUP BY
      1,
      2,
      3,
      4
  )
  SELECT
    *
  FROM aggregated
), app AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app
), crashes_app_version_report AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__crashes_app_version
), usage_app_version_report AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_app_version
), reporting_grain_combined AS (
  SELECT
    date_day,
    app_id,
    source_type,
    app_version
  FROM usage_app_version_report
  UNION ALL
  SELECT
    date_day,
    app_id,
    source_type,
    app_version
  FROM crashes_app_version_report
), reporting_grain AS (
  SELECT DISTINCT
    *
  FROM reporting_grain_combined
), joined AS (
  SELECT
    reporting_grain.date_day,
    reporting_grain.app_id,
    app.app_name,
    reporting_grain.source_type,
    reporting_grain.app_version,
    COALESCE(crashes_app_version_report.crashes, 0) AS crashes,
    COALESCE(usage_app_version_report.active_devices, 0) AS active_devices,
    COALESCE(usage_app_version_report.active_devices_last_30_days, 0) AS active_devices_last_30_days,
    COALESCE(usage_app_version_report.deletions, 0) AS deletions,
    COALESCE(usage_app_version_report.installations, 0) AS installations,
    COALESCE(usage_app_version_report.sessions, 0) AS sessions
  FROM reporting_grain
  LEFT JOIN app
    ON reporting_grain.app_id = app.app_id
  LEFT JOIN crashes_app_version_report
    ON reporting_grain.date_day = crashes_app_version_report.date_day
    AND reporting_grain.app_id = crashes_app_version_report.app_id
    AND reporting_grain.source_type = crashes_app_version_report.source_type
    AND reporting_grain.app_version = crashes_app_version_report.app_version
  LEFT JOIN usage_app_version_report
    ON reporting_grain.date_day = usage_app_version_report.date_day
    AND reporting_grain.app_id = usage_app_version_report.app_id
    AND reporting_grain.source_type = usage_app_version_report.source_type
    AND reporting_grain.app_version = usage_app_version_report.app_version
)
SELECT
  *
FROM joined
%3 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report date_day app_id app_name source_type app_version crashes active_devices active_devices_last_30_days deletions installations sessions 9. model.apple_store.int_apple_store__crashes_app_version 9. model.apple_store.int_apple_store__crashes_app_version 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f1 17. model.apple_store_source.stg_apple_store__app:f1->1. model.apple_store.apple_store__app_version_report:f2 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version date_day app_id source_type app_version active_devices active_devices_last_30_days deletions installations sessions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 37. model.apple_store_source.stg_apple_store__usage_app_version:f1->1. model.apple_store.apple_store__app_version_report:f1 37. model.apple_store_source.stg_apple_store__usage_app_version:f2->1. model.apple_store.apple_store__app_version_report:f3 37. model.apple_store_source.stg_apple_store__usage_app_version:f3->1. model.apple_store.apple_store__app_version_report:f4 37. model.apple_store_source.stg_apple_store__usage_app_version:f4->1. model.apple_store.apple_store__app_version_report:f6 37. model.apple_store_source.stg_apple_store__usage_app_version:f5->1. model.apple_store.apple_store__app_version_report:f7 37. model.apple_store_source.stg_apple_store__usage_app_version:f6->1. model.apple_store.apple_store__app_version_report:f8 37. model.apple_store_source.stg_apple_store__usage_app_version:f7->1. model.apple_store.apple_store__app_version_report:f9 37. model.apple_store_source.stg_apple_store__usage_app_version:f8->1. model.apple_store.apple_store__app_version_report:f10
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
app_name text Application Name.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
app_version text The app version of the app that the user is engaging with.
crashes bigint The number of recorded crashes experienced (User Opt-In only); a value of 0 indicates there were 0 crash reports or no value from the source report that day.
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version date_day 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report date_day 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp date 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[date]
    • Cleaning The date column is cleaned by casting it to DATE type
    • Output Columns:
      • date_day: Transformed to DATE type and renamed
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • date_day: Directly mapped to the output column
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f0 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version app_id 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_id 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[app_id]
    • Direct The app_id column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • app_id: Directly mapped to the output column
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version source_type 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report source_type 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp source_type 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[source_type]
    • Direct The source_type column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • source_type: Directly mapped to the output column
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version app_version 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_version 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_version 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[app_version]
    • Direct The app_version column is directly copied without any transformation
    • Output Columns:
      • app_version: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[app_version]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • app_version: Directly mapped to the output column
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version active_devices 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report active_devices 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp active_devices 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[active_devices]
    • Direct The active_devices column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[active_devices]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • active_devices: Mapped with COALESCE(usage_app_version_report.active_devices, 0)
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version active_devices_last_30_days 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report active_devices_last_30_days 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp active_devices_last_30_days 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[active_devices_last_30_days]
    • Direct The active_devices_last_30_days column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[active_devices_last_30_days]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • active_devices_last_30_days: Mapped with COALESCE(usage_app_version_report.active_devices_last_30_days, 0)
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version deletions 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report deletions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp deletions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cleaned by casting it to an INT data type in the 'fields' CTE
    • Output Columns:
      • deletions: It is directly mapped to the 'deletions' column in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[deletions]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • deletions: Mapped with COALESCE(usage_app_version_report.deletions, 0)
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version installations 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report installations 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp installations 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[installations]
    • Direct The installations column is directly copied without any transformation
    • Output Columns:
      • installations: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[installations]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • installations: Mapped with COALESCE(usage_app_version_report.installations, 0)
Column Lineage
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version sessions 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report sessions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp sessions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[sessions]
    • Direct The sessions column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[sessions]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • sessions: Mapped with COALESCE(usage_app_version_report.sessions, 0)
2. model.apple_store.apple_store__device_report

This SQL query integrates data from multiple Apple Store-related tables, including app information, app store device data, downloads, usage, and crashes. It combines these sources to create a comprehensive report on app performance across different devices. The query uses CTEs to prepare and join the data, and then creates a final output that includes various metrics such as impressions, page views, downloads, active devices, and crashes for each app, date, device, and source type combination.

IntegrationAggregationCleaning
SQL Query
WITH __dbt__cte__int_apple_store__crashes_device AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      device,
      CAST(NULL AS TEXT) AS source_type,
      SUM(crashes) AS crashes
    FROM base
    GROUP BY
      1,
      2,
      3,
      4
  )
  SELECT
    *
  FROM aggregated
), app AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app
), app_store_device AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_device
), downloads_device AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_device
), usage_device AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_device
), crashes_device AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__crashes_device
), reporting_grain_combined AS (
  SELECT
    date_day,
    app_id,
    source_type,
    device
  FROM app_store_device
  UNION ALL
  SELECT
    date_day,
    app_id,
    source_type,
    device
  FROM crashes_device
), reporting_grain AS (
  SELECT DISTINCT
    *
  FROM reporting_grain_combined
), joined AS (
  SELECT
    reporting_grain.date_day,
    reporting_grain.app_id,
    app.app_name,
    reporting_grain.source_type,
    reporting_grain.device,
    COALESCE(app_store_device.impressions, 0) AS impressions,
    COALESCE(app_store_device.impressions_unique_device, 0) AS impressions_unique_device,
    COALESCE(app_store_device.page_views, 0) AS page_views,
    COALESCE(app_store_device.page_views_unique_device, 0) AS page_views_unique_device,
    COALESCE(crashes_device.crashes, 0) AS crashes,
    COALESCE(downloads_device.first_time_downloads, 0) AS first_time_downloads,
    COALESCE(downloads_device.redownloads, 0) AS redownloads,
    COALESCE(downloads_device.total_downloads, 0) AS total_downloads,
    COALESCE(usage_device.active_devices, 0) AS active_devices,
    COALESCE(usage_device.active_devices_last_30_days, 0) AS active_devices_last_30_days,
    COALESCE(usage_device.deletions, 0) AS deletions,
    COALESCE(usage_device.installations, 0) AS installations,
    COALESCE(usage_device.sessions, 0) AS sessions
  FROM reporting_grain
  LEFT JOIN app
    ON reporting_grain.app_id = app.app_id
  LEFT JOIN app_store_device
    ON reporting_grain.date_day = app_store_device.date_day
    AND reporting_grain.app_id = app_store_device.app_id
    AND reporting_grain.source_type = app_store_device.source_type
    AND reporting_grain.device = app_store_device.device
  LEFT JOIN crashes_device
    ON reporting_grain.date_day = crashes_device.date_day
    AND reporting_grain.app_id = crashes_device.app_id
    AND reporting_grain.source_type = crashes_device.source_type
    AND reporting_grain.device = crashes_device.device
  LEFT JOIN downloads_device
    ON reporting_grain.date_day = downloads_device.date_day
    AND reporting_grain.app_id = downloads_device.app_id
    AND reporting_grain.source_type = downloads_device.source_type
    AND reporting_grain.device = downloads_device.device
  LEFT JOIN usage_device
    ON reporting_grain.date_day = usage_device.date_day
    AND reporting_grain.app_id = usage_device.app_id
    AND reporting_grain.source_type = usage_device.source_type
    AND reporting_grain.device = usage_device.device
)
SELECT
  *
FROM joined
%3 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day app_id app_name source_type device crashes impressions impressions_unique_device page_views page_views_unique_device first_time_downloads redownloads total_downloads active_devices active_devices_last_30_days deletions installations sessions active_free_trial_introductory_offer_subscriptions active_pay_a_you_go_introductory_offer_subscriptions active_pay_up_front_introductory_offer_subscriptions active_standard_price_subscriptions event_renew event_cancel event_subscribe 10. model.apple_store.int_apple_store__crashes_device 10. model.apple_store.int_apple_store__crashes_device 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f1 17. model.apple_store_source.stg_apple_store__app:f1->2. model.apple_store.apple_store__device_report:f2 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device date_day app_id source_type device impressions impressions_unique_device page_views page_views_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 18. model.apple_store_source.stg_apple_store__app_store_device:f1->2. model.apple_store.apple_store__device_report:f1 18. model.apple_store_source.stg_apple_store__app_store_device:f2->2. model.apple_store.apple_store__device_report:f3 18. model.apple_store_source.stg_apple_store__app_store_device:f3->2. model.apple_store.apple_store__device_report:f4 18. model.apple_store_source.stg_apple_store__app_store_device:f4->2. model.apple_store.apple_store__device_report:f6 18. model.apple_store_source.stg_apple_store__app_store_device:f5->2. model.apple_store.apple_store__device_report:f7 18. model.apple_store_source.stg_apple_store__app_store_device:f6->2. model.apple_store.apple_store__device_report:f8 18. model.apple_store_source.stg_apple_store__app_store_device:f7->2. model.apple_store.apple_store__device_report:f9 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device date_day app_id source_type device first_time_downloads redownloads total_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 29. model.apple_store_source.stg_apple_store__downloads_device:f1->2. model.apple_store.apple_store__device_report:f1 29. model.apple_store_source.stg_apple_store__downloads_device:f2->2. model.apple_store.apple_store__device_report:f3 29. model.apple_store_source.stg_apple_store__downloads_device:f3->2. model.apple_store.apple_store__device_report:f4 29. model.apple_store_source.stg_apple_store__downloads_device:f4->2. model.apple_store.apple_store__device_report:f10 29. model.apple_store_source.stg_apple_store__downloads_device:f5->2. model.apple_store.apple_store__device_report:f11 29. model.apple_store_source.stg_apple_store__downloads_device:f6->2. model.apple_store.apple_store__device_report:f12 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device date_day app_id source_type device active_devices active_devices_last_30_days deletions installations sessions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 39. model.apple_store_source.stg_apple_store__usage_device:f1->2. model.apple_store.apple_store__device_report:f1 39. model.apple_store_source.stg_apple_store__usage_device:f2->2. model.apple_store.apple_store__device_report:f3 39. model.apple_store_source.stg_apple_store__usage_device:f3->2. model.apple_store.apple_store__device_report:f4 39. model.apple_store_source.stg_apple_store__usage_device:f4->2. model.apple_store.apple_store__device_report:f13 39. model.apple_store_source.stg_apple_store__usage_device:f5->2. model.apple_store.apple_store__device_report:f14 39. model.apple_store_source.stg_apple_store__usage_device:f6->2. model.apple_store.apple_store__device_report:f15 39. model.apple_store_source.stg_apple_store__usage_device:f7->2. model.apple_store.apple_store__device_report:f16 39. model.apple_store_source.stg_apple_store__usage_device:f8->2. model.apple_store.apple_store__device_report:f17
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
app_name text Application Name.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
device text Device type associated with the respective metric(s).
crashes bigint The number of recorded crashes experienced (User Opt-In only); a value of 0 indicates there were 0 crash reports or no value from the source report that day.
impressions integer The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
impressions_unique_device integer The number of unique devices that have viewed your app for more than one second on on the Today, Games, Apps, Featured, Explore, Top Charts, Search tabs of the App Store and App Product Page views. This metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
page_views integer The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views_unique_device integer The number of unique devices that have viewed your App Store product page; this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
first_time_downloads integer The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads integer The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads integer Total Downloads is the sum of Redownloads and First Time Downloads.
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
active_free_trial_introductory_offer_subscriptions numeric None
active_pay_a_you_go_introductory_offer_subscriptions numeric None
active_pay_up_front_introductory_offer_subscriptions numeric None
active_standard_price_subscriptions numeric None
event_renew numeric None
event_cancel numeric None
event_subscribe numeric None
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device date_day 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device date_day 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device date_day 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp date 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp date 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp date 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE, then cast as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed and renamed to 'date_day' in the output
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[date]
    • Cleaning The column is cast to TIMESTAMP in the 'fields' CTE, then to DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed to DATE type and renamed
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[date]
    • Cleaning The column is cast to TIMESTAMP and then to DATE
    • Output Columns:
      • date_day: Transformed from TIMESTAMP to DATE
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly mapped to the output column
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f0 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device app_id 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device app_id 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device app_id 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp app_id 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp app_id 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp app_id 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly mapped to the output 'app_id' column
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • app_id: Directly copied to the output
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • app_id: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output without transformation
    • Output Columns:
      • app_id: directly copied
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly mapped to the output column
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
2. model.apple_store.apple_store__device_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct directly copied to the output without transformation
    • Output Columns:
      • app_name: directly copied
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device source_type 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device source_type 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device source_type 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp source_type 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp source_type 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp source_type 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly mapped to the output 'source_type' column
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • source_type: Directly copied to the output
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • source_type: Directly copied after casting to TEXT
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly mapped to the output column
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device device 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device device 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device device 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp device 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp device 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • device: Directly mapped to the output 'device' column
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • device: Directly copied to the output
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • device: Directly copied after casting to TEXT
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[device]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • device: Directly mapped to the output column
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[device]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • device: Directly copied to the output
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[device]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device impressions 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report impressions 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp impressions 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly mapped to the output 'impressions' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[impressions]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • impressions: Mapped to the output column with COALESCE applied
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device impressions_unique_device 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report impressions_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp impressions_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly mapped to the output 'impressions_unique_device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[impressions_unique_device]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • impressions_unique_device: Mapped to the output column with COALESCE applied
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device page_views 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report page_views 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp page_views 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly mapped to the output 'page_views' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[page_views]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • page_views: Mapped to the output column with COALESCE applied
Column Lineage
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device page_views_unique_device 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report page_views_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp page_views_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly mapped to the output 'page_views_unique_device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[page_views_unique_device]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • page_views_unique_device: Mapped to the output column with COALESCE applied
Column Lineage
%3 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device first_time_downloads 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report first_time_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp first_time_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • first_time_downloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[first_time_downloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • first_time_downloads: Copied to the output with COALESCE(downloads_device.first_time_downloads, 0)
Column Lineage
%3 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device redownloads 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report redownloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp redownloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • redownloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[redownloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • redownloads: Copied to the output with COALESCE(downloads_device.redownloads, 0)
Column Lineage
%3 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device total_downloads 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report total_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp total_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • total_downloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[total_downloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • total_downloads: Copied to the output with COALESCE(downloads_device.total_downloads, 0)
Column Lineage
%3 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device active_devices 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report active_devices 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp active_devices 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • active_devices: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[active_devices]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • active_devices: Copied to the output with COALESCE(usage_device.active_devices, 0)
Column Lineage
%3 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device active_devices_last_30_days 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report active_devices_last_30_days 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp active_devices_last_30_days 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • active_devices_last_30_days: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[active_devices_last_30_days]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • active_devices_last_30_days: Copied to the output with COALESCE(usage_device.active_devices_last_30_days, 0)
Column Lineage
%3 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device deletions 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report deletions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp deletions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[deletions]
    • Direct The 'deletions' column is directly copied from the input to the output without any transformation.
    • Cleaning The column is cast to INT type in the 'fields' CTE, ensuring consistent data type.
    • Output Columns:
      • deletions: The 'deletions' column is directly mapped to the output 'deletions' column.
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[deletions]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • deletions: Copied to the output with COALESCE(usage_device.deletions, 0)
Column Lineage
%3 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device installations 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report installations 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp installations 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • installations: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[installations]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • installations: Copied to the output with COALESCE(usage_device.installations, 0)
Column Lineage
%3 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device sessions 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report sessions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp sessions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • sessions: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[sessions]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • sessions: Copied to the output with COALESCE(usage_device.sessions, 0)
3. model.apple_store.apple_store__overview_report

This SQL query combines data from multiple Apple Store-related sources to create a comprehensive overview report. It integrates information about app store performance, crashes, downloads, and usage statistics for each app on a daily basis. The query joins these different data sources, performs some aggregations within CTEs, and then brings everything together in a final joined table. It also includes data cleaning by using COALESCE to handle potential NULL values in the metrics.

IntegrationAggregationCleaning
SQL Query
WITH __dbt__cte__int_apple_store__app_store_overview AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_device
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      SUM(impressions) AS impressions,
      SUM(page_views) AS page_views
    FROM base
    GROUP BY
      1,
      2
  )
  SELECT
    *
  FROM aggregated
), __dbt__cte__int_apple_store__crashes_overview AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      SUM(crashes) AS crashes
    FROM base
    GROUP BY
      1,
      2
  )
  SELECT
    *
  FROM aggregated
), __dbt__cte__int_apple_store__downloads_overview AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_device
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      SUM(first_time_downloads) AS first_time_downloads,
      SUM(redownloads) AS redownloads,
      SUM(total_downloads) AS total_downloads
    FROM base
    GROUP BY
      1,
      2
  )
  SELECT
    *
  FROM aggregated
), __dbt__cte__int_apple_store__usage_overview AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_device
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      SUM(active_devices) AS active_devices,
      SUM(deletions) AS deletions,
      SUM(installations) AS installations,
      SUM(sessions) AS sessions
    FROM base
    GROUP BY
      1,
      2
  )
  SELECT
    *
  FROM aggregated
), app AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app
), app_store AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__app_store_overview
), crashes AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__crashes_overview
), downloads AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__downloads_overview
), usage AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__usage_overview
), reporting_grain AS (
  SELECT DISTINCT
    date_day,
    app_id
  FROM app_store
), joined AS (
  SELECT
    reporting_grain.date_day,
    reporting_grain.app_id,
    app.app_name,
    COALESCE(app_store.impressions, 0) AS impressions,
    COALESCE(app_store.page_views, 0) AS page_views,
    COALESCE(crashes.crashes, 0) AS crashes,
    COALESCE(downloads.first_time_downloads, 0) AS first_time_downloads,
    COALESCE(downloads.redownloads, 0) AS redownloads,
    COALESCE(downloads.total_downloads, 0) AS total_downloads,
    COALESCE(usage.active_devices, 0) AS active_devices,
    COALESCE(usage.deletions, 0) AS deletions,
    COALESCE(usage.installations, 0) AS installations,
    COALESCE(usage.sessions, 0) AS sessions
  FROM reporting_grain
  LEFT JOIN app
    ON reporting_grain.app_id = app.app_id
  LEFT JOIN app_store
    ON reporting_grain.date_day = app_store.date_day
    AND reporting_grain.app_id = app_store.app_id
  LEFT JOIN crashes
    ON reporting_grain.date_day = crashes.date_day
    AND reporting_grain.app_id = crashes.app_id
  LEFT JOIN downloads
    ON reporting_grain.date_day = downloads.date_day
    AND reporting_grain.app_id = downloads.app_id
  LEFT JOIN usage
    ON reporting_grain.date_day = usage.date_day
    AND reporting_grain.app_id = usage.app_id
)
SELECT
  *
FROM joined
%3 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report date_day app_id app_name crashes impressions page_views first_time_downloads redownloads total_downloads active_devices deletions installations sessions active_free_trial_introductory_offer_subscriptions active_pay_as_you_go_introductory_offer_subscriptions active_pay_up_front_introductory_offer_subscriptions active_standard_price_subscriptions event_renew event_cancel event_subscribe 7. model.apple_store.int_apple_store__app_store_overview 7. model.apple_store.int_apple_store__app_store_overview 11. model.apple_store.int_apple_store__crashes_overview 11. model.apple_store.int_apple_store__crashes_overview 12. model.apple_store.int_apple_store__downloads_overview 12. model.apple_store.int_apple_store__downloads_overview 15. model.apple_store.int_apple_store__usage_overview 15. model.apple_store.int_apple_store__usage_overview 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f1 17. model.apple_store_source.stg_apple_store__app:f1->3. model.apple_store.apple_store__overview_report:f2
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
app_name text Application Name.
crashes bigint The number of recorded crashes experienced (User Opt-In only); a value of 0 indicates there were 0 crash reports or no value from the source report that day.
impressions bigint The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views bigint The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
first_time_downloads bigint The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads bigint The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads bigint Total Downloads is the sum of Redownloads and First Time Downloads.
active_devices bigint The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
deletions bigint A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations bigint An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions bigint Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
active_free_trial_introductory_offer_subscriptions numeric None
active_pay_as_you_go_introductory_offer_subscriptions numeric None
active_pay_up_front_introductory_offer_subscriptions numeric None
active_standard_price_subscriptions numeric None
event_renew numeric None
event_cancel numeric None
event_subscribe numeric None
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
3. model.apple_store.apple_store__overview_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • app_id: directly copied
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
3. model.apple_store.apple_store__overview_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct directly copied to the output
    • Output Columns:
      • app_name: directly copied
4. model.apple_store.apple_store__platform_version_report

This SQL query integrates data from multiple Apple Store-related tables, including app information, platform versions, crashes, downloads, and usage statistics. It combines these sources to create a comprehensive report that provides various metrics for each app, date, platform version, and source type. The query uses CTEs to organize and join the data, and includes aggregations for some metrics like crashes. The final result is a detailed view of app performance across different dimensions.

IntegrationAggregationCleaning
SQL Query
WITH __dbt__cte__int_apple_store__platform_version AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_platform_version
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      platform_version,
      CAST(NULL AS TEXT) AS source_type,
      SUM(crashes) AS crashes
    FROM base
    GROUP BY
      1,
      2,
      3,
      4
  )
  SELECT
    *
  FROM aggregated
), app AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app
), app_store_platform_version AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_platform_version
), crashes_platform_version AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__platform_version
), downloads_platform_version AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_platform_version
), usage_platform_version AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_platform_version
), reporting_grain_combined AS (
  SELECT
    date_day,
    app_id,
    source_type,
    platform_version
  FROM app_store_platform_version
  UNION ALL
  SELECT
    date_day,
    app_id,
    source_type,
    platform_version
  FROM crashes_platform_version
), reporting_grain AS (
  SELECT DISTINCT
    *
  FROM reporting_grain_combined
), joined AS (
  SELECT
    reporting_grain.date_day,
    reporting_grain.app_id,
    app.app_name,
    reporting_grain.source_type,
    reporting_grain.platform_version,
    COALESCE(app_store_platform_version.impressions, 0) AS impressions,
    COALESCE(app_store_platform_version.impressions_unique_device, 0) AS impressions_unique_device,
    COALESCE(app_store_platform_version.page_views, 0) AS page_views,
    COALESCE(app_store_platform_version.page_views_unique_device, 0) AS page_views_unique_device,
    COALESCE(crashes_platform_version.crashes, 0) AS crashes,
    COALESCE(downloads_platform_version.first_time_downloads, 0) AS first_time_downloads,
    COALESCE(downloads_platform_version.redownloads, 0) AS redownloads,
    COALESCE(downloads_platform_version.total_downloads, 0) AS total_downloads,
    COALESCE(usage_platform_version.active_devices, 0) AS active_devices,
    COALESCE(usage_platform_version.active_devices_last_30_days, 0) AS active_devices_last_30_days,
    COALESCE(usage_platform_version.deletions, 0) AS deletions,
    COALESCE(usage_platform_version.installations, 0) AS installations,
    COALESCE(usage_platform_version.sessions, 0) AS sessions
  FROM reporting_grain
  LEFT JOIN app
    ON reporting_grain.app_id = app.app_id
  LEFT JOIN app_store_platform_version
    ON reporting_grain.date_day = app_store_platform_version.date_day
    AND reporting_grain.app_id = app_store_platform_version.app_id
    AND reporting_grain.source_type = app_store_platform_version.source_type
    AND reporting_grain.platform_version = app_store_platform_version.platform_version
  LEFT JOIN crashes_platform_version
    ON reporting_grain.date_day = crashes_platform_version.date_day
    AND reporting_grain.app_id = crashes_platform_version.app_id
    AND reporting_grain.source_type = crashes_platform_version.source_type
    AND reporting_grain.platform_version = crashes_platform_version.platform_version
  LEFT JOIN downloads_platform_version
    ON reporting_grain.date_day = downloads_platform_version.date_day
    AND reporting_grain.app_id = downloads_platform_version.app_id
    AND reporting_grain.source_type = downloads_platform_version.source_type
    AND reporting_grain.platform_version = downloads_platform_version.platform_version
  LEFT JOIN usage_platform_version
    ON reporting_grain.date_day = usage_platform_version.date_day
    AND reporting_grain.app_id = usage_platform_version.app_id
    AND reporting_grain.source_type = usage_platform_version.source_type
    AND reporting_grain.platform_version = usage_platform_version.platform_version
)
SELECT
  *
FROM joined
%3 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day app_id app_name source_type platform_version crashes impressions impressions_unique_device page_views page_views_unique_device first_time_downloads redownloads total_downloads active_devices active_devices_last_30_days deletions installations sessions 14. model.apple_store.int_apple_store__platform_version 14. model.apple_store.int_apple_store__platform_version 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f1 17. model.apple_store_source.stg_apple_store__app:f1->4. model.apple_store.apple_store__platform_version_report:f2 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version date_day app_id source_type platform_version impressions impressions_unique_device page_views page_views_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f1->4. model.apple_store.apple_store__platform_version_report:f1 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f2->4. model.apple_store.apple_store__platform_version_report:f3 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f3->4. model.apple_store.apple_store__platform_version_report:f4 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f4->4. model.apple_store.apple_store__platform_version_report:f6 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f5->4. model.apple_store.apple_store__platform_version_report:f7 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f6->4. model.apple_store.apple_store__platform_version_report:f8 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f7->4. model.apple_store.apple_store__platform_version_report:f9 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version date_day app_id source_type platform_version first_time_downloads redownloads total_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f1->4. model.apple_store.apple_store__platform_version_report:f1 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f2->4. model.apple_store.apple_store__platform_version_report:f3 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f3->4. model.apple_store.apple_store__platform_version_report:f4 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f4->4. model.apple_store.apple_store__platform_version_report:f10 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f5->4. model.apple_store.apple_store__platform_version_report:f11 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f6->4. model.apple_store.apple_store__platform_version_report:f12 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version date_day app_id source_type platform_version active_devices active_devices_last_30_days deletions installations sessions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 41. model.apple_store_source.stg_apple_store__usage_platform_version:f1->4. model.apple_store.apple_store__platform_version_report:f1 41. model.apple_store_source.stg_apple_store__usage_platform_version:f2->4. model.apple_store.apple_store__platform_version_report:f3 41. model.apple_store_source.stg_apple_store__usage_platform_version:f3->4. model.apple_store.apple_store__platform_version_report:f4 41. model.apple_store_source.stg_apple_store__usage_platform_version:f4->4. model.apple_store.apple_store__platform_version_report:f13 41. model.apple_store_source.stg_apple_store__usage_platform_version:f5->4. model.apple_store.apple_store__platform_version_report:f14 41. model.apple_store_source.stg_apple_store__usage_platform_version:f6->4. model.apple_store.apple_store__platform_version_report:f15 41. model.apple_store_source.stg_apple_store__usage_platform_version:f7->4. model.apple_store.apple_store__platform_version_report:f16 41. model.apple_store_source.stg_apple_store__usage_platform_version:f8->4. model.apple_store.apple_store__platform_version_report:f17
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
app_name text Application Name.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
platform_version text The platform version of the device engaging with your app.
crashes bigint The number of recorded crashes experienced (User Opt-In only); a value of 0 indicates there were 0 crash reports or no value from the source report that day.
impressions integer The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
impressions_unique_device integer The number of unique devices that have viewed your app for more than one second on on the Today, Games, Apps, Featured, Explore, Top Charts, Search tabs of the App Store and App Product Page views. This metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
page_views integer The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views_unique_device integer The number of unique devices that have viewed your App Store product page; this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
first_time_downloads integer The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads integer The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads integer Total Downloads is the sum of Redownloads and First Time Downloads.
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version date_day 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version date_day 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version date_day 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp date 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp date 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp date 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed and renamed to date_day in the output
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[date]
    • Cleaning The column is cleaned by casting to DATE type
    • Output Columns:
      • date_day: Casted to DATE type and renamed
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Cast to DATE type and renamed
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f0 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version app_id 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version app_id 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version app_id 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp app_id 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp app_id 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp app_id 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly copied to the output
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version source_type 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version source_type 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version source_type 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp source_type 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp source_type 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp source_type 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly copied to the output
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version platform_version 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp platform_version 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp platform_version 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp platform_version 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • platform_version: Directly copied to the output
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version impressions 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report impressions 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp impressions 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[impressions]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • impressions: Cleaned and mapped to the output
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version impressions_unique_device 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report impressions_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp impressions_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[impressions_unique_device]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • impressions_unique_device: Cleaned and mapped to the output
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version page_views 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report page_views 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp page_views 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[page_views]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • page_views: Cleaned and mapped to the output
Column Lineage
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version page_views_unique_device 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report page_views_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp page_views_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[page_views_unique_device]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • page_views_unique_device: Cleaned and mapped to the output
Column Lineage
%3 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version first_time_downloads 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report first_time_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp first_time_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_time_downloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[first_time_downloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • first_time_downloads: Mapped with COALESCE(downloads_platform_version.first_time_downloads, 0)
Column Lineage
%3 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version redownloads 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report redownloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp redownloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • redownloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[redownloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • redownloads: Mapped with COALESCE(downloads_platform_version.redownloads, 0)
Column Lineage
%3 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version total_downloads 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report total_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp total_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • total_downloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[total_downloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • total_downloads: Mapped with COALESCE(downloads_platform_version.total_downloads, 0)
Column Lineage
%3 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version active_devices 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report active_devices 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp active_devices 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[active_devices]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • active_devices: Copied to the output with COALESCE(usage_platform_version.active_devices, 0)
Column Lineage
%3 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version active_devices_last_30_days 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report active_devices_last_30_days 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp active_devices_last_30_days 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[active_devices_last_30_days]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • active_devices_last_30_days: Copied to the output with COALESCE(usage_platform_version.active_devices_last_30_days, 0)
Column Lineage
%3 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version deletions 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report deletions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp deletions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cleaned by casting it to INT type in the 'fields' CTE
    • Output Columns:
      • deletions: It is directly copied to the 'deletions' column in the final output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[deletions]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • deletions: Copied to the output with COALESCE(usage_platform_version.deletions, 0)
Column Lineage
%3 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version installations 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report installations 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp installations 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • installations: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[installations]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • installations: Copied to the output with COALESCE(usage_platform_version.installations, 0)
Column Lineage
%3 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version sessions 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report sessions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp sessions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[sessions]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • sessions: Copied to the output with COALESCE(usage_platform_version.sessions, 0)
5. model.apple_store.apple_store__source_type_report

This SQL query integrates data from multiple Apple Store-related tables (app store, downloads, and usage) based on date, app ID, and source type. It aggregates metrics such as impressions, page views, downloads, active devices, and sessions. The query joins these aggregated results with app information and combines them into a single comprehensive report, filling in missing values with zeros.

IntegrationAggregationCleaning
SQL Query
WITH __dbt__cte__int_apple_store__app_store_source_type AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_device
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      source_type,
      SUM(impressions) AS impressions,
      SUM(page_views) AS page_views
    FROM base
    GROUP BY
      1,
      2,
      3
  )
  SELECT
    *
  FROM aggregated
), __dbt__cte__int_apple_store__downloads_source_type AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_device
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      source_type,
      SUM(first_time_downloads) AS first_time_downloads,
      SUM(redownloads) AS redownloads,
      SUM(total_downloads) AS total_downloads
    FROM base
    GROUP BY
      1,
      2,
      3
  )
  SELECT
    *
  FROM aggregated
), __dbt__cte__int_apple_store__usage_source_type AS (
  WITH base AS (
    SELECT
      *
    FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_device
  ), aggregated AS (
    SELECT
      date_day,
      app_id,
      source_type,
      SUM(active_devices) AS active_devices,
      SUM(deletions) AS deletions,
      SUM(installations) AS installations,
      SUM(sessions) AS sessions
    FROM base
    GROUP BY
      1,
      2,
      3
  )
  SELECT
    *
  FROM aggregated
), app AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app
), app_store_source_type AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__app_store_source_type
), downloads_source_type AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__downloads_source_type
), usage_source_type AS (
  SELECT
    *
  FROM __dbt__cte__int_apple_store__usage_source_type
), reporting_grain AS (
  SELECT DISTINCT
    date_day,
    app_id,
    source_type
  FROM app_store_source_type
), joined AS (
  SELECT
    reporting_grain.date_day,
    reporting_grain.app_id,
    app.app_name,
    reporting_grain.source_type,
    COALESCE(app_store_source_type.impressions, 0) AS impressions,
    COALESCE(app_store_source_type.page_views, 0) AS page_views,
    COALESCE(downloads_source_type.first_time_downloads, 0) AS first_time_downloads,
    COALESCE(downloads_source_type.redownloads, 0) AS redownloads,
    COALESCE(downloads_source_type.total_downloads, 0) AS total_downloads,
    COALESCE(usage_source_type.active_devices, 0) AS active_devices,
    COALESCE(usage_source_type.deletions, 0) AS deletions,
    COALESCE(usage_source_type.installations, 0) AS installations,
    COALESCE(usage_source_type.sessions, 0) AS sessions
  FROM reporting_grain
  LEFT JOIN app
    ON reporting_grain.app_id = app.app_id
  LEFT JOIN app_store_source_type
    ON reporting_grain.date_day = app_store_source_type.date_day
    AND reporting_grain.app_id = app_store_source_type.app_id
    AND reporting_grain.source_type = app_store_source_type.source_type
  LEFT JOIN downloads_source_type
    ON reporting_grain.date_day = downloads_source_type.date_day
    AND reporting_grain.app_id = downloads_source_type.app_id
    AND reporting_grain.source_type = downloads_source_type.source_type
  LEFT JOIN usage_source_type
    ON reporting_grain.date_day = usage_source_type.date_day
    AND reporting_grain.app_id = usage_source_type.app_id
    AND reporting_grain.source_type = usage_source_type.source_type
)
SELECT
  *
FROM joined
%3 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report date_day app_id app_name source_type impressions page_views first_time_downloads redownloads total_downloads active_devices deletions installations sessions 8. model.apple_store.int_apple_store__app_store_source_type 8. model.apple_store.int_apple_store__app_store_source_type 13. model.apple_store.int_apple_store__downloads_source_type 13. model.apple_store.int_apple_store__downloads_source_type 16. model.apple_store.int_apple_store__usage_source_type 16. model.apple_store.int_apple_store__usage_source_type 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f1 17. model.apple_store_source.stg_apple_store__app:f1->5. model.apple_store.apple_store__source_type_report:f2
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
app_name text Application Name.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
impressions bigint The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views bigint The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
first_time_downloads bigint The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads bigint The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads bigint Total Downloads is the sum of Redownloads and First Time Downloads.
active_devices bigint The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
deletions bigint A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations bigint An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions bigint Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
5. model.apple_store.apple_store__source_type_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
5. model.apple_store.apple_store__source_type_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
6. model.apple_store.apple_store__territory_report

This SQL query integrates data from multiple tables related to an Apple Store application. It combines information about apps, territories, downloads, usage, and country codes to create a comprehensive report. The query joins these tables based on common fields like date, app ID, source type, and territory. It also performs some data cleaning by coalescing values and standardizing country codes. The result is a detailed view of app performance across different territories, including metrics such as impressions, downloads, active devices, and sessions.

IntegrationCleaning
SQL Query
WITH app AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app
), app_store_territory AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_territory
), country_codes AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.apple_store_country_codes
), downloads_territory AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_territory
), usage_territory AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_territory
), reporting_grain AS (
  SELECT DISTINCT
    date_day,
    app_id,
    source_type,
    territory
  FROM app_store_territory
), joined AS (
  SELECT
    reporting_grain.date_day,
    reporting_grain.app_id,
    app.app_name,
    reporting_grain.source_type,
    reporting_grain.territory AS territory_long,
    COALESCE(
      official_country_codes.country_code_alpha_2,
      alternative_country_codes.country_code_alpha_2
    ) AS territory_short,
    COALESCE(official_country_codes.region, alternative_country_codes.region) AS region,
    COALESCE(official_country_codes.sub_region, alternative_country_codes.sub_region) AS sub_region,
    COALESCE(app_store_territory.impressions, 0) AS impressions,
    COALESCE(app_store_territory.impressions_unique_device, 0) AS impressions_unique_device,
    COALESCE(app_store_territory.page_views, 0) AS page_views,
    COALESCE(app_store_territory.page_views_unique_device, 0) AS page_views_unique_device,
    COALESCE(downloads_territory.first_time_downloads, 0) AS first_time_downloads,
    COALESCE(downloads_territory.redownloads, 0) AS redownloads,
    COALESCE(downloads_territory.total_downloads, 0) AS total_downloads,
    COALESCE(usage_territory.active_devices, 0) AS active_devices,
    COALESCE(usage_territory.active_devices_last_30_days, 0) AS active_devices_last_30_days,
    COALESCE(usage_territory.deletions, 0) AS deletions,
    COALESCE(usage_territory.installations, 0) AS installations,
    COALESCE(usage_territory.sessions, 0) AS sessions
  FROM reporting_grain
  LEFT JOIN app
    ON reporting_grain.app_id = app.app_id
  LEFT JOIN app_store_territory
    ON reporting_grain.date_day = app_store_territory.date_day
    AND reporting_grain.app_id = app_store_territory.app_id
    AND reporting_grain.source_type = app_store_territory.source_type
    AND reporting_grain.territory = app_store_territory.territory
  LEFT JOIN downloads_territory
    ON reporting_grain.date_day = downloads_territory.date_day
    AND reporting_grain.app_id = downloads_territory.app_id
    AND reporting_grain.source_type = downloads_territory.source_type
    AND reporting_grain.territory = downloads_territory.territory
  LEFT JOIN usage_territory
    ON reporting_grain.date_day = usage_territory.date_day
    AND reporting_grain.app_id = usage_territory.app_id
    AND reporting_grain.source_type = usage_territory.source_type
    AND reporting_grain.territory = usage_territory.territory
  LEFT JOIN country_codes AS official_country_codes
    ON reporting_grain.territory = official_country_codes.country_name
  LEFT JOIN country_codes AS alternative_country_codes
    ON reporting_grain.territory = alternative_country_codes.alternative_country_name
)
SELECT
  *
FROM joined
%3 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day app_id app_name source_type territory_long territory_short region sub_region impressions impressions_unique_device page_views page_views_unique_device first_time_downloads redownloads total_downloads active_devices active_devices_last_30_days deletions installations sessions 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f1 17. model.apple_store_source.stg_apple_store__app:f1->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory date_day app_id source_type territory impressions impressions_unique_device page_views page_views_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f1->6. model.apple_store.apple_store__territory_report:f1 22. model.apple_store_source.stg_apple_store__app_store_territory:f2->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f3->6. model.apple_store.apple_store__territory_report:f4 22. model.apple_store_source.stg_apple_store__app_store_territory:f3->6. model.apple_store.apple_store__territory_report:f5 22. model.apple_store_source.stg_apple_store__app_store_territory:f3->6. model.apple_store.apple_store__territory_report:f6 22. model.apple_store_source.stg_apple_store__app_store_territory:f3->6. model.apple_store.apple_store__territory_report:f7 22. model.apple_store_source.stg_apple_store__app_store_territory:f4->6. model.apple_store.apple_store__territory_report:f8 22. model.apple_store_source.stg_apple_store__app_store_territory:f5->6. model.apple_store.apple_store__territory_report:f9 22. model.apple_store_source.stg_apple_store__app_store_territory:f6->6. model.apple_store.apple_store__territory_report:f10 22. model.apple_store_source.stg_apple_store__app_store_territory:f7->6. model.apple_store.apple_store__territory_report:f11 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory date_day app_id source_type territory first_time_downloads redownloads total_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 33. model.apple_store_source.stg_apple_store__downloads_territory:f1->6. model.apple_store.apple_store__territory_report:f1 33. model.apple_store_source.stg_apple_store__downloads_territory:f2->6. model.apple_store.apple_store__territory_report:f3 33. model.apple_store_source.stg_apple_store__downloads_territory:f3->6. model.apple_store.apple_store__territory_report:f4 33. model.apple_store_source.stg_apple_store__downloads_territory:f3->6. model.apple_store.apple_store__territory_report:f5 33. model.apple_store_source.stg_apple_store__downloads_territory:f4->6. model.apple_store.apple_store__territory_report:f12 33. model.apple_store_source.stg_apple_store__downloads_territory:f5->6. model.apple_store.apple_store__territory_report:f13 33. model.apple_store_source.stg_apple_store__downloads_territory:f6->6. model.apple_store.apple_store__territory_report:f14 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory date_day app_id source_type territory active_devices active_devices_last_30_days deletions installations sessions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 43. model.apple_store_source.stg_apple_store__usage_territory:f1->6. model.apple_store.apple_store__territory_report:f1 43. model.apple_store_source.stg_apple_store__usage_territory:f2->6. model.apple_store.apple_store__territory_report:f3 43. model.apple_store_source.stg_apple_store__usage_territory:f3->6. model.apple_store.apple_store__territory_report:f4 43. model.apple_store_source.stg_apple_store__usage_territory:f4->6. model.apple_store.apple_store__territory_report:f15 43. model.apple_store_source.stg_apple_store__usage_territory:f5->6. model.apple_store.apple_store__territory_report:f16 43. model.apple_store_source.stg_apple_store__usage_territory:f6->6. model.apple_store.apple_store__territory_report:f17 43. model.apple_store_source.stg_apple_store__usage_territory:f7->6. model.apple_store.apple_store__territory_report:f18 43. model.apple_store_source.stg_apple_store__usage_territory:f8->6. model.apple_store.apple_store__territory_report:f19 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes country_name alternative_country_name country_code_alpha_2 region sub_region 45. seed.apple_store_source.apple_store_country_codes:f0->6. model.apple_store.apple_store__territory_report:f4 45. seed.apple_store_source.apple_store_country_codes:f1->6. model.apple_store.apple_store__territory_report:f4 45. seed.apple_store_source.apple_store_country_codes:f2->6. model.apple_store.apple_store__territory_report:f5 45. seed.apple_store_source.apple_store_country_codes:f3->6. model.apple_store.apple_store__territory_report:f6 45. seed.apple_store_source.apple_store_country_codes:f4->6. model.apple_store.apple_store__territory_report:f7
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
app_name text Application Name.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
territory_long text Either the alternative country name, or the country name if the alternative doesn't exist.
territory_short text The country associated with the subscription event metrics and subscription summary metric(s). This country code maps to ISO-3166 Alpha-2.
region character varying(255) The UN Statistics region name assignment. ([Original Source](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/blob/master/all/all.csv))
sub_region character varying(255) The UN Statistics sub-region name. ([Original Source](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/blob/master/all/all.csv))
impressions integer The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
impressions_unique_device integer The number of unique devices that have viewed your app for more than one second on on the Today, Games, Apps, Featured, Explore, Top Charts, Search tabs of the App Store and App Product Page views. This metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
page_views integer The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views_unique_device integer The number of unique devices that have viewed your App Store product page; this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
first_time_downloads integer The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads integer The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads integer Total Downloads is the sum of Redownloads and First Time Downloads.
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory date_day 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory date_day 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory date_day 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp date 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp date 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp date 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Mapped to the output column 'date_day' after casting to DATE
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Cast to DATE type and renamed to date_day
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Mapped after casting to DATE type
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[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 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory app_id 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory app_id 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory app_id 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp app_id 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp app_id 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp app_id 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly mapped to the output column 'app_id'
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Direct The app_id is directly copied to the output without transformation
    • Integration The app_id is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • app_id: Directly copied to the output
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • app_id: directly copied
Column Lineage
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f0 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
6. model.apple_store.apple_store__territory_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct The app_name is directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory source_type 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory source_type 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory source_type 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp source_type 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp source_type 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp source_type 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly mapped to the output column 'source_type'
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • source_type: Directly copied to the output
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[source_type]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • source_type: directly copied
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory territory 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report region sub_region territory_long territory_short 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f1 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory territory 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f2 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory territory 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f2 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes alternative_country_name country_name 45. seed.apple_store_source.apple_store_country_codes:f1->6. model.apple_store.apple_store__territory_report:f2 45. seed.apple_store_source.apple_store_country_codes:f0->6. model.apple_store.apple_store__territory_report:f2 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp territory 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp territory 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp territory 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • territory: Directly mapped to the output column 'territory'
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly copied to the output
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[territory]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Cleaning Used to determine the territory_short and region through joins with country_codes table
    • Output Columns:
      • territory_long: Directly copied to the output
      • territory_short: Indirectly mapped through joins and COALESCE
      • region: Indirectly mapped through joins and COALESCE
      • sub_region: Indirectly mapped through joins and COALESCE
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[territory]
    • Integration Used as a key to join with other tables
    • Cleaning Used to determine territory_long and territory_short through joins with country_codes table
    • Output Columns:
      • territory_long: Indirectly mapped through joins and coalesce operations
      • territory_short: Indirectly mapped through joins and coalesce operations
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[territory]
    • Integration used as a key to join with other tables
    • Cleaning used to match with country codes for standardization
    • Output Columns:
      • territory_long: indirectly mapped after cleaning and joining
  • Input Column: 45. seed.apple_store_source.apple_store_country_codes[country_name]
    • Integration Used to join with the reporting_grain table on the territory field
    • Output Columns:
      • territory_long: Directly mapped when it matches the territory field
  • Input Column: 45. seed.apple_store_source.apple_store_country_codes[alternative_country_name]
    • Integration Used as an alternative join condition when country_name doesn't match
    • Output Columns:
      • territory_long: Directly mapped when it matches the territory field and country_name doesn't
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory territory 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report region sub_region territory_long territory_short 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f1 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory territory 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f2 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f3 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes country_code_alpha_2 45. seed.apple_store_source.apple_store_country_codes:f0->6. model.apple_store.apple_store__territory_report:f3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp territory 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp territory 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • territory: Directly mapped to the output column 'territory'
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[territory]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Cleaning Used to determine the territory_short and region through joins with country_codes table
    • Output Columns:
      • territory_long: Directly copied to the output
      • territory_short: Indirectly mapped through joins and COALESCE
      • region: Indirectly mapped through joins and COALESCE
      • sub_region: Indirectly mapped through joins and COALESCE
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[territory]
    • Integration Used as a key to join with other tables
    • Cleaning Used to determine territory_long and territory_short through joins with country_codes table
    • Output Columns:
      • territory_long: Indirectly mapped through joins and coalesce operations
      • territory_short: Indirectly mapped through joins and coalesce operations
  • Input Column: 45. seed.apple_store_source.apple_store_country_codes[country_code_alpha_2]
    • Cleaning Used in a COALESCE function to provide a standardized short territory code
    • Output Columns:
      • territory_short: Mapped through COALESCE, prioritizing the official country code
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory territory 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report region sub_region territory_long territory_short 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f1 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes region 45. seed.apple_store_source.apple_store_country_codes:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp territory 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • territory: Directly mapped to the output column 'territory'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[territory]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Cleaning Used to determine the territory_short and region through joins with country_codes table
    • Output Columns:
      • territory_long: Directly copied to the output
      • territory_short: Indirectly mapped through joins and COALESCE
      • region: Indirectly mapped through joins and COALESCE
      • sub_region: Indirectly mapped through joins and COALESCE
  • Input Column: 45. seed.apple_store_source.apple_store_country_codes[region]
    • Cleaning Used in a COALESCE function to provide the region information
    • Output Columns:
      • region: Mapped through COALESCE, using either official or alternative country data
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory territory 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report region sub_region territory_long territory_short 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f1 45. seed.apple_store_source.apple_store_country_codes 45. seed.apple_store_source.apple_store_country_codes sub_region 45. seed.apple_store_source.apple_store_country_codes:f0->6. model.apple_store.apple_store__territory_report:f1 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp territory 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • territory: Directly mapped to the output column 'territory'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[territory]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Cleaning Used to determine the territory_short and region through joins with country_codes table
    • Output Columns:
      • territory_long: Directly copied to the output
      • territory_short: Indirectly mapped through joins and COALESCE
      • region: Indirectly mapped through joins and COALESCE
      • sub_region: Indirectly mapped through joins and COALESCE
  • Input Column: 45. seed.apple_store_source.apple_store_country_codes[sub_region]
    • Cleaning Used in a COALESCE function to provide the sub-region information
    • Output Columns:
      • sub_region: Mapped through COALESCE, using either official or alternative country data
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory impressions 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report impressions 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp impressions 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly mapped to the output column 'impressions'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[impressions]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • impressions: Copied to the output with COALESCE(app_store_territory.impressions, 0)
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory impressions_unique_device 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report impressions_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp impressions_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly mapped to the output column 'impressions_unique_device'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[impressions_unique_device]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • impressions_unique_device: Copied to the output with COALESCE(app_store_territory.impressions_unique_device, 0)
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory page_views 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report page_views 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp page_views 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly mapped to the output column 'page_views'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[page_views]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • page_views: Copied to the output with COALESCE(app_store_territory.page_views, 0)
Column Lineage
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory page_views_unique_device 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report page_views_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp page_views_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly mapped to the output column 'page_views_unique_device'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[page_views_unique_device]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • page_views_unique_device: Copied to the output with COALESCE(app_store_territory.page_views_unique_device, 0)
Column Lineage
%3 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory first_time_downloads 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report first_time_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp first_time_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_time_downloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[first_time_downloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • first_time_downloads: Mapped with COALESCE(downloads_territory.first_time_downloads, 0)
Column Lineage
%3 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory redownloads 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report redownloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp redownloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • redownloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[redownloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • redownloads: Mapped with COALESCE(downloads_territory.redownloads, 0)
Column Lineage
%3 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory total_downloads 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report total_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp total_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • total_downloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[total_downloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • total_downloads: Mapped with COALESCE(downloads_territory.total_downloads, 0)
Column Lineage
%3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory active_devices 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report active_devices 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp active_devices 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[active_devices]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • active_devices: copied with COALESCE(usage_territory.active_devices, 0)
Column Lineage
%3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory active_devices_last_30_days 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report active_devices_last_30_days 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp active_devices_last_30_days 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[active_devices_last_30_days]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • active_devices_last_30_days: copied with COALESCE(usage_territory.active_devices_last_30_days, 0)
Column Lineage
%3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory deletions 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report deletions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp deletions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • deletions: The column is directly mapped to the 'deletions' output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[deletions]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • deletions: copied with COALESCE(usage_territory.deletions, 0)
Column Lineage
%3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory installations 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report installations 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp installations 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • installations: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[installations]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • installations: copied with COALESCE(usage_territory.installations, 0)
Column Lineage
%3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory sessions 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report sessions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp sessions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[sessions]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • sessions: copied with COALESCE(usage_territory.sessions, 0)
7. model.apple_store.int_apple_store__app_store_overview

This SQL query aggregates data from the 'stg_apple_store__app_store_device' table in the Apple Store database. It calculates the sum of impressions and page views for each unique combination of date and app ID. The query first selects all columns from the source table, then groups the data by date and app ID, summing the impressions and page views for each group.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_device
), aggregated AS (
  SELECT
    date_day,
    app_id,
    SUM(impressions) AS impressions,
    SUM(page_views) AS page_views
  FROM base
  GROUP BY
    1,
    2
)
SELECT
  *
FROM aggregated
%3 7. model.apple_store.int_apple_store__app_store_overview 7. model.apple_store.int_apple_store__app_store_overview 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device
Name Type Comment
8. model.apple_store.int_apple_store__app_store_source_type

This SQL query aggregates data from the 'stg_apple_store__app_store_device' table. It groups the data by date, app ID, and source type, and calculates the sum of impressions and page views for each group. The result is a summarized view of app performance metrics across different dimensions.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_device
), aggregated AS (
  SELECT
    date_day,
    app_id,
    source_type,
    SUM(impressions) AS impressions,
    SUM(page_views) AS page_views
  FROM base
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM aggregated
%3 8. model.apple_store.int_apple_store__app_store_source_type 8. model.apple_store.int_apple_store__app_store_source_type 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device
Name Type Comment
9. model.apple_store.int_apple_store__crashes_app_version

This SQL query aggregates crash data from the apple_store_source.stg_apple_store__crashes_app_version table. It groups the data by date, app ID, and app version, summing up the total crashes for each combination. The query also includes a NULL source_type column in the output.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version
), aggregated AS (
  SELECT
    date_day,
    app_id,
    app_version,
    CAST(NULL AS TEXT) AS source_type,
    SUM(crashes) AS crashes
  FROM base
  GROUP BY
    1,
    2,
    3,
    4
)
SELECT
  *
FROM aggregated
%3 9. model.apple_store.int_apple_store__crashes_app_version 9. model.apple_store.int_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version
Name Type Comment
10. model.apple_store.int_apple_store__crashes_device

This SQL query aggregates crash data from the Apple Store source table. It groups the data by date, app ID, and device, summing up the number of crashes. The query also includes a null column for source_type. The result is a simplified view of crash data across different dimensions.

AggregationCleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version
), aggregated AS (
  SELECT
    date_day,
    app_id,
    device,
    CAST(NULL AS TEXT) AS source_type,
    SUM(crashes) AS crashes
  FROM base
  GROUP BY
    1,
    2,
    3,
    4
)
SELECT
  *
FROM aggregated
%3 10. model.apple_store.int_apple_store__crashes_device 10. model.apple_store.int_apple_store__crashes_device 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version
Name Type Comment
11. model.apple_store.int_apple_store__crashes_overview

This query aggregates crash data from the 'stg_apple_store__crashes_app_version' table. It groups the data by date and app ID, summing the number of crashes for each combination. The result provides an overview of crashes for each app on each day.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version
), aggregated AS (
  SELECT
    date_day,
    app_id,
    SUM(crashes) AS crashes
  FROM base
  GROUP BY
    1,
    2
)
SELECT
  *
FROM aggregated
%3 11. model.apple_store.int_apple_store__crashes_overview 11. model.apple_store.int_apple_store__crashes_overview 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version
Name Type Comment
12. model.apple_store.int_apple_store__downloads_overview

This query aggregates download data for Apple Store apps. It sums up first-time downloads, redownloads, and total downloads for each app on each day. The query first selects all columns from a staging table, then groups the data by date and app ID, calculating the sum of various download types.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_device
), aggregated AS (
  SELECT
    date_day,
    app_id,
    SUM(first_time_downloads) AS first_time_downloads,
    SUM(redownloads) AS redownloads,
    SUM(total_downloads) AS total_downloads
  FROM base
  GROUP BY
    1,
    2
)
SELECT
  *
FROM aggregated
%3 12. model.apple_store.int_apple_store__downloads_overview 12. model.apple_store.int_apple_store__downloads_overview 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device
Name Type Comment
13. model.apple_store.int_apple_store__downloads_source_type

This SQL query aggregates download data for Apple Store apps. It starts by selecting all columns from a staging table, then groups the data by date, app ID, and source type. It calculates the sum of first-time downloads, redownloads, and total downloads for each group. The result is a summarized view of download statistics for each app, broken down by date and source type.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_device
), aggregated AS (
  SELECT
    date_day,
    app_id,
    source_type,
    SUM(first_time_downloads) AS first_time_downloads,
    SUM(redownloads) AS redownloads,
    SUM(total_downloads) AS total_downloads
  FROM base
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM aggregated
%3 13. model.apple_store.int_apple_store__downloads_source_type 13. model.apple_store.int_apple_store__downloads_source_type 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device
Name Type Comment
14. model.apple_store.int_apple_store__platform_version

This SQL query retrieves crash data from a staging table, aggregates the number of crashes by date, app ID, and platform version, and adds a null source_type column. It performs a simple aggregation without any complex filtering, cleaning, or integration operations.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_platform_version
), aggregated AS (
  SELECT
    date_day,
    app_id,
    platform_version,
    CAST(NULL AS TEXT) AS source_type,
    SUM(crashes) AS crashes
  FROM base
  GROUP BY
    1,
    2,
    3,
    4
)
SELECT
  *
FROM aggregated
%3 14. model.apple_store.int_apple_store__platform_version 14. model.apple_store.int_apple_store__platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version
Name Type Comment
15. model.apple_store.int_apple_store__usage_overview

This SQL query aggregates data from the 'stg_apple_store__usage_device' table, summing up active devices, deletions, installations, and sessions for each unique combination of date and app ID. It provides a daily usage overview for each app in the Apple Store.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_device
), aggregated AS (
  SELECT
    date_day,
    app_id,
    SUM(active_devices) AS active_devices,
    SUM(deletions) AS deletions,
    SUM(installations) AS installations,
    SUM(sessions) AS sessions
  FROM base
  GROUP BY
    1,
    2
)
SELECT
  *
FROM aggregated
%3 15. model.apple_store.int_apple_store__usage_overview 15. model.apple_store.int_apple_store__usage_overview 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device
Name Type Comment
16. model.apple_store.int_apple_store__usage_source_type

This SQL query retrieves data from a staging table (stg_apple_store__usage_device) and aggregates it by date, app ID, and source type. It calculates the sum of active devices, deletions, installations, and sessions for each unique combination of these grouping fields.

Aggregation
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_device
), aggregated AS (
  SELECT
    date_day,
    app_id,
    source_type,
    SUM(active_devices) AS active_devices,
    SUM(deletions) AS deletions,
    SUM(installations) AS installations,
    SUM(sessions) AS sessions
  FROM base
  GROUP BY
    1,
    2,
    3
)
SELECT
  *
FROM aggregated
%3 16. model.apple_store.int_apple_store__usage_source_type 16. model.apple_store.int_apple_store__usage_source_type 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device
Name Type Comment
17. model.apple_store_source.stg_apple_store__app

This SQL query performs a simple transformation on the 'stg_apple_store__app_tmp' table. It selects three specific columns (id, name, and is_enabled) from the source table, renames 'id' to 'app_id' and 'name' to 'app_name', and includes these along with 'is_enabled' in the final output. The query also defines a number of additional fields with NULL or default values, but these are not used in the final selection.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_opt_in_rate,
    CAST(NULL AS TEXT) AS asset_token,
    CAST(NULL AS TEXT) AS icon_url,
    CAST(NULL AS INT) AS id,
    CAST(NULL AS BOOLEAN) AS ios,
    CAST(NULL AS BOOLEAN) AS is_bundle,
    CAST(NULL AS BOOLEAN) AS is_enabled,
    CAST(NULL AS TEXT) AS name,
    CAST(NULL AS TEXT) AS pre_order_info,
    CAST(NULL AS BOOLEAN) AS tvos
  FROM base
), final AS (
  SELECT
    id AS app_id,
    name AS app_name,
    is_enabled
  FROM fields
)
SELECT
  *
FROM final
%3 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id app_name is_enabled 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id is_enabled name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 24. model.apple_store_source.stg_apple_store__app_tmp:f1->17. model.apple_store_source.stg_apple_store__app:f2 24. model.apple_store_source.stg_apple_store__app_tmp:f2->17. model.apple_store_source.stg_apple_store__app:f1
Name Type Comment
app_id integer Application ID.
app_name text Application Name.
is_enabled boolean Boolean indicator for whether application is enabled or not.
Column Lineage
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f0 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f0 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
2. model.apple_store.apple_store__device_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output without transformation
    • Output Columns:
      • app_id: directly copied
3. model.apple_store.apple_store__overview_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • app_id: directly copied
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied
5. model.apple_store.apple_store__source_type_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
6. model.apple_store.apple_store__territory_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Direct The app_id is directly copied to the output without transformation
    • Integration The app_id is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
Column Lineage
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f0 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f0 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
2. model.apple_store.apple_store__device_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct directly copied to the output without transformation
    • Output Columns:
      • app_name: directly copied
3. model.apple_store.apple_store__overview_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct directly copied to the output
    • Output Columns:
      • app_name: directly copied
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied
5. model.apple_store.apple_store__source_type_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
6. model.apple_store.apple_store__territory_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct The app_name is directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
Column Lineage
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp is_enabled 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app is_enabled 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[is_enabled]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN in the 'fields' CTE
    • Output Columns:
      • is_enabled: It is directly mapped to is_enabled in the final output
18. model.apple_store_source.stg_apple_store__app_store_device

This SQL query performs a series of transformations on data from the 'stg_apple_store__app_store_device_tmp' table. It first creates a CTE with all columns from the source table, then defines a structure for the fields with specific data types. Finally, it selects and casts certain columns, including converting the 'date' column to a DATE type and renaming it to 'date_day'. The query primarily focuses on data type casting and column selection/renaming.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_device_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS INT) AS impressions,
    CAST(NULL AS INT) AS impressions_unique_device,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS page_views,
    CAST(NULL AS INT) AS page_views_unique_device,
    CAST(NULL AS TEXT) AS source_type
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    device,
    impressions,
    impressions_unique_device,
    page_views,
    page_views_unique_device
  FROM fields
)
SELECT
  *
FROM final
%3 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device date_day app_id source_type device impressions impressions_unique_device page_views page_views_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp app_id date device source_type impressions impressions_unique_device page_views page_views_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f1 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f1->18. model.apple_store_source.stg_apple_store__app_store_device:f0 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f2->18. model.apple_store_source.stg_apple_store__app_store_device:f3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f3->18. model.apple_store_source.stg_apple_store__app_store_device:f2 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f4->18. model.apple_store_source.stg_apple_store__app_store_device:f4 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f5->18. model.apple_store_source.stg_apple_store__app_store_device:f5 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f6->18. model.apple_store_source.stg_apple_store__app_store_device:f6 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f7->18. model.apple_store_source.stg_apple_store__app_store_device:f7
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
device text Device type associated with the respective metric(s).
impressions integer The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
impressions_unique_device integer The number of unique devices that have viewed your app for more than one second on on the Today, Games, Apps, Featured, Explore, Top Charts, Search tabs of the App Store and App Product Page views. This metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
page_views integer The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views_unique_device integer The number of unique devices that have viewed your App Store product page; this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp date 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device date_day 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE, then cast as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed and renamed to 'date_day' in the output
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp app_id 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device app_id 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly mapped to the output 'app_id' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp source_type 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device source_type 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly mapped to the output 'source_type' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • device: Directly mapped to the output 'device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[device]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • device: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp impressions 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device impressions 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report impressions 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly mapped to the output 'impressions' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[impressions]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • impressions: Mapped to the output column with COALESCE applied
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp impressions_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device impressions_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report impressions_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly mapped to the output 'impressions_unique_device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[impressions_unique_device]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • impressions_unique_device: Mapped to the output column with COALESCE applied
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp page_views 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device page_views 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report page_views 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly mapped to the output 'page_views' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[page_views]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • page_views: Mapped to the output column with COALESCE applied
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp page_views_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device page_views_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report page_views_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly mapped to the output 'page_views_unique_device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[page_views_unique_device]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • page_views_unique_device: Mapped to the output column with COALESCE applied
19. model.apple_store_source.stg_apple_store__app_store_device_tmp

This SQL query selects all columns from the table 'TEST.itunes_connect.app_store_source_type_device_report' without any modifications or filtering. It appears to be a simple data extraction query, likely used as a staging step to copy all data from the source table into a new model or temporary table.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.app_store_source_type_device_report
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp app_id date device source_type meets_threshold impressions _fivetran_synced impressions_unique_device page_views page_views_unique_device 48. source.apple_store_source.apple_store.app_store_source_type_device_report 48. source.apple_store_source.apple_store.app_store_source_type_device_report
Name Type Comment
app_id integer None
date timestamp without time zone None
device text None
source_type text None
meets_threshold boolean None
impressions integer None
_fivetran_synced timestamp without time zone None
impressions_unique_device integer None
page_views integer None
page_views_unique_device integer None
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp app_id 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device app_id 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly mapped to the output 'app_id' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp date 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device date_day 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE, then cast as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed and renamed to 'date_day' in the output
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • device: Directly mapped to the output 'device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[device]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • device: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp source_type 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device source_type 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly mapped to the output 'source_type' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly mapped to the output column
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp impressions 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device impressions 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report impressions 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly mapped to the output 'impressions' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[impressions]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • impressions: Mapped to the output column with COALESCE applied
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp impressions_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device impressions_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report impressions_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly mapped to the output 'impressions_unique_device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[impressions_unique_device]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • impressions_unique_device: Mapped to the output column with COALESCE applied
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp page_views 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device page_views 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report page_views 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly mapped to the output 'page_views' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[page_views]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • page_views: Mapped to the output column with COALESCE applied
Column Lineage
%3 19. model.apple_store_source.stg_apple_store__app_store_device_tmp 19. model.apple_store_source.stg_apple_store__app_store_device_tmp page_views_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device 18. model.apple_store_source.stg_apple_store__app_store_device page_views_unique_device 19. model.apple_store_source.stg_apple_store__app_store_device_tmp:f0->18. model.apple_store_source.stg_apple_store__app_store_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report page_views_unique_device 18. model.apple_store_source.stg_apple_store__app_store_device:f0->2. model.apple_store.apple_store__device_report:f0
18. model.apple_store_source.stg_apple_store__app_store_device
  • Input Column: 19. model.apple_store_source.stg_apple_store__app_store_device_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly mapped to the output 'page_views_unique_device' column
2. model.apple_store.apple_store__device_report
  • Input Column: 18. model.apple_store_source.stg_apple_store__app_store_device[page_views_unique_device]
    • Direct The column is directly copied
    • Cleaning The column is coalesced with 0 if null
    • Output Columns:
      • page_views_unique_device: Mapped to the output column with COALESCE applied
20. model.apple_store_source.stg_apple_store__app_store_platform_version

This SQL query performs data type casting and column selection on the 'stg_apple_store__app_store_platform_version' table. It first creates a CTE with null values for all columns, then selects and renames specific columns from this CTE, casting the 'date' column to DATE type. The query focuses on preparing and structuring the data for further analysis, particularly related to app store metrics such as impressions and page views.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_platform_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS impressions,
    CAST(NULL AS INT) AS impressions_unique_device,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS page_views,
    CAST(NULL AS INT) AS page_views_unique_device,
    CAST(NULL AS TEXT) AS platform_version,
    CAST(NULL AS TEXT) AS source_type
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    platform_version,
    impressions,
    impressions_unique_device,
    page_views,
    page_views_unique_device
  FROM fields
)
SELECT
  *
FROM final
%3 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version date_day app_id source_type platform_version impressions impressions_unique_device page_views page_views_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp app_id date platform_version source_type impressions impressions_unique_device page_views page_views_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f1 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f1->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f2->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f3->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f2 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f4->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f4 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f5->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f5 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f6->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f6 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f7->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f7
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
platform_version text The platform version of the device engaging with your app.
impressions integer The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
impressions_unique_device integer The number of unique devices that have viewed your app for more than one second on on the Today, Games, Apps, Featured, Explore, Top Charts, Search tabs of the App Store and App Product Page views. This metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
page_views integer The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views_unique_device integer The number of unique devices that have viewed your App Store product page; this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp date 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version date_day 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed and renamed to date_day in the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp app_id 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version app_id 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp source_type 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version source_type 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version platform_version 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp impressions 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version impressions 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report impressions 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[impressions]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • impressions: Cleaned and mapped to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp impressions_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version impressions_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report impressions_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[impressions_unique_device]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • impressions_unique_device: Cleaned and mapped to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp page_views 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version page_views 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report page_views 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[page_views]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • page_views: Cleaned and mapped to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp page_views_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version page_views_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report page_views_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[page_views_unique_device]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • page_views_unique_device: Cleaned and mapped to the output
21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp

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

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.app_store_platform_version_source_type_report
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp app_id date platform_version source_type meets_threshold impressions _fivetran_synced impressions_unique_device page_views page_views_unique_device 47. source.apple_store_source.apple_store.app_store_platform_version_source_type_report 47. source.apple_store_source.apple_store.app_store_platform_version_source_type_report
Name Type Comment
app_id integer None
date timestamp without time zone None
platform_version text None
source_type text None
meets_threshold boolean None
impressions integer None
_fivetran_synced timestamp without time zone None
impressions_unique_device integer None
page_views integer None
page_views_unique_device integer None
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp app_id 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version app_id 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp date 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version date_day 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed and renamed to date_day in the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version platform_version 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp source_type 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version source_type 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp impressions 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version impressions 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report impressions 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[impressions]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • impressions: Cleaned and mapped to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp impressions_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version impressions_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report impressions_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[impressions_unique_device]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • impressions_unique_device: Cleaned and mapped to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp page_views 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version page_views 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report page_views 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[page_views]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • page_views: Cleaned and mapped to the output
Column Lineage
%3 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp page_views_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version 20. model.apple_store_source.stg_apple_store__app_store_platform_version page_views_unique_device 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp:f0->20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report page_views_unique_device 20. model.apple_store_source.stg_apple_store__app_store_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
20. model.apple_store_source.stg_apple_store__app_store_platform_version
  • Input Column: 21. model.apple_store_source.stg_apple_store__app_store_platform_version_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 20. model.apple_store_source.stg_apple_store__app_store_platform_version[page_views_unique_device]
    • Cleaning The column is cleaned by applying COALESCE to handle null values
    • Output Columns:
      • page_views_unique_device: Cleaned and mapped to the output
22. model.apple_store_source.stg_apple_store__app_store_territory

This SQL query performs a series of transformations on data from the 'stg_apple_store__app_store_territory_tmp' table. It first defines a base CTE that selects all columns from the source table. Then, it creates a 'fields' CTE that explicitly casts columns to specific data types, including setting some fields to NULL. Finally, in the 'final' CTE, it selects and renames certain columns, casting the 'date' column to a DATE type. The query ends by selecting all columns from the 'final' CTE.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__app_store_territory_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS impressions,
    CAST(NULL AS INT) AS impressions_unique_device,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS page_views,
    CAST(NULL AS INT) AS page_views_unique_device,
    CAST(NULL AS TEXT) AS source_type,
    CAST(NULL AS TEXT) AS territory
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    territory,
    impressions,
    impressions_unique_device,
    page_views,
    page_views_unique_device
  FROM fields
)
SELECT
  *
FROM final
%3 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory date_day app_id source_type territory impressions impressions_unique_device page_views page_views_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp app_id date source_type territory impressions impressions_unique_device page_views page_views_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f1 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f1->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f2->22. model.apple_store_source.stg_apple_store__app_store_territory:f2 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f3->22. model.apple_store_source.stg_apple_store__app_store_territory:f3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f4->22. model.apple_store_source.stg_apple_store__app_store_territory:f4 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f5->22. model.apple_store_source.stg_apple_store__app_store_territory:f5 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f6->22. model.apple_store_source.stg_apple_store__app_store_territory:f6 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f7->22. model.apple_store_source.stg_apple_store__app_store_territory:f7
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
territory text The territory (aka country) full name associated with the report's respective metric(s).
impressions integer The number of times your app was viewed in the App Store for more than one second. This includes search results, Featured, Explore, Top Charts and App Product Page views. (Source: [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
impressions_unique_device integer The number of unique devices that have viewed your app for more than one second on on the Today, Games, Apps, Featured, Explore, Top Charts, Search tabs of the App Store and App Product Page views. This metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
page_views integer The total number of times your App Store product page was clicked and viewed; when a user taps on a link from an app, website or App Clip card that brings them to your App Store product page, the immediate product page_view is attributed to the referring app, website, or App Clip. (Sources: [Apple](https://help.apple.com/app-store-connect/#/itcf19c873df), [BusinessofApps](https://www.businessofapps.com/insights/understanding-the-app-store-metrics/#:~:text=Impressions%20%E2%80%93%20%E2%80%9CThe%20number%20of%20times,was%20clicked%20on%20and%20viewed.))
page_views_unique_device integer The number of unique devices that have viewed your App Store product page; this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI.
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp date 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory date_day 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Mapped to the output column 'date_day' after casting to DATE
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp app_id 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory app_id 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly mapped to the output column 'app_id'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp source_type 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory source_type 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly mapped to the output column 'source_type'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp territory 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory territory 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report region sub_region territory_long territory_short 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f1
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • territory: Directly mapped to the output column 'territory'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[territory]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Cleaning Used to determine the territory_short and region through joins with country_codes table
    • Output Columns:
      • territory_long: Directly copied to the output
      • territory_short: Indirectly mapped through joins and COALESCE
      • region: Indirectly mapped through joins and COALESCE
      • sub_region: Indirectly mapped through joins and COALESCE
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp impressions 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory impressions 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report impressions 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly mapped to the output column 'impressions'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[impressions]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • impressions: Copied to the output with COALESCE(app_store_territory.impressions, 0)
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp impressions_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory impressions_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report impressions_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly mapped to the output column 'impressions_unique_device'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[impressions_unique_device]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • impressions_unique_device: Copied to the output with COALESCE(app_store_territory.impressions_unique_device, 0)
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp page_views 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory page_views 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report page_views 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly mapped to the output column 'page_views'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[page_views]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • page_views: Copied to the output with COALESCE(app_store_territory.page_views, 0)
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp page_views_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory page_views_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report page_views_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly mapped to the output column 'page_views_unique_device'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[page_views_unique_device]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • page_views_unique_device: Copied to the output with COALESCE(app_store_territory.page_views_unique_device, 0)
23. model.apple_store_source.stg_apple_store__app_store_territory_tmp

This SQL query selects all columns from the 'app_store_territory_source_type_report' table in the 'itunes_connect' schema of the 'TEST' database. It appears to be a simple extraction of all data from the source table without any transformations or filtering.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.app_store_territory_source_type_report
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp app_id date source_type territory meets_threshold impressions _fivetran_synced impressions_unique_device page_views page_views_unique_device 49. source.apple_store_source.apple_store.app_store_territory_source_type_report 49. source.apple_store_source.apple_store.app_store_territory_source_type_report
Name Type Comment
app_id integer None
date timestamp without time zone None
source_type text None
territory text None
meets_threshold boolean None
impressions integer None
_fivetran_synced timestamp without time zone None
impressions_unique_device integer None
page_views integer None
page_views_unique_device integer None
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp app_id 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory app_id 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: Directly mapped to the output column 'app_id'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp date 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory date_day 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[date]
    • Cleaning The column is cast as TIMESTAMP in the 'fields' CTE and then as DATE in the 'final' CTE
    • Output Columns:
      • date_day: Mapped to the output column 'date_day' after casting to DATE
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp source_type 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory source_type 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • source_type: Directly mapped to the output column 'source_type'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp territory 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory territory 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report region sub_region territory_long territory_short 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f2 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f3 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f1
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • territory: Directly mapped to the output column 'territory'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[territory]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT selection of the reporting_grain CTE
    • Cleaning Used to determine the territory_short and region through joins with country_codes table
    • Output Columns:
      • territory_long: Directly copied to the output
      • territory_short: Indirectly mapped through joins and COALESCE
      • region: Indirectly mapped through joins and COALESCE
      • sub_region: Indirectly mapped through joins and COALESCE
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp impressions 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory impressions 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report impressions 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[impressions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions: Directly mapped to the output column 'impressions'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[impressions]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • impressions: Copied to the output with COALESCE(app_store_territory.impressions, 0)
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp impressions_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory impressions_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report impressions_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[impressions_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • impressions_unique_device: Directly mapped to the output column 'impressions_unique_device'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[impressions_unique_device]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • impressions_unique_device: Copied to the output with COALESCE(app_store_territory.impressions_unique_device, 0)
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp page_views 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory page_views 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report page_views 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[page_views]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views: Directly mapped to the output column 'page_views'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[page_views]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • page_views: Copied to the output with COALESCE(app_store_territory.page_views, 0)
Column Lineage
%3 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp page_views_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory 22. model.apple_store_source.stg_apple_store__app_store_territory page_views_unique_device 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp:f0->22. model.apple_store_source.stg_apple_store__app_store_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report page_views_unique_device 22. model.apple_store_source.stg_apple_store__app_store_territory:f0->6. model.apple_store.apple_store__territory_report:f0
22. model.apple_store_source.stg_apple_store__app_store_territory
  • Input Column: 23. model.apple_store_source.stg_apple_store__app_store_territory_tmp[page_views_unique_device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • page_views_unique_device: Directly mapped to the output column 'page_views_unique_device'
6. model.apple_store.apple_store__territory_report
  • Input Column: 22. model.apple_store_source.stg_apple_store__app_store_territory[page_views_unique_device]
    • Direct The column is directly copied, but with COALESCE to handle NULL values
    • Output Columns:
      • page_views_unique_device: Copied to the output with COALESCE(app_store_territory.page_views_unique_device, 0)
24. model.apple_store_source.stg_apple_store__app_tmp

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

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.app
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id is_enabled name asset_token pre_order_info icon_url app_opt_in_rate ios tvos is_bundle _fivetran_synced 46. source.apple_store_source.apple_store.app 46. source.apple_store_source.apple_store.app
Name Type Comment
id integer None
is_enabled boolean None
name text None
asset_token text None
pre_order_info integer None
icon_url text None
app_opt_in_rate integer None
ios boolean None
tvos boolean None
is_bundle boolean None
_fivetran_synced timestamp without time zone None
Column Lineage
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp id 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_id 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f0 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f0 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • app_id: It is directly mapped to app_id in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
2. model.apple_store.apple_store__device_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output without transformation
    • Output Columns:
      • app_id: directly copied
3. model.apple_store.apple_store__overview_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • app_id: directly copied
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied
5. model.apple_store.apple_store__source_type_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Integration Used as a key to join with other tables
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
6. model.apple_store.apple_store__territory_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_id]
    • Direct The app_id is directly copied to the output without transformation
    • Integration The app_id is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output column 'app_id'
Column Lineage
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp is_enabled 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app is_enabled 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[is_enabled]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as BOOLEAN in the 'fields' CTE
    • Output Columns:
      • is_enabled: It is directly mapped to is_enabled in the final output
Column Lineage
%3 24. model.apple_store_source.stg_apple_store__app_tmp 24. model.apple_store_source.stg_apple_store__app_tmp name 17. model.apple_store_source.stg_apple_store__app 17. model.apple_store_source.stg_apple_store__app app_name 24. model.apple_store_source.stg_apple_store__app_tmp:f0->17. model.apple_store_source.stg_apple_store__app:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->1. model.apple_store.apple_store__app_version_report:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->2. model.apple_store.apple_store__device_report:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->6. model.apple_store.apple_store__territory_report:f0 5. model.apple_store.apple_store__source_type_report 5. model.apple_store.apple_store__source_type_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->5. model.apple_store.apple_store__source_type_report:f0 3. model.apple_store.apple_store__overview_report 3. model.apple_store.apple_store__overview_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->3. model.apple_store.apple_store__overview_report:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_name 17. model.apple_store_source.stg_apple_store__app:f0->4. model.apple_store.apple_store__platform_version_report:f0
17. model.apple_store_source.stg_apple_store__app
  • Input Column: 24. model.apple_store_source.stg_apple_store__app_tmp[name]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as TEXT in the 'fields' CTE
    • Output Columns:
      • app_name: It is directly mapped to app_name in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
2. model.apple_store.apple_store__device_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct directly copied to the output without transformation
    • Output Columns:
      • app_name: directly copied
3. model.apple_store.apple_store__overview_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct directly copied to the output
    • Output Columns:
      • app_name: directly copied
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied
5. model.apple_store.apple_store__source_type_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct Directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
6. model.apple_store.apple_store__territory_report
  • Input Column: 17. model.apple_store_source.stg_apple_store__app[app_name]
    • Direct The app_name is directly copied to the output without transformation
    • Output Columns:
      • app_name: Directly copied to the output column 'app_name'
25. model.apple_store_source.stg_apple_store__crashes_app_version

This SQL query performs a basic transformation on data from the 'stg_apple_store__crashes_app_version_tmp' table. It casts specific columns to defined data types, renames some columns, and selects a subset of columns for the final output. The main transformation is converting the 'date' column to a DATE type and renaming it to 'date_day'.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_app_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TEXT) AS app_version,
    CAST(NULL AS INT) AS crashes,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS BOOLEAN) AS meets_threshold
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    device,
    app_version,
    crashes
  FROM fields
)
SELECT
  *
FROM final
%3 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version date_day app_id device app_version crashes 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp app_id app_version date device crashes 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f1 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f1->25. model.apple_store_source.stg_apple_store__crashes_app_version:f3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f2->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f3->25. model.apple_store_source.stg_apple_store__crashes_app_version:f2 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f4->25. model.apple_store_source.stg_apple_store__crashes_app_version:f4
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
device text Device type associated with the respective metric(s).
app_version text The app version of the app that the user is engaging with.
crashes integer The number of recorded crashes experienced (User Opt-In only); a value of 0 indicates there were 0 crash reports or no value from the source report that day.
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp date 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version date_day 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Transformed and renamed to date_day
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp app_id 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version app_id 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp device 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version device 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[device]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version app_version 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[app_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_version: Directly copied to the output
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp crashes 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version crashes 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: Directly copied to the output
26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp

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

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.crashes_app_version_device_report
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp app_id app_version date device meets_threshold crashes _fivetran_synced 50. source.apple_store_source.apple_store.crashes_app_version_device_report 50. source.apple_store_source.apple_store.crashes_app_version_device_report
Name Type Comment
app_id integer None
app_version text None
date timestamp without time zone None
device text None
meets_threshold boolean None
crashes integer None
_fivetran_synced timestamp without time zone None
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp app_id 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version app_id 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version app_version 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[app_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_version: Directly copied to the output
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp date 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version date_day 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Transformed and renamed to date_day
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp device 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version device 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[device]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp crashes 25. model.apple_store_source.stg_apple_store__crashes_app_version 25. model.apple_store_source.stg_apple_store__crashes_app_version crashes 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp:f0->25. model.apple_store_source.stg_apple_store__crashes_app_version:f0
25. model.apple_store_source.stg_apple_store__crashes_app_version
  • Input Column: 26. model.apple_store_source.stg_apple_store__crashes_app_version_tmp[crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: Directly copied to the output
27. model.apple_store_source.stg_apple_store__crashes_platform_version

This SQL query performs a basic transformation on data from a staging table. It casts the 'date' column to a DATE type, renames it to 'date_day', and selects specific columns (date_day, app_id, device, platform_version, crashes) for the final output. The query also includes a CTE that defines data types for various fields, although these are not directly used in the final selection.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__crashes_platform_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS INT) AS crashes,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS TEXT) AS platform_version
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    device,
    platform_version,
    crashes
  FROM fields
)
SELECT
  *
FROM final
%3 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version date_day app_id device platform_version crashes 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp app_id date device platform_version crashes 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f1 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f1->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f2->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f2 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f3->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f4->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f4
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
device text Device type associated with the respective metric(s).
platform_version text The app version of the app that the user is engaging with.
crashes integer The number of recorded crashes experienced (User Opt-In only); a value of 0 indicates there were 0 crash reports or no value from the source report that day.
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp date 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version date_day 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Transformed and renamed from 'date'
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp app_id 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version app_id 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp device 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version device 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[device]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version platform_version 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp crashes 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version crashes 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: Directly copied to the output
28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp

This SQL query selects all columns from the 'crashes_platform_version_device_report' table in the 'itunes_connect' schema of the 'TEST' database. It appears to be a straightforward data extraction without any transformations or filtering.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.crashes_platform_version_device_report
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp app_id date device platform_version meets_threshold crashes _fivetran_synced 51. source.apple_store_source.apple_store.crashes_platform_version_device_report 51. source.apple_store_source.apple_store.crashes_platform_version_device_report
Name Type Comment
app_id integer None
date timestamp without time zone None
device text None
platform_version text None
meets_threshold boolean None
crashes integer None
_fivetran_synced timestamp without time zone None
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp app_id 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version app_id 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp date 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version date_day 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Transformed and renamed from 'date'
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp device 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version device 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[device]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version platform_version 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp crashes 27. model.apple_store_source.stg_apple_store__crashes_platform_version 27. model.apple_store_source.stg_apple_store__crashes_platform_version crashes 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp:f0->27. model.apple_store_source.stg_apple_store__crashes_platform_version:f0
27. model.apple_store_source.stg_apple_store__crashes_platform_version
  • Input Column: 28. model.apple_store_source.stg_apple_store__crashes_platform_version_tmp[crashes]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • crashes: Directly copied to the output
29. model.apple_store_source.stg_apple_store__downloads_device

This SQL query performs data type casting and column selection on the 'stg_apple_store__downloads_device_tmp' table. It casts the 'date' column to DATE type and selects specific columns for the final output. The query doesn't perform any filtering, deduplication, or aggregation operations.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_device_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS INT) AS first_time_downloads,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS redownloads,
    CAST(NULL AS TEXT) AS source_type,
    CAST(NULL AS INT) AS total_downloads
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    device,
    first_time_downloads,
    redownloads,
    total_downloads
  FROM fields
)
SELECT
  *
FROM final
%3 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device date_day app_id source_type device first_time_downloads redownloads total_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp app_id date device source_type first_time_downloads redownloads total_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f1 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f1->29. model.apple_store_source.stg_apple_store__downloads_device:f0 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f2->29. model.apple_store_source.stg_apple_store__downloads_device:f3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f3->29. model.apple_store_source.stg_apple_store__downloads_device:f2 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f4->29. model.apple_store_source.stg_apple_store__downloads_device:f4 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f5->29. model.apple_store_source.stg_apple_store__downloads_device:f5 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f6->29. model.apple_store_source.stg_apple_store__downloads_device:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
device text Device type associated with the respective metric(s).
first_time_downloads integer The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads integer The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads integer Total Downloads is the sum of Redownloads and First Time Downloads.
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp date 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device date_day 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[date]
    • Cleaning The column is cast to TIMESTAMP in the 'fields' CTE, then to DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed to DATE type and renamed
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp app_id 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device app_id 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • app_id: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp source_type 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device source_type 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • source_type: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp device 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device device 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • device: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[device]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp first_time_downloads 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device first_time_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report first_time_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • first_time_downloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[first_time_downloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • first_time_downloads: Copied to the output with COALESCE(downloads_device.first_time_downloads, 0)
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp redownloads 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device redownloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report redownloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • redownloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[redownloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • redownloads: Copied to the output with COALESCE(downloads_device.redownloads, 0)
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp total_downloads 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device total_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report total_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • total_downloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[total_downloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • total_downloads: Copied to the output with COALESCE(downloads_device.total_downloads, 0)
30. model.apple_store_source.stg_apple_store__downloads_device_tmp

This SQL query selects all columns from the 'downloads_source_type_device_report' table in the 'TEST.itunes_connect' schema. It appears to be a straightforward data extraction query without any filtering, transformation, or aggregation.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.downloads_source_type_device_report
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp app_id date device source_type meets_threshold first_time_downloads _fivetran_synced redownloads total_downloads 53. source.apple_store_source.apple_store.downloads_source_type_device_report 53. source.apple_store_source.apple_store.downloads_source_type_device_report
Name Type Comment
app_id integer None
date timestamp without time zone None
device text None
source_type text None
meets_threshold boolean None
first_time_downloads integer None
_fivetran_synced timestamp without time zone None
redownloads integer None
total_downloads integer None
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp app_id 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device app_id 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • app_id: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp date 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device date_day 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[date]
    • Cleaning The column is cast to TIMESTAMP in the 'fields' CTE, then to DATE in the 'final' CTE
    • Output Columns:
      • date_day: Transformed to DATE type and renamed
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp device 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device device 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • device: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[device]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp source_type 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device source_type 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type in the 'fields' CTE
    • Output Columns:
      • source_type: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp first_time_downloads 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device first_time_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report first_time_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • first_time_downloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[first_time_downloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • first_time_downloads: Copied to the output with COALESCE(downloads_device.first_time_downloads, 0)
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp redownloads 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device redownloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report redownloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • redownloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[redownloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • redownloads: Copied to the output with COALESCE(downloads_device.redownloads, 0)
Column Lineage
%3 30. model.apple_store_source.stg_apple_store__downloads_device_tmp 30. model.apple_store_source.stg_apple_store__downloads_device_tmp total_downloads 29. model.apple_store_source.stg_apple_store__downloads_device 29. model.apple_store_source.stg_apple_store__downloads_device total_downloads 30. model.apple_store_source.stg_apple_store__downloads_device_tmp:f0->29. model.apple_store_source.stg_apple_store__downloads_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report total_downloads 29. model.apple_store_source.stg_apple_store__downloads_device:f0->2. model.apple_store.apple_store__device_report:f0
29. model.apple_store_source.stg_apple_store__downloads_device
  • Input Column: 30. model.apple_store_source.stg_apple_store__downloads_device_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type in the 'fields' CTE
    • Output Columns:
      • total_downloads: Directly copied to the output
2. model.apple_store.apple_store__device_report
  • Input Column: 29. model.apple_store_source.stg_apple_store__downloads_device[total_downloads]
    • Direct The column is directly copied, but with COALESCE applied to handle NULL values
    • Output Columns:
      • total_downloads: Copied to the output with COALESCE(downloads_device.total_downloads, 0)
31. model.apple_store_source.stg_apple_store__downloads_platform_version

This SQL query performs data type casting and column selection on the 'stg_apple_store__downloads_platform_version' table. It casts the 'date' column to DATE type and selects specific columns for the final output. The query doesn't perform any filtering, deduplication, featurization, integration, or aggregation.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_platform_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS first_time_downloads,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS TEXT) AS platform_version,
    CAST(NULL AS INT) AS redownloads,
    CAST(NULL AS TEXT) AS source_type,
    CAST(NULL AS INT) AS total_downloads
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    platform_version,
    first_time_downloads,
    redownloads,
    total_downloads
  FROM fields
)
SELECT
  *
FROM final
%3 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version date_day app_id source_type platform_version first_time_downloads redownloads total_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp app_id date platform_version source_type first_time_downloads redownloads total_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f1 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f1->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f2->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f3->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f2 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f4->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f4 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f5->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f5 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f6->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
platform_version text The platform version of the device engaging with your app.
first_time_downloads integer The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads integer The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads integer Total Downloads is the sum of Redownloads and First Time Downloads.
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp date 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version date_day 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[date]
    • Cleaning The column is cleaned by casting to DATE type
    • Output Columns:
      • date_day: Casted to DATE type and renamed
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp app_id 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version app_id 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp source_type 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version source_type 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version platform_version 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp first_time_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version first_time_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report first_time_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_time_downloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[first_time_downloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • first_time_downloads: Mapped with COALESCE(downloads_platform_version.first_time_downloads, 0)
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp redownloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version redownloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report redownloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • redownloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[redownloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • redownloads: Mapped with COALESCE(downloads_platform_version.redownloads, 0)
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp total_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version total_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report total_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • total_downloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[total_downloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • total_downloads: Mapped with COALESCE(downloads_platform_version.total_downloads, 0)
32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp

This SQL query selects all columns from the 'downloads_platform_version_source_type_report' table in the 'itunes_connect' schema of the 'TEST' database. It appears to be a simple extraction of raw data without any transformations or filters.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.downloads_platform_version_source_type_report
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp app_id date platform_version source_type meets_threshold first_time_downloads _fivetran_synced redownloads total_downloads 52. source.apple_store_source.apple_store.downloads_platform_version_source_type_report 52. source.apple_store_source.apple_store.downloads_platform_version_source_type_report
Name Type Comment
app_id integer None
date timestamp without time zone None
platform_version text None
source_type text None
meets_threshold boolean None
first_time_downloads integer None
_fivetran_synced timestamp without time zone None
redownloads integer None
total_downloads integer None
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp app_id 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version app_id 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp date 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version date_day 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[date]
    • Cleaning The column is cleaned by casting to DATE type
    • Output Columns:
      • date_day: Casted to DATE type and renamed
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version platform_version 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp source_type 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version source_type 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp first_time_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version first_time_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report first_time_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_time_downloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[first_time_downloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • first_time_downloads: Mapped with COALESCE(downloads_platform_version.first_time_downloads, 0)
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp redownloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version redownloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report redownloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • redownloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[redownloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • redownloads: Mapped with COALESCE(downloads_platform_version.redownloads, 0)
Column Lineage
%3 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp total_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version 31. model.apple_store_source.stg_apple_store__downloads_platform_version total_downloads 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp:f0->31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report total_downloads 31. model.apple_store_source.stg_apple_store__downloads_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
31. model.apple_store_source.stg_apple_store__downloads_platform_version
  • Input Column: 32. model.apple_store_source.stg_apple_store__downloads_platform_version_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • total_downloads: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 31. model.apple_store_source.stg_apple_store__downloads_platform_version[total_downloads]
    • Direct The column is directly copied, but with a COALESCE function to handle NULL values
    • Output Columns:
      • total_downloads: Mapped with COALESCE(downloads_platform_version.total_downloads, 0)
33. model.apple_store_source.stg_apple_store__downloads_territory

This SQL query performs data type casting and column selection on the apple_store_source.stg_apple_store__downloads_territory_tmp table. It casts the 'date' column to DATE type and selects specific columns for the final output. The query doesn't perform any filtering, deduplication, featurization, integration, or aggregation.

Cleaning
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__downloads_territory_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS first_time_downloads,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS redownloads,
    CAST(NULL AS TEXT) AS source_type,
    CAST(NULL AS TEXT) AS territory,
    CAST(NULL AS INT) AS total_downloads
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    territory,
    first_time_downloads,
    redownloads,
    total_downloads
  FROM fields
)
SELECT
  *
FROM final
%3 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory date_day app_id source_type territory first_time_downloads redownloads total_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp app_id date source_type territory first_time_downloads redownloads total_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f1 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f1->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f2->33. model.apple_store_source.stg_apple_store__downloads_territory:f2 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f3->33. model.apple_store_source.stg_apple_store__downloads_territory:f3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f4->33. model.apple_store_source.stg_apple_store__downloads_territory:f4 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f5->33. model.apple_store_source.stg_apple_store__downloads_territory:f5 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f6->33. model.apple_store_source.stg_apple_store__downloads_territory:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
territory text The territory (aka country) full name associated with the report's respective metric(s).
first_time_downloads integer The number of first time downloads for your app; credit is attributed to the referring app, website, or App Clip of the first time download.
redownloads integer The count of redownloads where a redownload occurs when a user who previously downloaded your app adds it to their device again (User Opt-In only); credit is attributed to the source recorded when a user tapped to download/launch your app for the first time. A value of 0 indicates there were 0 redownloads or no value from the source report that day.
total_downloads integer Total Downloads is the sum of Redownloads and First Time Downloads.
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp date 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory date_day 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Cast to DATE type and renamed to date_day
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp app_id 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory app_id 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp source_type 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory source_type 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp territory 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory territory 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report territory_long territory_short 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f1
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[territory]
    • Integration Used as a key to join with other tables
    • Cleaning Used to determine territory_long and territory_short through joins with country_codes table
    • Output Columns:
      • territory_long: Indirectly mapped through joins and coalesce operations
      • territory_short: Indirectly mapped through joins and coalesce operations
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp first_time_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory first_time_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report first_time_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_time_downloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[first_time_downloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • first_time_downloads: Mapped with COALESCE(downloads_territory.first_time_downloads, 0)
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp redownloads 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory redownloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report redownloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • redownloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[redownloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • redownloads: Mapped with COALESCE(downloads_territory.redownloads, 0)
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp total_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory total_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report total_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • total_downloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[total_downloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • total_downloads: Mapped with COALESCE(downloads_territory.total_downloads, 0)
34. model.apple_store_source.stg_apple_store__downloads_territory_tmp

This SQL query selects all columns from the 'downloads_territory_source_type_report' table in the 'itunes_connect' schema of the 'TEST' database. It appears to be a straightforward data extraction without any transformations or filtering.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.downloads_territory_source_type_report
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp app_id date source_type territory meets_threshold first_time_downloads _fivetran_synced redownloads total_downloads 54. source.apple_store_source.apple_store.downloads_territory_source_type_report 54. source.apple_store_source.apple_store.downloads_territory_source_type_report
Name Type Comment
app_id integer None
date timestamp without time zone None
source_type text None
territory text None
meets_threshold boolean None
first_time_downloads integer None
_fivetran_synced timestamp without time zone None
redownloads integer None
total_downloads integer None
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp app_id 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory app_id 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp date 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory date_day 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Cast to DATE type and renamed to date_day
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp source_type 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory source_type 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp territory 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory territory 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report territory_long territory_short 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f1
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[territory]
    • Integration Used as a key to join with other tables
    • Cleaning Used to determine territory_long and territory_short through joins with country_codes table
    • Output Columns:
      • territory_long: Indirectly mapped through joins and coalesce operations
      • territory_short: Indirectly mapped through joins and coalesce operations
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp first_time_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory first_time_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report first_time_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[first_time_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • first_time_downloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[first_time_downloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • first_time_downloads: Mapped with COALESCE(downloads_territory.first_time_downloads, 0)
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp redownloads 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory redownloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report redownloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[redownloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • redownloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[redownloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • redownloads: Mapped with COALESCE(downloads_territory.redownloads, 0)
Column Lineage
%3 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp total_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory 33. model.apple_store_source.stg_apple_store__downloads_territory total_downloads 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp:f0->33. model.apple_store_source.stg_apple_store__downloads_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report total_downloads 33. model.apple_store_source.stg_apple_store__downloads_territory:f0->6. model.apple_store.apple_store__territory_report:f0
33. model.apple_store_source.stg_apple_store__downloads_territory
  • Input Column: 34. model.apple_store_source.stg_apple_store__downloads_territory_tmp[total_downloads]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • total_downloads: Directly copied to the output
6. model.apple_store.apple_store__territory_report
  • Input Column: 33. model.apple_store_source.stg_apple_store__downloads_territory[total_downloads]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • total_downloads: Mapped with COALESCE(downloads_territory.total_downloads, 0)
35. model.apple_store_source.stg_apple_store__sales_account

This SQL query performs a basic transformation on data from the 'stg_apple_store__sales_account_tmp' table. It selects all columns from the base table, then defines a set of fields with specific data types (although all values are set to NULL in this case). Finally, it renames two columns: 'id' to 'account_id' and 'name' to 'account_name'. The query doesn't perform any filtering, cleaning, deduplication, featurization, integration, or aggregation.

Other
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__sales_account_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS id,
    CAST(NULL AS TEXT) AS name
  FROM base
), final AS (
  SELECT
    id AS account_id,
    name AS account_name
  FROM fields
)
SELECT
  *
FROM final
%3 35. model.apple_store_source.stg_apple_store__sales_account 35. model.apple_store_source.stg_apple_store__sales_account account_id account_name 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp id name 36. model.apple_store_source.stg_apple_store__sales_account_tmp:f0->35. model.apple_store_source.stg_apple_store__sales_account:f0 36. model.apple_store_source.stg_apple_store__sales_account_tmp:f1->35. model.apple_store_source.stg_apple_store__sales_account:f1
Name Type Comment
account_id integer Sales Account ID associated with the app name or app ID.
account_name text Sales Account Name associated with the Sales Account ID, app name or app ID.
Column Lineage
%3 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp id 35. model.apple_store_source.stg_apple_store__sales_account 35. model.apple_store_source.stg_apple_store__sales_account account_id 36. model.apple_store_source.stg_apple_store__sales_account_tmp:f0->35. model.apple_store_source.stg_apple_store__sales_account:f0
35. model.apple_store_source.stg_apple_store__sales_account
  • Input Column: 36. model.apple_store_source.stg_apple_store__sales_account_tmp[id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • account_id: The 'id' column is directly mapped to 'account_id' in the output
Column Lineage
%3 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp name 35. model.apple_store_source.stg_apple_store__sales_account 35. model.apple_store_source.stg_apple_store__sales_account account_name 36. model.apple_store_source.stg_apple_store__sales_account_tmp:f0->35. model.apple_store_source.stg_apple_store__sales_account:f0
35. model.apple_store_source.stg_apple_store__sales_account
  • Input Column: 36. model.apple_store_source.stg_apple_store__sales_account_tmp[name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • account_name: The 'name' column is directly mapped to 'account_name' in the output
36. model.apple_store_source.stg_apple_store__sales_account_tmp

This SQL query selects all columns and rows from the 'sales_account' table in the 'itunes_connect' 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.itunes_connect.sales_account
%3 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp id name _fivetran_synced 55. source.apple_store_source.apple_store.sales_account 55. source.apple_store_source.apple_store.sales_account
Name Type Comment
id integer None
name text None
_fivetran_synced timestamp without time zone None
Column Lineage
%3 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp id 35. model.apple_store_source.stg_apple_store__sales_account 35. model.apple_store_source.stg_apple_store__sales_account account_id 36. model.apple_store_source.stg_apple_store__sales_account_tmp:f0->35. model.apple_store_source.stg_apple_store__sales_account:f0
35. model.apple_store_source.stg_apple_store__sales_account
  • Input Column: 36. model.apple_store_source.stg_apple_store__sales_account_tmp[id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • account_id: The 'id' column is directly mapped to 'account_id' in the output
Column Lineage
%3 36. model.apple_store_source.stg_apple_store__sales_account_tmp 36. model.apple_store_source.stg_apple_store__sales_account_tmp name 35. model.apple_store_source.stg_apple_store__sales_account 35. model.apple_store_source.stg_apple_store__sales_account account_name 36. model.apple_store_source.stg_apple_store__sales_account_tmp:f0->35. model.apple_store_source.stg_apple_store__sales_account:f0
35. model.apple_store_source.stg_apple_store__sales_account
  • Input Column: 36. model.apple_store_source.stg_apple_store__sales_account_tmp[name]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • account_name: The 'name' column is directly mapped to 'account_name' in the output
37. model.apple_store_source.stg_apple_store__usage_app_version

This SQL query performs data transformation and type casting on the 'stg_apple_store__usage_app_version_tmp' table. It creates a CTE structure to first select all columns from the source table, then defines and casts specific fields to appropriate data types. Finally, it selects and renames certain columns, including converting the 'date' field to a DATE type. The query primarily focuses on data cleaning and formatting.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_app_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS active_devices,
    CAST(NULL AS INT) AS active_devices_last_30_days,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TEXT) AS app_version,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS deletions,
    CAST(NULL AS INT) AS installations,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS sessions,
    CAST(NULL AS TEXT) AS source_type
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    app_version,
    active_devices,
    active_devices_last_30_days,
    deletions,
    installations,
    sessions
  FROM fields
)
SELECT
  *
FROM final
%3 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version date_day app_id source_type app_version active_devices active_devices_last_30_days deletions installations sessions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_id app_version date source_type installations sessions active_devices active_devices_last_30_days deletions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f1 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f1->37. model.apple_store_source.stg_apple_store__usage_app_version:f3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f2->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f3->37. model.apple_store_source.stg_apple_store__usage_app_version:f2 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f4->37. model.apple_store_source.stg_apple_store__usage_app_version:f7 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f5->37. model.apple_store_source.stg_apple_store__usage_app_version:f8 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f6->37. model.apple_store_source.stg_apple_store__usage_app_version:f4 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f7->37. model.apple_store_source.stg_apple_store__usage_app_version:f5 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f8->37. model.apple_store_source.stg_apple_store__usage_app_version:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
app_version text The app version of the app that the user is engaging with.
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp date 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version date_day 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report date_day 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[date]
    • Cleaning The date column is cleaned by casting it to DATE type
    • Output Columns:
      • date_day: Transformed to DATE type and renamed
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • date_day: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_id 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version app_id 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_id 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[app_id]
    • Direct The app_id column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • app_id: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp source_type 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version source_type 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report source_type 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[source_type]
    • Direct The source_type column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • source_type: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_version 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version app_version 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_version 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[app_version]
    • Direct The app_version column is directly copied without any transformation
    • Output Columns:
      • app_version: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[app_version]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • app_version: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp active_devices 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version active_devices 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report active_devices 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[active_devices]
    • Direct The active_devices column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[active_devices]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • active_devices: Mapped with COALESCE(usage_app_version_report.active_devices, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp active_devices_last_30_days 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version active_devices_last_30_days 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report active_devices_last_30_days 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[active_devices_last_30_days]
    • Direct The active_devices_last_30_days column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[active_devices_last_30_days]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • active_devices_last_30_days: Mapped with COALESCE(usage_app_version_report.active_devices_last_30_days, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp deletions 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version deletions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report deletions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cleaned by casting it to an INT data type in the 'fields' CTE
    • Output Columns:
      • deletions: It is directly mapped to the 'deletions' column in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[deletions]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • deletions: Mapped with COALESCE(usage_app_version_report.deletions, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp installations 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version installations 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report installations 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[installations]
    • Direct The installations column is directly copied without any transformation
    • Output Columns:
      • installations: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[installations]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • installations: Mapped with COALESCE(usage_app_version_report.installations, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp sessions 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version sessions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report sessions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[sessions]
    • Direct The sessions column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[sessions]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • sessions: Mapped with COALESCE(usage_app_version_report.sessions, 0)
38. model.apple_store_source.stg_apple_store__usage_app_version_tmp

This SQL query selects all columns from the 'usage_app_version_source_type_report' table in the 'itunes_connect' 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.itunes_connect.usage_app_version_source_type_report
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_id app_version date source_type meets_threshold installations _fivetran_synced sessions active_devices active_devices_last_30_days deletions 56. source.apple_store_source.apple_store.usage_app_version_source_type_report 56. source.apple_store_source.apple_store.usage_app_version_source_type_report
Name Type Comment
app_id integer None
app_version text None
date timestamp without time zone None
source_type text None
meets_threshold boolean None
installations integer None
_fivetran_synced timestamp without time zone None
sessions integer None
active_devices integer None
active_devices_last_30_days integer None
deletions integer None
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_id 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version app_id 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_id 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[app_id]
    • Direct The app_id column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • app_id: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp app_version 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version app_version 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report app_version 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[app_version]
    • Direct The app_version column is directly copied without any transformation
    • Output Columns:
      • app_version: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[app_version]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • app_version: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp date 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version date_day 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report date_day 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[date]
    • Cleaning The date column is cleaned by casting it to DATE type
    • Output Columns:
      • date_day: Transformed to DATE type and renamed
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • date_day: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp source_type 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version source_type 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report source_type 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[source_type]
    • Direct The source_type column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration Used as a key to join with other tables
    • Deduplication Used in the DISTINCT operation to remove duplicates
    • Output Columns:
      • source_type: Directly mapped to the output column
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp installations 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version installations 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report installations 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[installations]
    • Direct The installations column is directly copied without any transformation
    • Output Columns:
      • installations: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[installations]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • installations: Mapped with COALESCE(usage_app_version_report.installations, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp sessions 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version sessions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report sessions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[sessions]
    • Direct The sessions column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[sessions]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • sessions: Mapped with COALESCE(usage_app_version_report.sessions, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp active_devices 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version active_devices 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report active_devices 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[active_devices]
    • Direct The active_devices column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[active_devices]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • active_devices: Mapped with COALESCE(usage_app_version_report.active_devices, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp active_devices_last_30_days 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version active_devices_last_30_days 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report active_devices_last_30_days 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[active_devices_last_30_days]
    • Direct The active_devices_last_30_days column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly copied
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[active_devices_last_30_days]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • active_devices_last_30_days: Mapped with COALESCE(usage_app_version_report.active_devices_last_30_days, 0)
Column Lineage
%3 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp deletions 37. model.apple_store_source.stg_apple_store__usage_app_version 37. model.apple_store_source.stg_apple_store__usage_app_version deletions 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp:f0->37. model.apple_store_source.stg_apple_store__usage_app_version:f0 1. model.apple_store.apple_store__app_version_report 1. model.apple_store.apple_store__app_version_report deletions 37. model.apple_store_source.stg_apple_store__usage_app_version:f0->1. model.apple_store.apple_store__app_version_report:f0
37. model.apple_store_source.stg_apple_store__usage_app_version
  • Input Column: 38. model.apple_store_source.stg_apple_store__usage_app_version_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cleaned by casting it to an INT data type in the 'fields' CTE
    • Output Columns:
      • deletions: It is directly mapped to the 'deletions' column in the final output
1. model.apple_store.apple_store__app_version_report
  • Input Column: 37. model.apple_store_source.stg_apple_store__usage_app_version[deletions]
    • Direct The column is directly copied, but wrapped in a COALESCE function
    • Output Columns:
      • deletions: Mapped with COALESCE(usage_app_version_report.deletions, 0)
39. model.apple_store_source.stg_apple_store__usage_device

This SQL query performs type casting and column selection on data from the 'stg_apple_store__usage_device_tmp' table. It casts various columns to specific data types, renames some columns, and selects a subset of columns for the final output. The query also converts the 'date' column to a DATE type and renames it to 'date_day'.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_device_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS active_devices,
    CAST(NULL AS INT) AS active_devices_last_30_days,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS deletions,
    CAST(NULL AS TEXT) AS device,
    CAST(NULL AS INT) AS installations,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS sessions,
    CAST(NULL AS TEXT) AS source_type
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    device,
    active_devices,
    active_devices_last_30_days,
    deletions,
    installations,
    sessions
  FROM fields
)
SELECT
  *
FROM final
%3 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device date_day app_id source_type device active_devices active_devices_last_30_days deletions installations sessions 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp app_id date device source_type installations sessions active_devices active_devices_last_30_days deletions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f1 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f1->39. model.apple_store_source.stg_apple_store__usage_device:f0 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f2->39. model.apple_store_source.stg_apple_store__usage_device:f3 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f3->39. model.apple_store_source.stg_apple_store__usage_device:f2 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f4->39. model.apple_store_source.stg_apple_store__usage_device:f7 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f5->39. model.apple_store_source.stg_apple_store__usage_device:f8 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f6->39. model.apple_store_source.stg_apple_store__usage_device:f4 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f7->39. model.apple_store_source.stg_apple_store__usage_device:f5 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f8->39. model.apple_store_source.stg_apple_store__usage_device:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
device text Device type associated with the respective metric(s).
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp date 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device date_day 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[date]
    • Cleaning The column is cast to TIMESTAMP and then to DATE
    • Output Columns:
      • date_day: Transformed from TIMESTAMP to DATE
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp app_id 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device app_id 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • app_id: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp source_type 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device source_type 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • source_type: Directly copied after casting to TEXT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp device 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device device 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • device: Directly copied after casting to TEXT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[device]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp active_devices 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device active_devices 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report active_devices 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • active_devices: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[active_devices]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • active_devices: Copied to the output with COALESCE(usage_device.active_devices, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp active_devices_last_30_days 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device active_devices_last_30_days 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report active_devices_last_30_days 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • active_devices_last_30_days: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[active_devices_last_30_days]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • active_devices_last_30_days: Copied to the output with COALESCE(usage_device.active_devices_last_30_days, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp deletions 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device deletions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report deletions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[deletions]
    • Direct The 'deletions' column is directly copied from the input to the output without any transformation.
    • Cleaning The column is cast to INT type in the 'fields' CTE, ensuring consistent data type.
    • Output Columns:
      • deletions: The 'deletions' column is directly mapped to the output 'deletions' column.
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[deletions]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • deletions: Copied to the output with COALESCE(usage_device.deletions, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp installations 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device installations 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report installations 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • installations: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[installations]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • installations: Copied to the output with COALESCE(usage_device.installations, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp sessions 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device sessions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report sessions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • sessions: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[sessions]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • sessions: Copied to the output with COALESCE(usage_device.sessions, 0)
40. model.apple_store_source.stg_apple_store__usage_device_tmp

This SQL query selects all columns from the 'usage_source_type_device_report' table in the 'itunes_connect' 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.itunes_connect.usage_source_type_device_report
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp app_id date device source_type meets_threshold installations _fivetran_synced sessions active_devices active_devices_last_30_days deletions 58. source.apple_store_source.apple_store.usage_source_type_device_report 58. source.apple_store_source.apple_store.usage_source_type_device_report
Name Type Comment
app_id integer None
date timestamp without time zone None
device text None
source_type text None
meets_threshold boolean None
installations integer None
_fivetran_synced timestamp without time zone None
sessions integer None
active_devices integer None
active_devices_last_30_days integer None
deletions integer None
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp app_id 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device app_id 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report app_id 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • app_id: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp date 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device date_day 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report date_day 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[date]
    • Cleaning The column is cast to TIMESTAMP and then to DATE
    • Output Columns:
      • date_day: Transformed from TIMESTAMP to DATE
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp device 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device device 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report device 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[device]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • device: Directly copied after casting to TEXT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[device]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • device: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp source_type 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device source_type 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report source_type 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to TEXT type
    • Output Columns:
      • source_type: Directly copied after casting to TEXT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp installations 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device installations 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report installations 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • installations: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[installations]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • installations: Copied to the output with COALESCE(usage_device.installations, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp sessions 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device sessions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report sessions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • sessions: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[sessions]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • sessions: Copied to the output with COALESCE(usage_device.sessions, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp active_devices 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device active_devices 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report active_devices 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • active_devices: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[active_devices]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • active_devices: Copied to the output with COALESCE(usage_device.active_devices, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp active_devices_last_30_days 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device active_devices_last_30_days 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report active_devices_last_30_days 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast to INT type
    • Output Columns:
      • active_devices_last_30_days: Directly copied after casting to INT
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[active_devices_last_30_days]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • active_devices_last_30_days: Copied to the output with COALESCE(usage_device.active_devices_last_30_days, 0)
Column Lineage
%3 40. model.apple_store_source.stg_apple_store__usage_device_tmp 40. model.apple_store_source.stg_apple_store__usage_device_tmp deletions 39. model.apple_store_source.stg_apple_store__usage_device 39. model.apple_store_source.stg_apple_store__usage_device deletions 40. model.apple_store_source.stg_apple_store__usage_device_tmp:f0->39. model.apple_store_source.stg_apple_store__usage_device:f0 2. model.apple_store.apple_store__device_report 2. model.apple_store.apple_store__device_report deletions 39. model.apple_store_source.stg_apple_store__usage_device:f0->2. model.apple_store.apple_store__device_report:f0
39. model.apple_store_source.stg_apple_store__usage_device
  • Input Column: 40. model.apple_store_source.stg_apple_store__usage_device_tmp[deletions]
    • Direct The 'deletions' column is directly copied from the input to the output without any transformation.
    • Cleaning The column is cast to INT type in the 'fields' CTE, ensuring consistent data type.
    • Output Columns:
      • deletions: The 'deletions' column is directly mapped to the output 'deletions' column.
2. model.apple_store.apple_store__device_report
  • Input Column: 39. model.apple_store_source.stg_apple_store__usage_device[deletions]
    • Direct The column is directly copied, with a COALESCE function to replace NULL values with 0
    • Output Columns:
      • deletions: Copied to the output with COALESCE(usage_device.deletions, 0)
41. model.apple_store_source.stg_apple_store__usage_platform_version

This SQL query performs data transformation and type casting on the 'stg_apple_store__usage_platform_version' table. It starts by selecting all columns from a temporary table, then defines a set of fields with specific data types. Finally, it selects and renames certain columns, casting the 'date' column to a DATE type. The query primarily focuses on data cleaning and restructuring.

CleaningFeaturization
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_platform_version_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS active_devices,
    CAST(NULL AS INT) AS active_devices_last_30_days,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS deletions,
    CAST(NULL AS INT) AS installations,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS TEXT) AS platform_version,
    CAST(NULL AS INT) AS sessions,
    CAST(NULL AS TEXT) AS source_type
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    platform_version,
    active_devices,
    active_devices_last_30_days,
    deletions,
    installations,
    sessions
  FROM fields
)
SELECT
  *
FROM final
%3 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version date_day app_id source_type platform_version active_devices active_devices_last_30_days deletions installations sessions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp app_id date platform_version source_type installations sessions active_devices active_devices_last_30_days deletions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f1 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f1->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f2->41. model.apple_store_source.stg_apple_store__usage_platform_version:f3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f3->41. model.apple_store_source.stg_apple_store__usage_platform_version:f2 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f4->41. model.apple_store_source.stg_apple_store__usage_platform_version:f7 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f5->41. model.apple_store_source.stg_apple_store__usage_platform_version:f8 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f6->41. model.apple_store_source.stg_apple_store__usage_platform_version:f4 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f7->41. model.apple_store_source.stg_apple_store__usage_platform_version:f5 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f8->41. model.apple_store_source.stg_apple_store__usage_platform_version:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
platform_version text The platform version of the device engaging with your app.
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp date 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version date_day 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Cast to DATE type and renamed
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp app_id 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version app_id 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp source_type 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version source_type 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version platform_version 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp active_devices 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version active_devices 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report active_devices 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[active_devices]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • active_devices: Copied to the output with COALESCE(usage_platform_version.active_devices, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp active_devices_last_30_days 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version active_devices_last_30_days 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report active_devices_last_30_days 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[active_devices_last_30_days]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • active_devices_last_30_days: Copied to the output with COALESCE(usage_platform_version.active_devices_last_30_days, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp deletions 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version deletions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report deletions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cleaned by casting it to INT type in the 'fields' CTE
    • Output Columns:
      • deletions: It is directly copied to the 'deletions' column in the final output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[deletions]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • deletions: Copied to the output with COALESCE(usage_platform_version.deletions, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp installations 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version installations 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report installations 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • installations: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[installations]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • installations: Copied to the output with COALESCE(usage_platform_version.installations, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp sessions 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version sessions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report sessions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[sessions]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • sessions: Copied to the output with COALESCE(usage_platform_version.sessions, 0)
42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp

This SQL query selects all columns from the 'usage_platform_version_source_type_report' table in the 'itunes_connect' schema of the 'TEST' database. It appears to be a simple data extraction query without any transformations or filters.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.usage_platform_version_source_type_report
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp app_id date platform_version source_type meets_threshold installations _fivetran_synced sessions active_devices active_devices_last_30_days deletions 57. source.apple_store_source.apple_store.usage_platform_version_source_type_report 57. source.apple_store_source.apple_store.usage_platform_version_source_type_report
Name Type Comment
app_id integer None
date timestamp without time zone None
platform_version text None
source_type text None
meets_threshold boolean None
installations integer None
_fivetran_synced timestamp without time zone None
sessions integer None
active_devices integer None
active_devices_last_30_days integer None
deletions integer None
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp app_id 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version app_id 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report app_id 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[app_id]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • app_id: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp date 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version date_day 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report date_day 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Cast to DATE type and renamed
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[date_day]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • date_day: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version platform_version 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[platform_version]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • platform_version: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[platform_version]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • platform_version: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp source_type 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version source_type 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report source_type 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[source_type]
    • Direct The column is directly copied without any transformation
    • Integration The column is used as a key to join with other tables
    • Output Columns:
      • source_type: Directly copied to the output
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp installations 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version installations 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report installations 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • installations: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[installations]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • installations: Copied to the output with COALESCE(usage_platform_version.installations, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp sessions 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version sessions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report sessions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[sessions]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • sessions: Copied to the output with COALESCE(usage_platform_version.sessions, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp active_devices 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version active_devices 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report active_devices 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[active_devices]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • active_devices: Copied to the output with COALESCE(usage_platform_version.active_devices, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp active_devices_last_30_days 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version active_devices_last_30_days 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report active_devices_last_30_days 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly copied to the output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[active_devices_last_30_days]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • active_devices_last_30_days: Copied to the output with COALESCE(usage_platform_version.active_devices_last_30_days, 0)
Column Lineage
%3 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp deletions 41. model.apple_store_source.stg_apple_store__usage_platform_version 41. model.apple_store_source.stg_apple_store__usage_platform_version deletions 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp:f0->41. model.apple_store_source.stg_apple_store__usage_platform_version:f0 4. model.apple_store.apple_store__platform_version_report 4. model.apple_store.apple_store__platform_version_report deletions 41. model.apple_store_source.stg_apple_store__usage_platform_version:f0->4. model.apple_store.apple_store__platform_version_report:f0
41. model.apple_store_source.stg_apple_store__usage_platform_version
  • Input Column: 42. model.apple_store_source.stg_apple_store__usage_platform_version_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cleaned by casting it to INT type in the 'fields' CTE
    • Output Columns:
      • deletions: It is directly copied to the 'deletions' column in the final output
4. model.apple_store.apple_store__platform_version_report
  • Input Column: 41. model.apple_store_source.stg_apple_store__usage_platform_version[deletions]
    • Direct The column is directly copied, but with a COALESCE function to replace NULL with 0
    • Output Columns:
      • deletions: Copied to the output with COALESCE(usage_platform_version.deletions, 0)
43. model.apple_store_source.stg_apple_store__usage_territory

This SQL query performs data type casting and column selection on the 'stg_apple_store__usage_territory_tmp' table. It first creates a CTE with all columns from the source table, then defines the data types for each column in a second CTE. Finally, it selects and renames specific columns, casting the 'date' column to DATE type. The query focuses on preparing and structuring the data for further use.

CleaningOther
SQL Query
WITH base AS (
  SELECT
    *
  FROM TEST.PUBLIC_apple_store_source.stg_apple_store__usage_territory_tmp
), fields AS (
  SELECT
    CAST(NULL AS TIMESTAMP) AS _fivetran_synced,
    CAST(NULL AS INT) AS active_devices,
    CAST(NULL AS INT) AS active_devices_last_30_days,
    CAST(NULL AS INT) AS app_id,
    CAST(NULL AS TIMESTAMP) AS date,
    CAST(NULL AS INT) AS deletions,
    CAST(NULL AS INT) AS installations,
    CAST(NULL AS BOOLEAN) AS meets_threshold,
    CAST(NULL AS INT) AS sessions,
    CAST(NULL AS TEXT) AS source_type,
    CAST(NULL AS TEXT) AS territory
  FROM base
), final AS (
  SELECT
    CAST(date AS DATE) AS date_day,
    app_id,
    source_type,
    territory,
    active_devices,
    active_devices_last_30_days,
    deletions,
    installations,
    sessions
  FROM fields
)
SELECT
  *
FROM final
%3 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory date_day app_id source_type territory active_devices active_devices_last_30_days deletions installations sessions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp app_id date source_type territory installations sessions active_devices active_devices_last_30_days deletions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f1 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f1->43. model.apple_store_source.stg_apple_store__usage_territory:f0 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f2->43. model.apple_store_source.stg_apple_store__usage_territory:f2 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f3->43. model.apple_store_source.stg_apple_store__usage_territory:f3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f4->43. model.apple_store_source.stg_apple_store__usage_territory:f7 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f5->43. model.apple_store_source.stg_apple_store__usage_territory:f8 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f6->43. model.apple_store_source.stg_apple_store__usage_territory:f4 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f7->43. model.apple_store_source.stg_apple_store__usage_territory:f5 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f8->43. model.apple_store_source.stg_apple_store__usage_territory:f6
Name Type Comment
date_day date The date of the report and respective recorded metric(s); follows the format `YYYY-MM-DD`.
app_id integer Application ID.
source_type text A source is counted when a customer follows a link to your App Store product page. There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary. More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
territory text The territory (aka country) full name associated with the report's respective metric(s).
active_devices integer The count of active_device is the count of devices that ran the app at least one time and for at least two seconds on a given day (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices or no value from the source report that day.
active_devices_last_30_days integer The count of active_devices_last_30_days is the count of devices that ran the app at least one time and for at least two seconds on the date_day of the report minus 30 days (User Opt-In only); this metric is presumed to be de-duplicated daily as received from the source data, therefore, aggregating over a span of days is better done in the UI. A value of 0 indicates there were 0 active devices last 30 days or no value from the source report that day.
deletions integer A deletion occurs when a user removes your app from their device (User Opt-In only). Data from resetting or erasing a device’s content and settings is not included. A value of 0 indicates there were 0 deletions or no value from the source report that day.
installations integer An installation event is when the user opens the App after they've downloaded it (User Opt-In only). If the App was downloaded but not opened or opened offline, this will not count; if the user opts out of sending data back to Apple, there will also be no data here. A value of 0 indicates there were 0 installations or no value from the source report that day.
sessions integer Sessions is the count of the number of times the app has been used for at least two seconds (User Opt-In only). If the app is in the background and is later used again, that counts as another session. A value of 0 indicates there were 0 sessions or no value from the source report that day.
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp date 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory date_day 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Mapped after casting to DATE type
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[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 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp app_id 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory app_id 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • app_id: directly copied
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp source_type 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory source_type 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[source_type]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • source_type: directly copied
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp territory 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory territory 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report territory_long 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[territory]
    • Integration used as a key to join with other tables
    • Cleaning used to match with country codes for standardization
    • Output Columns:
      • territory_long: indirectly mapped after cleaning and joining
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp active_devices 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory active_devices 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report active_devices 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[active_devices]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • active_devices: copied with COALESCE(usage_territory.active_devices, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp active_devices_last_30_days 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory active_devices_last_30_days 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report active_devices_last_30_days 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[active_devices_last_30_days]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • active_devices_last_30_days: copied with COALESCE(usage_territory.active_devices_last_30_days, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp deletions 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory deletions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report deletions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • deletions: The column is directly mapped to the 'deletions' output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[deletions]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • deletions: copied with COALESCE(usage_territory.deletions, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp installations 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory installations 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report installations 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • installations: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[installations]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • installations: copied with COALESCE(usage_territory.installations, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp sessions 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory sessions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report sessions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[sessions]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • sessions: copied with COALESCE(usage_territory.sessions, 0)
44. model.apple_store_source.stg_apple_store__usage_territory_tmp

This SQL query selects all columns from the 'usage_territory_source_type_report' table in the 'itunes_connect' schema of the 'TEST' database. It appears to be a simple data extraction query without any transformations or filters.

Other
SQL Query
SELECT
  *
FROM TEST.itunes_connect.usage_territory_source_type_report
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp app_id date source_type territory meets_threshold installations _fivetran_synced sessions active_devices active_devices_last_30_days deletions 59. source.apple_store_source.apple_store.usage_territory_source_type_report 59. source.apple_store_source.apple_store.usage_territory_source_type_report
Name Type Comment
app_id integer None
date timestamp without time zone None
source_type text None
territory text None
meets_threshold boolean None
installations integer None
_fivetran_synced timestamp without time zone None
sessions integer None
active_devices integer None
active_devices_last_30_days integer None
deletions integer None
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp app_id 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory app_id 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report app_id 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[app_id]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • app_id: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[app_id]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • app_id: directly copied
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp date 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory date_day 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report date_day 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[date]
    • Cleaning The column is cast to DATE type
    • Output Columns:
      • date_day: Mapped after casting to DATE type
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[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 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp source_type 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory source_type 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report source_type 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[source_type]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • source_type: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[source_type]
    • Integration used as a key to join with other tables
    • Direct directly copied to the output
    • Output Columns:
      • source_type: directly copied
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp territory 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory territory 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report territory_long 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[territory]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • territory: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[territory]
    • Integration used as a key to join with other tables
    • Cleaning used to match with country codes for standardization
    • Output Columns:
      • territory_long: indirectly mapped after cleaning and joining
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp installations 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory installations 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report installations 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[installations]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • installations: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[installations]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • installations: copied with COALESCE(usage_territory.installations, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp sessions 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory sessions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report sessions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[sessions]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • sessions: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[sessions]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • sessions: copied with COALESCE(usage_territory.sessions, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp active_devices 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory active_devices 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report active_devices 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[active_devices]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[active_devices]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • active_devices: copied with COALESCE(usage_territory.active_devices, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp active_devices_last_30_days 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory active_devices_last_30_days 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report active_devices_last_30_days 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[active_devices_last_30_days]
    • Direct The column is directly copied without any transformation
    • Output Columns:
      • active_devices_last_30_days: Directly mapped to the output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[active_devices_last_30_days]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • active_devices_last_30_days: copied with COALESCE(usage_territory.active_devices_last_30_days, 0)
Column Lineage
%3 44. model.apple_store_source.stg_apple_store__usage_territory_tmp 44. model.apple_store_source.stg_apple_store__usage_territory_tmp deletions 43. model.apple_store_source.stg_apple_store__usage_territory 43. model.apple_store_source.stg_apple_store__usage_territory deletions 44. model.apple_store_source.stg_apple_store__usage_territory_tmp:f0->43. model.apple_store_source.stg_apple_store__usage_territory:f0 6. model.apple_store.apple_store__territory_report 6. model.apple_store.apple_store__territory_report deletions 43. model.apple_store_source.stg_apple_store__usage_territory:f0->6. model.apple_store.apple_store__territory_report:f0
43. model.apple_store_source.stg_apple_store__usage_territory
  • Input Column: 44. model.apple_store_source.stg_apple_store__usage_territory_tmp[deletions]
    • Direct The column is directly copied without any transformation
    • Cleaning The column is cast as INT in the 'fields' CTE
    • Output Columns:
      • deletions: The column is directly mapped to the 'deletions' output column
6. model.apple_store.apple_store__territory_report
  • Input Column: 43. model.apple_store_source.stg_apple_store__usage_territory[deletions]
    • Direct directly copied to the output, with COALESCE for null handling
    • Output Columns:
      • deletions: copied with COALESCE(usage_territory.deletions, 0)
45. seed.apple_store_source.apple_store_country_codes
The model details are not provided
46. source.apple_store_source.apple_store.app
The model details are not provided
47. source.apple_store_source.apple_store.app_store_platform_version_source_type_report
The model details are not provided
48. source.apple_store_source.apple_store.app_store_source_type_device_report
The model details are not provided
49. source.apple_store_source.apple_store.app_store_territory_source_type_report
The model details are not provided
50. source.apple_store_source.apple_store.crashes_app_version_device_report
The model details are not provided
51. source.apple_store_source.apple_store.crashes_platform_version_device_report
The model details are not provided
52. source.apple_store_source.apple_store.downloads_platform_version_source_type_report
The model details are not provided
53. source.apple_store_source.apple_store.downloads_source_type_device_report
The model details are not provided
54. source.apple_store_source.apple_store.downloads_territory_source_type_report
The model details are not provided
55. source.apple_store_source.apple_store.sales_account
The model details are not provided
56. source.apple_store_source.apple_store.usage_app_version_source_type_report
The model details are not provided
57. source.apple_store_source.apple_store.usage_platform_version_source_type_report
The model details are not provided
58. source.apple_store_source.apple_store.usage_source_type_device_report
The model details are not provided
59. source.apple_store_source.apple_store.usage_territory_source_type_report
The model details are not provided