{"id":22793331,"url":"https://github.com/fivetran/dbt_app_reporting","last_synced_at":"2025-10-07T20:17:19.953Z","repository":{"id":39098324,"uuid":"470746881","full_name":"fivetran/dbt_app_reporting","owner":"fivetran","description":"Fivetran's app reporting dbt package. Combine your Google Play and Apple App Store activity using this package.","archived":false,"fork":false,"pushed_at":"2025-08-15T06:32:01.000Z","size":2844,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":43,"default_branch":"main","last_synced_at":"2025-08-15T07:17:50.187Z","etag":null,"topics":["app-reporting","apple-app-store","dbt","dbt-packages","fivetran","google-play","itunes-connect"],"latest_commit_sha":null,"homepage":"https://fivetran.github.io/dbt_app_reporting/#!/overview","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fivetran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-16T20:48:20.000Z","updated_at":"2025-08-15T06:20:10.000Z","dependencies_parsed_at":"2024-08-02T15:45:09.195Z","dependency_job_id":"0248399e-a55a-4387-abc3-7c251a5384e7","html_url":"https://github.com/fivetran/dbt_app_reporting","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/fivetran/dbt_app_reporting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_app_reporting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_app_reporting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_app_reporting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_app_reporting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fivetran","download_url":"https://codeload.github.com/fivetran/dbt_app_reporting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_app_reporting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278838815,"owners_count":26054801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-reporting","apple-app-store","dbt","dbt-packages","fivetran","google-play","itunes-connect"],"created_at":"2024-12-12T03:19:18.335Z","updated_at":"2025-10-07T20:17:19.947Z","avatar_url":"https://github.com/fivetran.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# App Reporting dbt Package ([Docs](https://fivetran.github.io/dbt_app_reporting/))\n\n\u003cp align=\"left\"\u003e\n    \u003ca alt=\"License\"\n        href=\"https://github.com/fivetran/dbt_app_reporting/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"dbt-core\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/dbt_Core™_version-\u003e=1.3.0_,\u003c2.0.0-orange.svg\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"Maintained?\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"PRs\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contributions-welcome-blueviolet\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"Fivetran Quickstart Compatible\"\n        href=\"https://fivetran.com/docs/transformations/dbt/quickstart\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Fivetran_Quickstart_Compatible%3F-yes-green.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## What does this dbt package do?\n- Standardizes schemas from various app platform connectors and creates reporting models for all activity aggregated to the device, country, OS version, app version, traffic source and subscription levels.\n- Currently supports the following Fivetran app platform connectors:\n    - [Apple App Store](https://github.com/fivetran/dbt_apple_store)\n    - [Google Play](https://github.com/fivetran/dbt_google_play)\n- Generates a comprehensive data dictionary of your source and modeled App Reporting data via the [dbt docs site](https://fivetran.github.io/dbt_app_reporting/)\n\n\u003c!--section=\"app_reporting_transformation_model\"--\u003e\nRefer to the table below for a detailed view of final tables materialized by default within this package. Additionally, check out our [Docs site](https://fivetran.github.io/dbt_app_reporting/#!/overview) for more details about these tables.\n\n| **Table**                  | **Description**                                                                                                                                               |\n| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [app_reporting__app_version_report](https://fivetran.github.io/dbt_app_reporting/#!/model/model.app_reporting.app_reporting__app_version_report)             | Each record represents daily metrics by app_name and app version.                                             |\n| [app_reporting__country_report](https://fivetran.github.io/dbt_app_reporting/#!/model/model.app_reporting.app_reporting__country_report)     | Each record represents daily metrics by app_name and country |\n| [app_reporting__device_report](https://fivetran.github.io/dbt_app_reporting/#!/model/model.app_reporting.app_reporting__device_report)     | Each record represents daily metrics by app_name and device.                             |\n| [app_reporting__os_version_report](https://fivetran.github.io/dbt_app_reporting/#!/model/model.app_reporting.app_reporting__os_version_report)    | Each record represents daily metrics by app_name and OS version.                            |\n| [app_reporting__overview_report](https://fivetran.github.io/dbt_app_reporting/#!/model/model.app_reporting.app_reporting__overview_report)   | Each record represents daily metrics by app_name.                            |                          |\n| [app_reporting__traffic_source_report](https://fivetran.github.io/dbt_app_reporting/#!/model/model.app_reporting.app_reporting__traffic_source_report) | Each record represents daily metrics by app_name and traffic source.                         |\n\n\u003e The individual Google Play and Apple App Store tables have additional platform-specific metrics better suited for deep-dive analyses.\n\n### Materialized Models\nEach Quickstart transformation job run materializes the following model counts for each selected connector. The total model count represents all staging, intermediate, and final models, materialized as `view`, `table`, or `incremental`:\n\n| **Connector** | **Model Count** |\n| ------------- | --------------- |\n| App Reporting | 18 |\n| [Apple App Store](https://github.com/fivetran/dbt_apple_store) | 38 |\n| [Google Play](https://github.com/fivetran/dbt_google_play) | 40 |\n\u003c!--section-end--\u003e\n\n## How do I use the dbt package?\n### Step 1: Pre-Requisites\n- Have all relevant Fivetran app platform connections syncing data into your destination. This package currently supports:\n    - [Apple App Store](https://fivetran.com/docs/applications/apple-app-store)\n    - [Google Play](https://fivetran.com/docs/applications/google-play)\n- This package has been tested on **BigQuery**, **Snowflake**, **Redshift**, **Postgres** and **Databricks**. Ensure you are using one of these supported databases.\n- This dbt package requires you have a functional dbt project that utilizes a dbt version within the respective range `\u003e=1.0.0, \u003c2.0.0`.\n\n### Step 2: Installing the Package\nInclude the following github package version in your `packages.yml`\n\u003e Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions, or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages.\n```yaml\npackages:\n  - package: fivetran/app_reporting\n    version: [\"\u003e=0.6.0\", \"\u003c0.7.0\"] # we recommend using ranges to capture non-breaking changes automatically\n```\n\nDo NOT include the individual app platform packages in this file. The app reporting package itself has dependencies on these packages and will install them as well.\n\n### Step 3: Configure Database and Schema Variables\nBy default, this package looks for your app platform data in your target database. If this is not where your app platform data is stored, add the relevant `\u003cconnection\u003e_database` variables to your `dbt_project.yml` file (see below).\n\nBy default, this package also looks for your connection data in specific schemas (`itunes_connect` and `google_play` for Apple App Store and Google Play, respectively). If your data is stored in a different schema, add the relevant `\u003cconnection\u003e_schema` variables to your `dbt_project.yml` file (see below).\n\n```yml\nvars:\n  apple_store_schema: itunes_connect\n  apple_store_database: your_database_name\n\n  google_play_schema: google_play\n  google_play_database: your_database_name \n```\n\n### Step 4: Disable and Enable Source Tables\nYour app platform connections might not sync every table that this package expects. If your syncs exclude certain tables, it is because you either don't use that functionality in your respective app platforms or have actively excluded some tables from your syncs.\n\nIf you use subscriptions and have the follow tables enabled for:\n- Apple App Store\n    - `sales_subscription_event_summary`\n    - `sales_subscription_summary`\n- Google Play\n    - `financial_stats_subscriptions_country`\n    - `earnings`\n\nAdd the following variables to your dbt_project.yml file\n\n```yml\nvars:\n  apple_store__using_subscriptions: true # by default this is assumed to be false\n  google_play__using_subscriptions: true # by default this is assumed to be false\n  google_play__using_earnings: true # by default this is assumed to be false\n```\n\n\u003e  Subscriptions and financial data are NOT included in `app_reporting` data models. This data is leveraged in the individual Google Play and Apple App Store packages, which are installed within the App Reporting package.\n\n### Step 5: Seed `country_codes` mapping tables (once)\n\nIn order to map longform territory names to their ISO country codes, we have adapted the CSV from [lukes/ISO-3166-Countries-with-Regional-Codes](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes) to align Google and [Apple's](https://developer.apple.com/help/app-store-connect/reference/app-store-localizations/) country name formats for the App Reporting package.\n\nYou will need to `dbt seed` the `google_play__country_codes` [file](https://github.com/fivetran/dbt_google_play/blob/main/seeds/google_play__country_codes.csv) and `apple_store_country_codes` [file](https://github.com/fivetran/dbt_apple_store/blob/main/seeds/apple_store_country_codes.csv) just once.\n\n### (Recommended) Step 6: Change the Build Schema\nBy default this package will build all models in your `\u003ctarget_schema\u003e` with the respective package suffixes (see below). This behavior can be tailored to your preference by making use of custom schemas. If you would like to override the current naming conventions, please add the following configuration to your `dbt_project.yml` file and rename `+schema` configs:\n\n```yml\nmodels:  \n  app_reporting:\n    +schema: app_reporting # default schema suffix\n\n  apple_store:\n    +schema: apple_store # default schema suffix\n    staging:\n      +schema: apple_store_source # default schema suffix\n\n  google_play:\n    +schema: google_play # default schema suffix\n    staging:\n      +schema: google_play_source # default schema suffix\n```\n\n\u003e Provide a blank `+schema: ` to write to the `target_schema` without any suffix.\n\n### (Optional) Step 7: Additional configurations\n\u003cdetails open\u003e\u003csummary\u003eExpand/collapse configurations\u003c/summary\u003e\n\n#### Union multiple connections\nIf you have multiple app reporting connections in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. The package will union all of the data together and pass the unioned table into the transformations. You will be able to see which source it came from in the `source_relation` column of each model. To use this functionality, you will need to set either the `\u003cpackage_name\u003e_union_schemas` OR `\u003cpackage_name\u003e_union_databases` variables (cannot do both) in your root `dbt_project.yml` file. Below are the variables and examples for each connection:\n\n```yml\nvars:\n    apple_store_union_schemas: ['apple_store_usa','apple_store_canada']\n    apple_store_union_databases: ['apple_store_usa','apple_store_canada']\n\n    google_play_union_schemas: ['google_play_usa','google_play_canada']\n    google_play_union_databases: ['google_play_usa','google_play_canada']\n```\n\u003e NOTE: The native `source.yml` connection set up in the package will not function when the union schema/database feature is utilized. Although the data will be correctly combined, you will not observe the sources linked to the package models in the Directed Acyclic Graph (DAG). This happens because the package includes only one defined `source.yml`.\n\nTo connect your multiple schema/database sources to the package models, follow the steps outlined in the [Union Data Defined Sources Configuration](https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source) section of the Fivetran Utils documentation for the union_data macro. This will ensure a proper configuration and correct visualization of connections in the DAG.\n\n#### Change the source table references\nIf an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable. This is not available when running the package on multiple unioned connections.\n\n\u003e IMPORTANT: See the Apple Store [`dbt_project.yml`](https://github.com/fivetran/dbt_apple_store/blob/main/dbt_project.yml)  and Google Play [`dbt_project.yml`](https://github.com/fivetran/dbt_google_play/blob/main/dbt_project.yml) variable declarations to see the expected names.\n\n```yml\nvars:\n    apple_store_\u003cdefault_source_table_name\u003e_identifier: your_table_name \n    google_play_\u003cdefault_source_table_name\u003e_identifier: your_table_name \n```\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n### (Optional) Step 8: Orchestrate your models with Fivetran Transformations for dbt Core™\n\u003cdetails\u003e\u003csummary\u003eExpand to view details\u003c/summary\u003e\n\u003cbr\u003e\n\nFivetran offers the ability for you to orchestrate your dbt project through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt). Learn how to set up your project for orchestration through Fivetran in our [Transformations for dbt Core™ setup guides](https://fivetran.com/docs/transformations/dbt#setupguide).\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n## Does this package have dependencies?\nThis dbt package is dependent on the following dbt packages. For more information on the below packages, refer to the [dbt hub](https://hub.getdbt.com/) site.\n\u003e **If you have any of these dependent packages in your own `packages.yml` we highly recommend you remove them to ensure there are no package version conflicts.**\n```yml\npackages: \n    - package: fivetran/google_play\n      version: [\"\u003e=1.0.0\", \"\u003c1.1.0\"]\n    \n    - package: fivetran/apple_store\n      version: [\"\u003e=1.0.0\", \"\u003c1.1.0\"]\n\n    - package: fivetran/fivetran_utils\n      version: [\"\u003e=0.4.0\", \"\u003c0.5.0\"]\n\n    - package: dbt-labs/dbt_utils\n      version: [\"\u003e=1.0.0\", \"\u003c2.0.0\"]\n\n    - package: dbt-labs/spark_utils\n      version: [\"\u003e=0.3.0\", \"\u003c0.4.0\"]\n```\n## How is this package maintained and can I contribute?\n### Package Maintenance\nThe Fivetran team maintaining this package **only** maintains the latest version of the package. We highly recommend you stay consistent with the [latest version](https://hub.getdbt.com/fivetran/app_reporting/latest/) of the package and refer to the [CHANGELOG](https://github.com/fivetran/dbt_app_reporting/blob/main/CHANGELOG.md) and release notes for more information on changes across versions.\n\n### Opinionated Decisions\nIn creating this package, which is meant for a wide range of use cases, we had to take opinionated stances on a few different questions we came across during development. We've consolidated significant choices we made in the [DECISIONLOG.md](https://github.com/fivetran/dbt_app_reporting/blob/main/DECISIONLOG.md), and will continue to update as the package evolves. We are always open to and encourage feedback on these choices, and the package in general.\n\n### Contributions\nThese dbt packages are developed by a small team of analytics engineers at Fivetran. However, the packages are made better by community contributions.\n\nWe highly encourage and welcome contributions to this package. Check out [this post](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657) on the best workflow for contributing to a package.\n\n## Are there any resources available?\n- If you encounter any questions or want to reach out for help, see the [GitHub Issue](https://github.com/fivetran/dbt_app_reporting/issues/new/choose) section to find the right avenue of support for you.\n- If you would like to provide feedback to the dbt package team at Fivetran, or would like to request a future dbt package to be developed, then feel free to fill out our [Feedback Form](https://www.surveymonkey.com/r/DQ7K7WW).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivetran%2Fdbt_app_reporting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffivetran%2Fdbt_app_reporting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivetran%2Fdbt_app_reporting/lists"}