Skip to content

Fivetran's app reporting dbt package. Combine your Google Play and Apple App Store activity using this package.

License

Notifications You must be signed in to change notification settings

fivetran/dbt_app_reporting

Repository files navigation

App Reporting dbt Package

This dbt package unifies and aggregates data from Fivetran's Apple App Store and Google Play connectors into analytics-ready tables.

Resources

What does this dbt package do?

This package enables you to standardize schemas from various app platform connectors and create reporting models for all activity aggregated to the device, country, OS version, app version, and traffic source levels. It creates enriched models with metrics focused on app performance, user engagement, and platform-specific analytics.

Currently supports the following Fivetran app platform connectors:

The individual Google Play and Apple App Store tables have additional platform-specific metrics better suited for deep-dive analyses.

Output schema

Final output tables are generated in the following target schema:

<your_database>.<connector/schema_name>_app_reporting

Final output tables

By default, this package materializes the following final tables:

Table Description
app_reporting__app_version_report Tracks daily app performance metrics by app version to monitor version adoption, identify version-specific issues, and understand how different app versions perform.

Example Analytics Questions:
  • Which app versions have the highest user adoption and retention rates?
  • Are there specific app versions experiencing higher crash rates or performance issues?
  • How do key metrics (sessions, revenue, engagement) compare across different app versions?
app_reporting__country_report Analyzes daily app performance by country to understand geographic distribution of users, revenue by region, and identify market-specific opportunities and challenges.

Example Analytics Questions:
  • Which countries generate the most app revenue and have the highest user engagement?
  • How do key performance metrics vary across different geographic markets?
  • What countries show the strongest growth in daily active users or revenue?
app_reporting__device_report Monitors daily app metrics by device type to optimize device-specific experiences, identify device compatibility issues, and understand device preferences among users.

Example Analytics Questions:
  • Which device types have the highest user volumes and best performance metrics?
  • Are there device-specific crashes or performance issues affecting user experience?
  • How do engagement and revenue metrics differ between iOS and Android devices?
app_reporting__os_version_report Tracks daily performance metrics by operating system version to ensure compatibility, prioritize OS version support, and identify version-specific issues.

Example Analytics Questions:
  • Which OS versions have the most active users and highest engagement rates?
  • Are newer OS versions showing better or worse performance metrics?
  • What percentage of users are on outdated OS versions that may need deprecation?
app_reporting__overview_report Provides a high-level daily summary of app performance across all dimensions to monitor overall app health, track key metrics, and identify trends at the app level.

Example Analytics Questions:
  • What are the overall daily active users, sessions, and revenue trends for each app?
  • How do total app metrics compare week-over-week or month-over-month?
  • Which apps in the portfolio are performing best across key engagement and revenue metrics?
app_reporting__traffic_source_report Analyzes daily app metrics by traffic source to measure acquisition channel effectiveness, optimize marketing spend, and understand which sources drive the most valuable users.

Example Analytics Questions:
  • Which traffic sources generate the most app installs and highest lifetime value users?
  • How do organic versus paid acquisition channels compare in terms of user quality and retention?
  • What is the cost per acquisition and return on ad spend by traffic source?

¹ Each Quickstart transformation job run materializes these models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as view, table, or incremental.


Materialized Models

Each 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:

Connector Model Count
App Reporting 18
Apple App Store 38
Google Play 40

Prerequisites

To use this dbt package, you must have the following:

  • At least one Fivetran App Reporting connection syncing data into your destination.
  • A BigQuery, Snowflake, Redshift, Postgres, or Databricks destination.

How do I use the dbt package?

You can either add this dbt package in the Fivetran dashboard or import it into your dbt project:

  • To add the package in the Fivetran dashboard, follow our Quickstart guide.
  • To add the package to your dbt project, follow the setup instructions in the dbt package's README file to use this package.

Installing the Package

Include the following github package version in your packages.yml

Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.

packages:
  - package: fivetran/app_reporting
    version: [">=1.2.0", "<1.3.0"] # we recommend using ranges to capture non-breaking changes automatically

Do 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.

Configure Database and Schema Variables

