fivetran / dbt_apple_store Goto Github PK
View Code? Open in Web Editor NEWFivetran's Apple App Store source dbt package
Home Page: https://fivetran.github.io/dbt_apple_store/
License: Apache License 2.0
Fivetran's Apple App Store source dbt package
Home Page: https://fivetran.github.io/dbt_apple_store/
License: Apache License 2.0
Building apple_store__subscription_report
model fails with following error on BigQuery.
21:44:25 Completed with 1 error and 0 warnings:
21:44:25
21:44:25 Database Error in model apple_store__subscription_report (models/apple_store__subscription_report.sql)
21:44:25 No matching signature for operator = for argument types: DATE, STRING. Supported signature: ANY = ANY at [243:12]
21:44:25 compiled Code at target/run/apple_store/models/apple_store__subscription_report.sql
21:44:25
21:44:25 Done. PASS=27 WARN=0 ERROR=1 SKIP=1 TOTAL=29
The code referred here seems to be:
Error log itself is provided above.
It should run without any issue.
I have set the using_subscriptions
flag to true.
vars:
# set source database and schema name (https://github.com/fivetran/dbt_app_reporting#step-3-configure-database-and-schema-variables)
apple_store_database: project-XXX
apple_store_schema: itunes_connect
google_play_database: project-XXX
google_play_schema: google_play
# enable subscriptions and earnings models (https://github.com/fivetran/dbt_app_reporting#step-4-disable-and-enable-source-tables)
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
packages:
bigquery
Core:
Plugins:
As a temporary measure, I changed the line to
reporting_grain.date_day = cast(subscription_events.date_day as date)
and it worked.
Maybe it would be better if it is fixed in other location like upstream model.
I tried installing the latest version of package (0.2.0) by following the guide in the README.md.
But it failed with following error,
08:34:10 Running with dbt=1.3.1
08:34:12 Encountered an error:
Could not find a matching compatible version for package fivetran/apple_store
Requested range: >=0.2.0, <0.3.0
Compatible versions: ['0.1.0']
It was weired at first since I just followed the instruction. It turns out that the package info on the dbt Hub hasn't been updated yet.
A little more digging revealed that dbt hub seems to auto-update packages by observing changes of their (each package's) GitHub releases.
I think publishing new release will solve the issue.
08:34:10 Running with dbt=1.3.1
08:34:12 Encountered an error:
Could not find a matching compatible version for package fivetran/apple_store
Requested range: >=0.2.0, <0.3.0
Compatible versions: ['0.1.0']
One should be able to download latest version of apple_store package from dbt Hub.
not changed from auto-generated default
packages:
snowflake
Core:
Plugins:
No response
Test fail due to records not unique on date_day
, app_platform
, app_name
, and country_short
. My data is displaying duplicate records for country code TR
:
Failure in test dbt_utils_unique_combination_of_columns_app_reporting__country_report_date_day__app_platform__app_name__country_short (models/app_reporting.yml)
No errors
N/A
0.3.0
snowflake
1.5
See this issue on Google Play for additional background.
The test case unique_combination_of_columns
in the apple_store__subscription_report
table fails because the data does seem to have duplicates (where multiple rows have the same date_day
, account_id
, app_id
, subscription_name
, territory_long
, state
).
Looking into it further, the duplicates seem to exist in the transformed data from app_store.sales_subscription_event_summary
(though the Fivetran assigned Primary keys are still all distinct).
I raised a ticket with Fivetran support who have said the duplicates are not a mistake, meaning I believe the test in the DBT package should change.
No response
Tests should pass regardless of duplicates for the listed fields.
N/A
0.3.1
bigquery
1.5.0
No response
Clicking the link "ERD" in the home page of this repo fails with a 404 error.
URL: https://fivetran.com/docs/applications/apple_store/#schemainformation
No 404
N/A (markdown only)
Latest
other (mention it in "Additional Context")
N/A
N/A
In apple_store__subscription_report
, there is a join on state
but that field will be null for most countries. This results in metrics like event_renew, event_cancel, event_subscribe being 0 as the rows are not joined correctly.
select
reporting_grain.date_day,
reporting_grain.account_id,
reporting_grain.account_name,
reporting_grain.app_id,
reporting_grain.app_name,
reporting_grain.subscription_name,
case
when country_codes.alternative_country_name is null then country_codes.country_name
else country_codes.alternative_country_name
end as territory_long,
reporting_grain.country as territory_short,
reporting_grain.state,
country_codes.region,
country_codes.sub_region,
coalesce(subscription_summary.active_free_trial_introductory_offer_subscriptions, 0) as active_free_trial_introductory_offer_subscriptions,
coalesce(subscription_summary.active_pay_as_you_go_introductory_offer_subscriptions, 0) as active_pay_as_you_go_introductory_offer_subscriptions,
coalesce(subscription_summary.active_pay_up_front_introductory_offer_subscriptions, 0) as active_pay_up_front_introductory_offer_subscriptions,
coalesce(subscription_summary.active_standard_price_subscriptions, 0) as active_standard_price_subscriptions
{% for event_val in var('apple_store__subscription_events') %}
{% set event_column = 'event_' ~ event_val | replace(' ', '_') | trim | lower %}
, coalesce({{ 'subscription_events.' ~ event_column }}, 0)
as {{ event_column }}
{% endfor %}
from reporting_grain
left join subscription_summary
on reporting_grain.date_day = subscription_summary.date_day
and reporting_grain.account_id = subscription_summary.account_id
and reporting_grain.app_name = subscription_summary.app_name
and reporting_grain.subscription_name = subscription_summary.subscription_name
and reporting_grain.country = subscription_summary.country
**and reporting_grain.state = subscription_summary.state**
left join subscription_events
on reporting_grain.date_day = subscription_events.date_day
and reporting_grain.account_id = subscription_events.account_id
and reporting_grain.app_name = subscription_events.app_name
and reporting_grain.subscription_name = subscription_events.subscription_name
and reporting_grain.country = subscription_events.country
**and reporting_grain.state = subscription_events.state**
left join country_codes
on reporting_grain.country = country_codes.country_code_alpha_2
No response
Correctly get all required rows from all joins
bigquery
1.7.7
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.