By 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 <connection>_database variables to your dbt_project.yml file (see below).

By 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 <connection>_schema variables to your dbt_project.yml file (see below).

vars:
  apple_store_schema: itunes_connect
  apple_store_database: your_database_name

  google_play_schema: google_play
  google_play_database: your_database_name 

Disable and Enable Source Tables

Your 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.

If you use subscriptions and have the follow tables enabled for:

  • Apple App Store
    • sales_subscription_event_summary
    • sales_subscription_summary
  • Google Play
    • financial_stats_subscriptions_country
    • earnings

Add the following variables to your dbt_project.yml file

vars:
  apple_store__using_subscriptions: true # by default this is assumed to be false
  google_play__using_subscriptions: true # by default this is assumed to be false
  google_play__using_earnings: true # by default this is assumed to be false

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.

Seed country_codes mapping tables (once)

In order to map longform territory names to their ISO country codes, we have adapted the CSV from lukes/ISO-3166-Countries-with-Regional-Codes to align Google and Apple's country name formats for the App Reporting package.

You will need to dbt seed the google_play__country_codes file and apple_store_country_codes file just once.

(Recommended) Change the Build Schema

By default this package will build all models in your <target_schema> 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:

models:  
  app_reporting:
    +schema: app_reporting # default schema suffix

  apple_store:
    +schema: apple_store # default schema suffix
    staging:
      +schema: apple_store_source # default schema suffix

  google_play:
    +schema: google_play # default schema suffix
    staging:
      +schema: google_play_source # default schema suffix

Provide a blank +schema: to write to the target_schema without any suffix.

(Optional) Additional configurations

Expand/collapse configurations

Union multiple connections

If 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 <package_name>_union_schemas OR <package_name>_union_databases variables (cannot do both) in your root dbt_project.yml file. Below are the variables and examples for each connection:

vars:
    apple_store_union_schemas: ['apple_store_usa','apple_store_canada']
    apple_store_union_databases: ['apple_store_usa','apple_store_canada']

    google_play_union_schemas: ['google_play_usa','google_play_canada']
    google_play_union_databases: ['google_play_usa','google_play_canada']

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.

To connect your multiple schema/database sources to the package models, follow the steps outlined in the Union Data Defined Sources Configuration 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.

Change the source table references

If 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.

IMPORTANT: See the Apple Store dbt_project.yml and Google Play dbt_project.yml variable declarations to see the expected names.

vars:
    apple_store_<default_source_table_name>_identifier: your_table_name 
    google_play_<default_source_table_name>_identifier: your_table_name 

(Optional) Orchestrate your models with Fivetran Transformations for dbt Core™

Expand to view details

Fivetran offers the ability for you to orchestrate your dbt project through Fivetran Transformations for dbt Core™. Learn how to set up your project for orchestration through Fivetran in our Transformations for dbt Core™ setup guides.


Does this package have dependencies?

This dbt package is dependent on the following dbt packages. For more information on the below packages, refer to the dbt hub site.

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.

packages: 
    - package: fivetran/google_play
      version: [">=1.2.0", "<1.3.0"]
    
    - package: fivetran/apple_store
      version: [">=1.2.0", "<1.3.0"]

    - package: fivetran/fivetran_utils
      version: [">=0.4.0", "<0.5.0"]

    - package: dbt-labs/dbt_utils
      version: [">=1.0.0", "<2.0.0"]

    - package: dbt-labs/spark_utils
      version: [">=0.3.0", "<0.4.0"]

How is this package maintained and can I contribute?

Package Maintenance

The Fivetran team maintaining this package only maintains the latest version of the package. We highly recommend you stay consistent with the latest version of the package and refer to the CHANGELOG and release notes for more information on changes across versions.

Contributions

A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.

We highly encourage and welcome contributions to this package. Learn how to contribute to a package in dbt's Contributing to an external dbt package article.

Opinionated Decisions

In 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, 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.

Are there any resources available?

  • If you encounter any questions or want to reach out for help, see the GitHub Issue section to find the right avenue of support for you.
  • 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.

About

Fivetran's app reporting dbt package. Combine your Google Play and Apple App Store activity using this package.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 10

Languages