-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_results.json
1 lines (1 loc) · 303 KB
/
run_results.json
1
{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v6.json", "dbt_version": "1.8.3", "generated_at": "2024-07-23T16:10:49.722713Z", "invocation_id": "2521882c-4a36-459b-8fdd-a4342543a9e8", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.023478Z", "completed_at": "2024-07-23T16:10:44.069432Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.071159Z", "completed_at": "2024-07-23T16:10:44.071168Z"}], "thread_id": "Thread-1", "execution_time": 0.0530092716217041, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_store_device_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"app_store_source_type_device\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.050989Z", "completed_at": "2024-07-23T16:10:44.069924Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.071903Z", "completed_at": "2024-07-23T16:10:44.071907Z"}], "thread_id": "Thread-3", "execution_time": 0.05156898498535156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_store_territory_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"app_store_territory_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_territory_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.047499Z", "completed_at": "2024-07-23T16:10:44.070365Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.072538Z", "completed_at": "2024-07-23T16:10:44.072541Z"}], "thread_id": "Thread-2", "execution_time": 0.05322599411010742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_store_platform_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"app_store_platform_version_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_platform_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.053618Z", "completed_at": "2024-07-23T16:10:44.070590Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.073130Z", "completed_at": "2024-07-23T16:10:44.073134Z"}], "thread_id": "Thread-4", "execution_time": 0.052488088607788086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"app\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.056189Z", "completed_at": "2024-07-23T16:10:44.070928Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.073635Z", "completed_at": "2024-07-23T16:10:44.073641Z"}], "thread_id": "Thread-5", "execution_time": 0.052451133728027344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__crashes_app_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"crashes_app_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.060630Z", "completed_at": "2024-07-23T16:10:44.071640Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.074477Z", "completed_at": "2024-07-23T16:10:44.074481Z"}], "thread_id": "Thread-6", "execution_time": 0.05297207832336426, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__crashes_platform_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"crashes_platform_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_platform_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.066375Z", "completed_at": "2024-07-23T16:10:44.072304Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.075191Z", "completed_at": "2024-07-23T16:10:44.075195Z"}], "thread_id": "Thread-8", "execution_time": 0.052594900131225586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__downloads_platform_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"downloads_platform_version_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_platform_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.063518Z", "completed_at": "2024-07-23T16:10:44.072888Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.075848Z", "completed_at": "2024-07-23T16:10:44.075851Z"}], "thread_id": "Thread-7", "execution_time": 0.05364418029785156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__downloads_device_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"downloads_source_type_device\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.084959Z", "completed_at": "2024-07-23T16:10:44.142807Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.144983Z", "completed_at": "2024-07-23T16:10:44.144990Z"}], "thread_id": "Thread-3", "execution_time": 0.0675802230834961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__sales_account_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"sales_account\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.081359Z", "completed_at": "2024-07-23T16:10:44.143296Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.145547Z", "completed_at": "2024-07-23T16:10:44.145552Z"}], "thread_id": "Thread-1", "execution_time": 0.06865477561950684, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__downloads_territory_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"downloads_territory_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_territory_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.088638Z", "completed_at": "2024-07-23T16:10:44.143890Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.146427Z", "completed_at": "2024-07-23T16:10:44.146431Z"}], "thread_id": "Thread-2", "execution_time": 0.06848406791687012, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__sales_subscription_events_tmp", "compiled": true, "compiled_code": "\n\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"sales_subscription_events\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.094320Z", "completed_at": "2024-07-23T16:10:44.144176Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.146826Z", "completed_at": "2024-07-23T16:10:44.146829Z"}], "thread_id": "Thread-5", "execution_time": 0.06786799430847168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_app_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"usage_app_version_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_app_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.096947Z", "completed_at": "2024-07-23T16:10:44.144456Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.147259Z", "completed_at": "2024-07-23T16:10:44.147262Z"}], "thread_id": "Thread-6", "execution_time": 0.06779694557189941, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_device_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"usage_source_type_device\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.091604Z", "completed_at": "2024-07-23T16:10:44.144698Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.147707Z", "completed_at": "2024-07-23T16:10:44.147712Z"}], "thread_id": "Thread-4", "execution_time": 0.06911087036132812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__sales_subscription_summary_tmp", "compiled": true, "compiled_code": "\n\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"sales_subscription_summary\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.100351Z", "completed_at": "2024-07-23T16:10:44.145969Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.149025Z", "completed_at": "2024-07-23T16:10:44.149031Z"}], "thread_id": "Thread-8", "execution_time": 0.06892895698547363, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_platform_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"usage_platform_version_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_platform_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.139494Z", "completed_at": "2024-07-23T16:10:44.146181Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.149554Z", "completed_at": "2024-07-23T16:10:44.149560Z"}], "thread_id": "Thread-7", "execution_time": 0.06896090507507324, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_territory_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"usage_territory_source_type\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_territory_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.159303Z", "completed_at": "2024-07-23T16:10:44.182820Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.184657Z", "completed_at": "2024-07-23T16:10:44.184666Z"}], "thread_id": "Thread-1", "execution_time": 0.03313183784484863, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_crashes_app_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_crashes_app_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_app_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.162674Z", "completed_at": "2024-07-23T16:10:44.183280Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.185255Z", "completed_at": "2024-07-23T16:10:44.185262Z"}], "thread_id": "Thread-2", "execution_time": 0.032852888107299805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_crashes_os_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_crashes_os_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_os_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.166108Z", "completed_at": "2024-07-23T16:10:44.183752Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.186244Z", "completed_at": "2024-07-23T16:10:44.186253Z"}], "thread_id": "Thread-5", "execution_time": 0.03354597091674805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_crashes_overview_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_crashes_overview\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_overview_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.155637Z", "completed_at": "2024-07-23T16:10:44.184062Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.187011Z", "completed_at": "2024-07-23T16:10:44.187015Z"}], "thread_id": "Thread-3", "execution_time": 0.03577709197998047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__earnings_tmp", "compiled": true, "compiled_code": "\n\n\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"earnings\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__earnings_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.170023Z", "completed_at": "2024-07-23T16:10:44.184293Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.187410Z", "completed_at": "2024-07-23T16:10:44.187413Z"}], "thread_id": "Thread-6", "execution_time": 0.03441786766052246, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_app_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_installs_app_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_app_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.176182Z", "completed_at": "2024-07-23T16:10:44.185758Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.188405Z", "completed_at": "2024-07-23T16:10:44.188409Z"}], "thread_id": "Thread-8", "execution_time": 0.03444314002990723, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_device_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_installs_device\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_device_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.179251Z", "completed_at": "2024-07-23T16:10:44.186029Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.188805Z", "completed_at": "2024-07-23T16:10:44.188808Z"}], "thread_id": "Thread-7", "execution_time": 0.03446483612060547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_os_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_installs_os_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_os_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.173041Z", "completed_at": "2024-07-23T16:10:44.186749Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.189452Z", "completed_at": "2024-07-23T16:10:44.189455Z"}], "thread_id": "Thread-4", "execution_time": 0.03620100021362305, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_country_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_installs_country\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_country_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.195083Z", "completed_at": "2024-07-23T16:10:44.218711Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.223086Z", "completed_at": "2024-07-23T16:10:44.223093Z"}], "thread_id": "Thread-1", "execution_time": 0.032721757888793945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_overview_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_installs_overview\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_overview_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.199384Z", "completed_at": "2024-07-23T16:10:44.222116Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.224504Z", "completed_at": "2024-07-23T16:10:44.224508Z"}], "thread_id": "Thread-2", "execution_time": 0.033605098724365234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_app_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_ratings_app_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_app_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.202776Z", "completed_at": "2024-07-23T16:10:44.222638Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.225217Z", "completed_at": "2024-07-23T16:10:44.225221Z"}], "thread_id": "Thread-5", "execution_time": 0.03327488899230957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_country_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_ratings_country\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_country_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.210870Z", "completed_at": "2024-07-23T16:10:44.223778Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.226256Z", "completed_at": "2024-07-23T16:10:44.226261Z"}], "thread_id": "Thread-8", "execution_time": 0.03266000747680664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_overview_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_ratings_overview\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_overview_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.205665Z", "completed_at": "2024-07-23T16:10:44.223996Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.226734Z", "completed_at": "2024-07-23T16:10:44.226738Z"}], "thread_id": "Thread-3", "execution_time": 0.034136056900024414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_device_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_ratings_device\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_device_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.208175Z", "completed_at": "2024-07-23T16:10:44.224256Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.227101Z", "completed_at": "2024-07-23T16:10:44.227104Z"}], "thread_id": "Thread-6", "execution_time": 0.03421902656555176, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_os_version_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_ratings_os_version\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_os_version_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.215346Z", "completed_at": "2024-07-23T16:10:44.224923Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.227747Z", "completed_at": "2024-07-23T16:10:44.227750Z"}], "thread_id": "Thread-7", "execution_time": 0.03385496139526367, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__store_performance_country_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_store_performance_country\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_country_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.219121Z", "completed_at": "2024-07-23T16:10:44.226001Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.228738Z", "completed_at": "2024-07-23T16:10:44.228742Z"}], "thread_id": "Thread-4", "execution_time": 0.03435397148132324, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__store_performance_source_tmp", "compiled": true, "compiled_code": "\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"stats_store_performance_traffic_source\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_source_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.238044Z", "completed_at": "2024-07-23T16:10:44.239372Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.251729Z", "completed_at": "2024-07-23T16:10:44.251742Z"}], "thread_id": "Thread-2", "execution_time": 0.021904706954956055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.app", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.239960Z", "completed_at": "2024-07-23T16:10:44.241410Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.253968Z", "completed_at": "2024-07-23T16:10:44.253973Z"}], "thread_id": "Thread-5", "execution_time": 0.023486852645874023, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.app_store_platform_version_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.242092Z", "completed_at": "2024-07-23T16:10:44.244558Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.256116Z", "completed_at": "2024-07-23T16:10:44.256127Z"}], "thread_id": "Thread-8", "execution_time": 0.024878740310668945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.app_store_source_type_device", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.244893Z", "completed_at": "2024-07-23T16:10:44.246141Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.256597Z", "completed_at": "2024-07-23T16:10:44.256600Z"}], "thread_id": "Thread-3", "execution_time": 0.024888038635253906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.app_store_territory_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.233374Z", "completed_at": "2024-07-23T16:10:44.246398Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.256993Z", "completed_at": "2024-07-23T16:10:44.256997Z"}], "thread_id": "Thread-1", "execution_time": 0.02862691879272461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__subscriptions_country_tmp", "compiled": true, "compiled_code": "\n\n\n \n \n \n \n \n select * \n from \"postgres\".\"zz_app_reporting\".\"financial_stats_subscriptions_country\"", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__subscriptions_country_tmp\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.246642Z", "completed_at": "2024-07-23T16:10:44.248030Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.257416Z", "completed_at": "2024-07-23T16:10:44.257420Z"}], "thread_id": "Thread-6", "execution_time": 0.025218963623046875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.crashes_app_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.252393Z", "completed_at": "2024-07-23T16:10:44.253693Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.258127Z", "completed_at": "2024-07-23T16:10:44.258131Z"}], "thread_id": "Thread-7", "execution_time": 0.02529311180114746, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.crashes_platform_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.254391Z", "completed_at": "2024-07-23T16:10:44.255823Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.258794Z", "completed_at": "2024-07-23T16:10:44.258798Z"}], "thread_id": "Thread-4", "execution_time": 0.021724939346313477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.downloads_platform_version_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.263941Z", "completed_at": "2024-07-23T16:10:44.266044Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.274084Z", "completed_at": "2024-07-23T16:10:44.274088Z"}], "thread_id": "Thread-2", "execution_time": 0.013823986053466797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.downloads_source_type_device", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.266444Z", "completed_at": "2024-07-23T16:10:44.267612Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.276693Z", "completed_at": "2024-07-23T16:10:44.276696Z"}], "thread_id": "Thread-5", "execution_time": 0.015942811965942383, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.downloads_territory_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.267996Z", "completed_at": "2024-07-23T16:10:44.269111Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.278397Z", "completed_at": "2024-07-23T16:10:44.278400Z"}], "thread_id": "Thread-8", "execution_time": 0.017142057418823242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.earnings", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.269396Z", "completed_at": "2024-07-23T16:10:44.270838Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.278734Z", "completed_at": "2024-07-23T16:10:44.278737Z"}], "thread_id": "Thread-3", "execution_time": 0.017233848571777344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.financial_stats_subscriptions_country", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.271180Z", "completed_at": "2024-07-23T16:10:44.272375Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.279064Z", "completed_at": "2024-07-23T16:10:44.279067Z"}], "thread_id": "Thread-1", "execution_time": 0.017348051071166992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.sales_account", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.272602Z", "completed_at": "2024-07-23T16:10:44.273845Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.279379Z", "completed_at": "2024-07-23T16:10:44.279382Z"}], "thread_id": "Thread-6", "execution_time": 0.017460107803344727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.sales_subscription_events", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.274471Z", "completed_at": "2024-07-23T16:10:44.276464Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.279922Z", "completed_at": "2024-07-23T16:10:44.279924Z"}], "thread_id": "Thread-7", "execution_time": 0.017595291137695312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.sales_subscription_summary", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.277082Z", "completed_at": "2024-07-23T16:10:44.278196Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.280550Z", "completed_at": "2024-07-23T16:10:44.280560Z"}], "thread_id": "Thread-4", "execution_time": 0.017878055572509766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_crashes_app_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.285872Z", "completed_at": "2024-07-23T16:10:44.287242Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.295374Z", "completed_at": "2024-07-23T16:10:44.295379Z"}], "thread_id": "Thread-2", "execution_time": 0.013229131698608398, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_crashes_os_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.287813Z", "completed_at": "2024-07-23T16:10:44.289002Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.297050Z", "completed_at": "2024-07-23T16:10:44.297053Z"}], "thread_id": "Thread-5", "execution_time": 0.014316797256469727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_crashes_overview", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.289397Z", "completed_at": "2024-07-23T16:10:44.290504Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.298678Z", "completed_at": "2024-07-23T16:10:44.298681Z"}], "thread_id": "Thread-8", "execution_time": 0.01538991928100586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_installs_app_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.290701Z", "completed_at": "2024-07-23T16:10:44.292545Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.299005Z", "completed_at": "2024-07-23T16:10:44.299008Z"}], "thread_id": "Thread-3", "execution_time": 0.015456914901733398, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_installs_country", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.292752Z", "completed_at": "2024-07-23T16:10:44.293887Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.299326Z", "completed_at": "2024-07-23T16:10:44.299328Z"}], "thread_id": "Thread-1", "execution_time": 0.015546083450317383, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_installs_device", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.294085Z", "completed_at": "2024-07-23T16:10:44.295180Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.299641Z", "completed_at": "2024-07-23T16:10:44.299643Z"}], "thread_id": "Thread-6", "execution_time": 0.015629053115844727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_installs_os_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.295744Z", "completed_at": "2024-07-23T16:10:44.296855Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.300177Z", "completed_at": "2024-07-23T16:10:44.300179Z"}], "thread_id": "Thread-7", "execution_time": 0.01577591896057129, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_installs_overview", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.297378Z", "completed_at": "2024-07-23T16:10:44.298481Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.301044Z", "completed_at": "2024-07-23T16:10:44.301052Z"}], "thread_id": "Thread-4", "execution_time": 0.01626110076904297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_ratings_app_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.306090Z", "completed_at": "2024-07-23T16:10:44.308225Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.315529Z", "completed_at": "2024-07-23T16:10:44.315534Z"}], "thread_id": "Thread-2", "execution_time": 0.013051748275756836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_ratings_country", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.308680Z", "completed_at": "2024-07-23T16:10:44.309866Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.317973Z", "completed_at": "2024-07-23T16:10:44.317975Z"}], "thread_id": "Thread-5", "execution_time": 0.014878988265991211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_ratings_device", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.310261Z", "completed_at": "2024-07-23T16:10:44.311393Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.319629Z", "completed_at": "2024-07-23T16:10:44.319632Z"}], "thread_id": "Thread-8", "execution_time": 0.01601266860961914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_ratings_os_version", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.311595Z", "completed_at": "2024-07-23T16:10:44.312689Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.319959Z", "completed_at": "2024-07-23T16:10:44.319962Z"}], "thread_id": "Thread-3", "execution_time": 0.016106128692626953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_ratings_overview", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.312885Z", "completed_at": "2024-07-23T16:10:44.313976Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.320276Z", "completed_at": "2024-07-23T16:10:44.320279Z"}], "thread_id": "Thread-1", "execution_time": 0.016187191009521484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_store_performance_country", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.314174Z", "completed_at": "2024-07-23T16:10:44.315327Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.320593Z", "completed_at": "2024-07-23T16:10:44.320596Z"}], "thread_id": "Thread-6", "execution_time": 0.016288042068481445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.stats_store_performance_traffic_source", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.315902Z", "completed_at": "2024-07-23T16:10:44.317761Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.321199Z", "completed_at": "2024-07-23T16:10:44.321208Z"}], "thread_id": "Thread-7", "execution_time": 0.016572237014770508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.usage_app_version_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.318311Z", "completed_at": "2024-07-23T16:10:44.319417Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.322061Z", "completed_at": "2024-07-23T16:10:44.322064Z"}], "thread_id": "Thread-4", "execution_time": 0.016967058181762695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.usage_platform_version_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.327567Z", "completed_at": "2024-07-23T16:10:44.329032Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.352151Z", "completed_at": "2024-07-23T16:10:44.352156Z"}], "thread_id": "Thread-2", "execution_time": 0.028522014617919922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.usage_source_type_device", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.329454Z", "completed_at": "2024-07-23T16:10:44.330722Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.357737Z", "completed_at": "2024-07-23T16:10:44.357749Z"}], "thread_id": "Thread-5", "execution_time": 0.03360581398010254, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.app_reporting_integration_tests.usage_territory_source_type", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.331161Z", "completed_at": "2024-07-23T16:10:44.332490Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.363378Z", "completed_at": "2024-07-23T16:10:44.363385Z"}], "thread_id": "Thread-8", "execution_time": 0.038645029067993164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_store_source.apple_store_country_codes", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.332770Z", "completed_at": "2024-07-23T16:10:44.334828Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:44.363797Z", "completed_at": "2024-07-23T16:10:44.363800Z"}], "thread_id": "Thread-3", "execution_time": 0.03872990608215332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.google_play_source.google_play__country_codes", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.358419Z", "completed_at": "2024-07-23T16:10:45.144561Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.145235Z", "completed_at": "2024-07-23T16:10:45.145242Z"}], "thread_id": "Thread-4", "execution_time": 0.8767080307006836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_opt_in_rate\n \n as \n \n app_opt_in_rate\n \n, \n \n \n asset_token\n \n as \n \n asset_token\n \n, \n \n \n icon_url\n \n as \n \n icon_url\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n ios\n \n as \n \n ios\n \n, \n \n \n is_bundle\n \n as \n \n is_bundle\n \n, \n \n \n is_enabled\n \n as \n \n is_enabled\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n pre_order_info\n \n as \n \n pre_order_info\n \n, \n \n \n tvos\n \n as \n \n tvos\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(id as bigint) as app_id,\n cast(name as TEXT) as app_name,\n is_enabled\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.347028Z", "completed_at": "2024-07-23T16:10:45.154315Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.154646Z", "completed_at": "2024-07-23T16:10:45.154653Z"}], "thread_id": "Thread-6", "execution_time": 0.8781239986419678, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_store_territory", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_territory_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n impressions_unique_device\n \n as \n \n impressions_unique_device\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n page_views\n \n as \n \n page_views\n \n, \n \n \n page_views_unique_device\n \n as \n \n page_views_unique_device\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n, \n \n \n territory\n \n as \n \n territory\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(territory as TEXT) as territory,\n cast(impressions as bigint) as impressions,\n cast(impressions_unique_device as bigint) as impressions_unique_device,\n cast(page_views as bigint) as page_views,\n cast(page_views_unique_device as bigint) as page_views_unique_device\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_territory\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.352541Z", "completed_at": "2024-07-23T16:10:45.244268Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.244854Z", "completed_at": "2024-07-23T16:10:45.244860Z"}], "thread_id": "Thread-7", "execution_time": 0.9909288883209229, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_store_platform_version", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_platform_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n impressions_unique_device\n \n as \n \n impressions_unique_device\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n page_views\n \n as \n \n page_views\n \n, \n \n \n page_views_unique_device\n \n as \n \n page_views_unique_device\n \n, \n \n \n platform_version\n \n as \n \n platform_version\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(platform_version as TEXT) as platform_version,\n cast(impressions as bigint) as impressions,\n cast(impressions_unique_device as bigint) as impressions_unique_device,\n cast(page_views as bigint) as page_views,\n cast(page_views_unique_device as bigint) as page_views_unique_device\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_platform_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.383272Z", "completed_at": "2024-07-23T16:10:45.245480Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.245920Z", "completed_at": "2024-07-23T16:10:45.245925Z"}], "thread_id": "Thread-3", "execution_time": 0.9612081050872803, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__downloads_device", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n first_time_downloads\n \n as \n \n first_time_downloads\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n, \n \n \n total_downloads\n \n as \n \n total_downloads\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(device as TEXT) as device,\n cast(first_time_downloads as bigint) as first_time_downloads,\n cast(redownloads as bigint) as redownloads,\n cast(total_downloads as bigint) as total_downloads\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.335058Z", "completed_at": "2024-07-23T16:10:45.244594Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.245159Z", "completed_at": "2024-07-23T16:10:45.245177Z"}], "thread_id": "Thread-1", "execution_time": 1.0041851997375488, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__app_store_device", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n impressions_unique_device\n \n as \n \n impressions_unique_device\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n page_views\n \n as \n \n page_views\n \n, \n \n \n page_views_unique_device\n \n as \n \n page_views_unique_device\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(device as TEXT) as device,\n cast(impressions as bigint) as impressions,\n cast(impressions_unique_device as bigint) as impressions_unique_device,\n cast(page_views as bigint) as page_views,\n cast(page_views_unique_device as bigint) as page_views_unique_device\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.374473Z", "completed_at": "2024-07-23T16:10:45.298433Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.298895Z", "completed_at": "2024-07-23T16:10:45.298902Z"}], "thread_id": "Thread-5", "execution_time": 0.9795880317687988, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__crashes_platform_version", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_platform_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n crashes\n \n as \n \n crashes\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n platform_version\n \n as \n \n platform_version\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(device as TEXT) as device,\n cast(platform_version as TEXT) as platform_version,\n cast(crashes as bigint) as crashes\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_platform_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.369366Z", "completed_at": "2024-07-23T16:10:45.319945Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.328072Z", "completed_at": "2024-07-23T16:10:45.328079Z"}], "thread_id": "Thread-2", "execution_time": 1.0240421295166016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__crashes_app_version", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n app_version\n \n as \n \n app_version\n \n, \n \n \n crashes\n \n as \n \n crashes\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(device as TEXT) as device,\n cast(app_version as TEXT) as app_version,\n cast(crashes as bigint) as crashes\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:44.378752Z", "completed_at": "2024-07-23T16:10:45.327784Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.330026Z", "completed_at": "2024-07-23T16:10:45.330030Z"}], "thread_id": "Thread-8", "execution_time": 1.0320777893066406, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__downloads_platform_version", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_platform_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n first_time_downloads\n \n as \n \n first_time_downloads\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n platform_version\n \n as \n \n platform_version\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n, \n \n \n total_downloads\n \n as \n \n total_downloads\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(platform_version as TEXT) as platform_version,\n cast(first_time_downloads as bigint) as first_time_downloads,\n cast(redownloads as bigint) as redownloads,\n cast(total_downloads as bigint) as total_downloads\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_platform_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.206666Z", "completed_at": "2024-07-23T16:10:45.960451Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.961439Z", "completed_at": "2024-07-23T16:10:45.961448Z"}], "thread_id": "Thread-4", "execution_time": 0.810154914855957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__sales_account", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(id as bigint) as account_id,\n cast(name as TEXT) as account_name\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.212459Z", "completed_at": "2024-07-23T16:10:45.961018Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.961919Z", "completed_at": "2024-07-23T16:10:45.961925Z"}], "thread_id": "Thread-6", "execution_time": 0.8193390369415283, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__downloads_territory", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_territory_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n first_time_downloads\n \n as \n \n first_time_downloads\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n, \n \n \n territory\n \n as \n \n territory\n \n, \n \n \n total_downloads\n \n as \n \n total_downloads\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(territory as TEXT) as territory,\n cast(first_time_downloads as bigint) as first_time_downloads,\n cast(redownloads as bigint) as redownloads,\n cast(total_downloads as bigint) as total_downloads\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_territory\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.320218Z", "completed_at": "2024-07-23T16:10:45.989678Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:45.990566Z", "completed_at": "2024-07-23T16:10:45.990573Z"}], "thread_id": "Thread-7", "execution_time": 0.7285351753234863, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__sales_subscription_events", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _filename\n \n as \n \n _filename\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _index\n \n as \n \n _index\n \n, \n \n \n account_number\n \n as \n \n account_number\n \n, \n \n \n app_apple_id\n \n as \n \n app_apple_id\n \n, \n \n \n app_name\n \n as \n \n app_name\n \n, \n \n \n cancellation_reason\n \n as \n \n cancellation_reason\n \n, \n \n \n consecutive_paid_periods\n \n as \n \n consecutive_paid_periods\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n days_before_canceling\n \n as \n \n days_before_canceling\n \n, \n \n \n days_canceled\n \n as \n \n days_canceled\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n event\n \n as \n \n event\n \n, \n \n \n event_date\n \n as \n \n event_date\n \n, \n \n \n marketing_opt_in_duration\n \n as \n \n marketing_opt_in_duration\n \n, \n \n \n original_start_date\n \n as \n \n original_start_date\n \n, \n \n \n previous_subscription_apple_id\n \n as \n \n previous_subscription_apple_id\n \n, \n \n \n previous_subscription_name\n \n as \n \n previous_subscription_name\n \n, \n \n \n proceeds_reason\n \n as \n \n proceeds_reason\n \n, \n \n \n promotional_offer_id\n \n as \n \n promotional_offer_id\n \n, \n \n \n promotional_offer_name\n \n as \n \n promotional_offer_name\n \n, \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n standard_subscription_duration\n \n as \n \n standard_subscription_duration\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n subscription_apple_id\n \n as \n \n subscription_apple_id\n \n, \n \n \n subscription_group_id\n \n as \n \n subscription_group_id\n \n, \n \n \n subscription_name\n \n as \n \n subscription_name\n \n, \n \n \n subscription_offer_duration\n \n as \n \n subscription_offer_duration\n \n, \n \n \n subscription_offer_type\n \n as \n \n subscription_offer_type\n \n, \n \n \n vendor_number\n \n as \n \n vendor_number\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(event_date as date) as date_day,\n cast(account_number as bigint) as account_id,\n cast(app_name as TEXT) as app_name,\n cast(subscription_name as TEXT) as subscription_name,\n cast(event as TEXT) as event,\n cast(country as TEXT) as country,\n cast(case\n when replace(state, ' ', '') = '' then cast(null as TEXT) else state\n end as TEXT) as state,\n cast(case \n when lower(device) like 'ipod%' then 'iPod' else device\n end as TEXT) as device,\n sum(cast(quantity as bigint)) as quantity\n from fields\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.392138Z", "completed_at": "2024-07-23T16:10:46.066578Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.066892Z", "completed_at": "2024-07-23T16:10:46.066900Z"}], "thread_id": "Thread-2", "execution_time": 0.7272570133209229, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_platform_version", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_platform_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n active_devices\n \n as \n \n active_devices\n \n, \n \n \n active_devices_last_30_days\n \n as \n \n active_devices_last_30_days\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deletions\n \n as \n \n deletions\n \n, \n \n \n installations\n \n as \n \n installations\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n platform_version\n \n as \n \n platform_version\n \n, \n \n \n sessions\n \n as \n \n sessions\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(platform_version as TEXT) as platform_version,\n cast(active_devices as bigint) as active_devices,\n cast(active_devices_last_30_days as bigint) as active_devices_last_30_days,\n cast(deletions as bigint) as deletions,\n cast(installations as bigint) as installations,\n cast(sessions as bigint) as sessions\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_platform_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.400820Z", "completed_at": "2024-07-23T16:10:46.127358Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.128503Z", "completed_at": "2024-07-23T16:10:46.128510Z"}], "thread_id": "Thread-8", "execution_time": 0.7846419811248779, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_territory", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_territory_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n active_devices\n \n as \n \n active_devices\n \n, \n \n \n active_devices_last_30_days\n \n as \n \n active_devices_last_30_days\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deletions\n \n as \n \n deletions\n \n, \n \n \n installations\n \n as \n \n installations\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n sessions\n \n as \n \n sessions\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n, \n \n \n territory\n \n as \n \n territory\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(territory as TEXT) as territory,\n cast(active_devices as bigint) as active_devices,\n cast(active_devices_last_30_days as bigint) as active_devices_last_30_days,\n cast(deletions as bigint) as deletions,\n cast(installations as bigint) as installations,\n cast(sessions as bigint) as sessions\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_territory\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.347782Z", "completed_at": "2024-07-23T16:10:46.127592Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.128718Z", "completed_at": "2024-07-23T16:10:46.128722Z"}], "thread_id": "Thread-5", "execution_time": 0.8384139537811279, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__sales_subscription_summary", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _filename\n \n as \n \n _filename\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _index\n \n as \n \n _index\n \n, \n \n \n account_number\n \n as \n \n account_number\n \n, \n \n \n active_free_trial_introductory_offer_subscriptions\n \n as \n \n active_free_trial_introductory_offer_subscriptions\n \n, \n \n \n active_pay_as_you_go_introductory_offer_subscriptions\n \n as \n \n active_pay_as_you_go_introductory_offer_subscriptions\n \n, \n \n \n active_pay_up_front_introductory_offer_subscriptions\n \n as \n \n active_pay_up_front_introductory_offer_subscriptions\n \n, \n \n \n active_standard_price_subscriptions\n \n as \n \n active_standard_price_subscriptions\n \n, \n \n \n app_apple_id\n \n as \n \n app_apple_id\n \n, \n \n \n app_name\n \n as \n \n app_name\n \n, \n \n \n billing_retry\n \n as \n \n billing_retry\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n customer_currency\n \n as \n \n customer_currency\n \n, \n \n \n customer_price\n \n as \n \n customer_price\n \n, \n \n \n developer_proceeds\n \n as \n \n developer_proceeds\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n free_trial_promotional_offer_subscriptions\n \n as \n \n free_trial_promotional_offer_subscriptions\n \n, \n \n \n grace_period\n \n as \n \n grace_period\n \n, \n \n \n marketing_opt_ins\n \n as \n \n marketing_opt_ins\n \n, \n \n \n pay_as_you_go_promotional_offer_subscriptions\n \n as \n \n pay_as_you_go_promotional_offer_subscriptions\n \n, \n \n \n pay_up_front_promotional_offer_subscriptions\n \n as \n \n pay_up_front_promotional_offer_subscriptions\n \n, \n \n \n proceeds_currency\n \n as \n \n proceeds_currency\n \n, \n \n \n proceeds_reason\n \n as \n \n proceeds_reason\n \n, \n \n \n promotional_offer_id\n \n as \n \n promotional_offer_id\n \n, \n \n \n promotional_offer_name\n \n as \n \n promotional_offer_name\n \n, \n \n \n standard_subscription_duration\n \n as \n \n standard_subscription_duration\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n subscription_apple_id\n \n as \n \n subscription_apple_id\n \n, \n \n \n subscription_group_id\n \n as \n \n subscription_group_id\n \n, \n \n \n subscription_name\n \n as \n \n subscription_name\n \n, \n \n \n vendor_number\n \n as \n \n vendor_number\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(\n\n to_date(\n \n\n \n \n\n split_part(\n _filename,\n '_',\n 3\n )\n\n\n \n\n, \n 'YYYYMMDD'\n )\n\n as date) as date_day, \n cast(app_name as TEXT) as app_name,\n cast(account_number as bigint) as account_id,\n cast(country as TEXT) as country,\n cast(case\n when replace(state, ' ', '') = '' then cast(null as TEXT) else state\n end as TEXT) as state,\n cast(subscription_name as TEXT) as subscription_name,\n cast(case \n when lower(device) like 'ipod%' then 'iPod' else device\n end as TEXT) as device,\n sum(cast(active_free_trial_introductory_offer_subscriptions as bigint)) as active_free_trial_introductory_offer_subscriptions,\n sum(cast(active_pay_as_you_go_introductory_offer_subscriptions as bigint)) as active_pay_as_you_go_introductory_offer_subscriptions,\n sum(cast(active_pay_up_front_introductory_offer_subscriptions as bigint)) as active_pay_up_front_introductory_offer_subscriptions,\n sum(cast(active_standard_price_subscriptions as bigint)) as active_standard_price_subscriptions\n from fields\n group by 1,2,3,4,5,6,7,8\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.339033Z", "completed_at": "2024-07-23T16:10:46.128084Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.128951Z", "completed_at": "2024-07-23T16:10:46.128955Z"}], "thread_id": "Thread-1", "execution_time": 0.8549079895019531, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_device", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n active_devices\n \n as \n \n active_devices\n \n, \n \n \n active_devices_last_30_days\n \n as \n \n active_devices_last_30_days\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deletions\n \n as \n \n deletions\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n installations\n \n as \n \n installations\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n sessions\n \n as \n \n sessions\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(device as TEXT) as device,\n cast(active_devices as bigint) as active_devices,\n cast(active_devices_last_30_days as bigint) as active_devices_last_30_days,\n cast(deletions as bigint) as deletions,\n cast(installations as bigint) as installations,\n cast(sessions as bigint) as sessions\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:45.332692Z", "completed_at": "2024-07-23T16:10:46.126696Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.127834Z", "completed_at": "2024-07-23T16:10:46.127840Z"}], "thread_id": "Thread-3", "execution_time": 0.85567307472229, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store_source.stg_apple_store__usage_app_version", "compiled": true, "compiled_code": "with base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_app_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n active_devices\n \n as \n \n active_devices\n \n, \n \n \n active_devices_last_30_days\n \n as \n \n active_devices_last_30_days\n \n, \n \n \n app_id\n \n as \n \n app_id\n \n, \n \n \n app_version\n \n as \n \n app_version\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deletions\n \n as \n \n deletions\n \n, \n \n \n installations\n \n as \n \n installations\n \n, \n \n \n meets_threshold\n \n as \n \n meets_threshold\n \n, \n \n \n sessions\n \n as \n \n sessions\n \n, \n \n \n source_type\n \n as \n \n source_type\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(date as date) as date_day,\n cast(app_id as bigint) as app_id,\n cast(source_type as TEXT) as source_type,\n cast(app_version as TEXT) as app_version,\n cast(active_devices as bigint) as active_devices,\n cast(active_devices_last_30_days as bigint) as active_devices_last_30_days,\n cast(deletions as bigint) as deletions,\n cast(installations as bigint) as installations,\n cast(sessions as bigint) as sessions\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.026681Z", "completed_at": "2024-07-23T16:10:46.718063Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.718491Z", "completed_at": "2024-07-23T16:10:46.718498Z"}], "thread_id": "Thread-6", "execution_time": 0.7509059906005859, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_crashes_os_version", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_os_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n android_os_version\n \n as \n \n android_os_version\n \n, \n \n \n daily_anrs\n \n as \n \n daily_anrs\n \n, \n \n \n daily_crashes\n \n as \n \n daily_crashes\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(android_os_version as TEXT) as android_os_version,\n cast(package_name as TEXT) as package_name,\n sum(cast(daily_anrs as bigint)) as anrs,\n sum(cast(daily_crashes as bigint)) as crashes\n from fields\n group by 1,2,3,4\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_os_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.017336Z", "completed_at": "2024-07-23T16:10:46.756853Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.757188Z", "completed_at": "2024-07-23T16:10:46.757194Z"}], "thread_id": "Thread-4", "execution_time": 0.8731300830841064, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_crashes_app_version", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_app_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n app_version_code\n \n as \n \n app_version_code\n \n, \n \n \n daily_anrs\n \n as \n \n daily_anrs\n \n, \n \n \n daily_crashes\n \n as \n \n daily_crashes\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(app_version_code as integer) as app_version_code,\n cast(package_name as TEXT) as package_name,\n sum(cast(daily_anrs as bigint)) as anrs,\n sum(cast(daily_crashes as bigint)) as crashes\n from fields\n group by 1,2,3,4\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.048543Z", "completed_at": "2024-07-23T16:10:46.757682Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.758167Z", "completed_at": "2024-07-23T16:10:46.758174Z"}], "thread_id": "Thread-7", "execution_time": 0.8424100875854492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_crashes_overview", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_overview_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n daily_anrs\n \n as \n \n daily_anrs\n \n, \n \n \n daily_crashes\n \n as \n \n daily_crashes\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(package_name as TEXT) as package_name,\n cast(daily_anrs as bigint) as anrs,\n cast(daily_crashes as bigint) as crashes,\n _fivetran_synced\n from fields\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_overview\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.120012Z", "completed_at": "2024-07-23T16:10:46.816511Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.816760Z", "completed_at": "2024-07-23T16:10:46.816766Z"}], "thread_id": "Thread-2", "execution_time": 0.8226361274719238, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__earnings", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__earnings_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n amount_buyer_currency_\n \n as \n \n amount_buyer_currency_\n \n, \n \n \n amount_merchant_currency_\n \n as \n \n amount_merchant_currency_\n \n, \n \n \n base_plan_id\n \n as \n \n base_plan_id\n \n, \n \n \n buyer_country\n \n as \n \n buyer_country\n \n, \n \n \n buyer_currency\n \n as \n \n buyer_currency\n \n, \n \n \n buyer_postal_code\n \n as \n \n buyer_postal_code\n \n, \n \n \n buyer_state\n \n as \n \n buyer_state\n \n, \n \n \n currency_conversion_rate\n \n as \n \n currency_conversion_rate\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n hardware\n \n as \n \n hardware\n \n, \n \n \n merchant_currency\n \n as \n \n merchant_currency\n \n, \n \n \n offer_id\n \n as \n \n offer_id\n \n, \n \n \n product_id\n \n as \n \n product_id\n \n, \n \n \n product_title\n \n as \n \n product_title\n \n, \n \n \n product_type\n \n as \n \n product_type\n \n, \n \n \n refund_type\n \n as \n \n refund_type\n \n, \n \n \n sku_id\n \n as \n \n sku_id\n \n, \n \n \n tax_type\n \n as \n \n tax_type\n \n, \n \n \n transaction_date\n \n as \n \n transaction_date\n \n, \n \n \n transaction_time\n \n as \n \n transaction_time\n \n, \n \n \n transaction_type\n \n as \n \n transaction_type\n \n\n\n\n \n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation, \n cast(amount_buyer_currency_ as numeric(28,6)) as amount_buyer_currency,\n cast(amount_merchant_currency_ as numeric(28,6)) as amount_merchant_currency,\n base_plan_id,\n cast(buyer_country as TEXT) as buyer_country,\n buyer_currency,\n buyer_postal_code,\n buyer_state,\n currency_conversion_rate,\n description as order_id,\n hardware as buyer_hardware,\n merchant_currency,\n offer_id,\n product_id as package_name,\n product_title,\n product_type,\n refund_type,\n cast(sku_id as TEXT) as sku_id,\n tax_type,\n\n -- dates are stored like 'Apr 1, 2022' -> gotta convert these to YYYY-MM-DD\n -- times are like '1:23:45 AM PDT'\n \n cast(transaction_date as date) as transaction_date,\n cast(cast(transaction_date as date) || ' ' || lpad(transaction_time, 15, '0') as timestamp)as transaction_pt_timestamp, -- the data type will be timestamp in UTC/no timezone but all timestamps in google play are PDT or PST\n\n right(transaction_time, 3) as transaction_timezone, -- either PST or PDT\n coalesce(transaction_type, 'Other') as transaction_type,\n _fivetran_synced\n from fields\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__earnings\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.190759Z", "completed_at": "2024-07-23T16:10:46.945347Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:46.951839Z", "completed_at": "2024-07-23T16:10:46.951847Z"}], "thread_id": "Thread-8", "execution_time": 0.8246860504150391, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_app_version", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_app_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n active_device_installs\n \n as \n \n active_device_installs\n \n, \n \n \n app_version_code\n \n as \n \n app_version_code\n \n, \n \n \n current_device_installs\n \n as \n \n current_device_installs\n \n, \n \n \n current_user_installs\n \n as \n \n current_user_installs\n \n, \n \n \n daily_device_installs\n \n as \n \n daily_device_installs\n \n, \n \n \n daily_device_uninstalls\n \n as \n \n daily_device_uninstalls\n \n, \n \n \n daily_device_upgrades\n \n as \n \n daily_device_upgrades\n \n, \n \n \n daily_user_installs\n \n as \n \n daily_user_installs\n \n, \n \n \n daily_user_uninstalls\n \n as \n \n daily_user_uninstalls\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n install_events\n \n as \n \n install_events\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_user_installs\n \n as \n \n total_user_installs\n \n, \n \n \n uninstall_events\n \n as \n \n uninstall_events\n \n, \n \n \n update_events\n \n as \n \n update_events\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(app_version_code as integer) as app_version_code,\n cast(package_name as TEXT) as package_name,\n sum(cast(active_device_installs as bigint)) as active_devices_last_30_days,\n sum(cast(daily_device_installs as bigint)) as device_installs,\n sum(cast(daily_device_uninstalls as bigint)) as device_uninstalls,\n sum(cast(daily_device_upgrades as bigint)) as device_upgrades,\n sum(cast(daily_user_installs as bigint)) as user_installs,\n sum(cast(daily_user_uninstalls as bigint)) as user_uninstalls,\n sum(cast(install_events as bigint)) as install_events,\n sum(cast(uninstall_events as bigint)) as uninstall_events,\n sum(cast(update_events as bigint)) as update_events\n from fields\n group by 1,2,3,4\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.197169Z", "completed_at": "2024-07-23T16:10:47.080574Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.081192Z", "completed_at": "2024-07-23T16:10:47.081198Z"}], "thread_id": "Thread-5", "execution_time": 0.953948974609375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_device", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_device_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n active_device_installs\n \n as \n \n active_device_installs\n \n, \n \n \n current_device_installs\n \n as \n \n current_device_installs\n \n, \n \n \n current_user_installs\n \n as \n \n current_user_installs\n \n, \n \n \n daily_device_installs\n \n as \n \n daily_device_installs\n \n, \n \n \n daily_device_uninstalls\n \n as \n \n daily_device_uninstalls\n \n, \n \n \n daily_device_upgrades\n \n as \n \n daily_device_upgrades\n \n, \n \n \n daily_user_installs\n \n as \n \n daily_user_installs\n \n, \n \n \n daily_user_uninstalls\n \n as \n \n daily_user_uninstalls\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n install_events\n \n as \n \n install_events\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_user_installs\n \n as \n \n total_user_installs\n \n, \n \n \n uninstall_events\n \n as \n \n uninstall_events\n \n, \n \n \n update_events\n \n as \n \n update_events\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(device as TEXT) as device, -- device_type\n cast(package_name as TEXT) as package_name,\n sum(cast(active_device_installs as bigint)) as active_devices_last_30_days,\n sum(cast(daily_device_installs as bigint)) as device_installs,\n sum(cast(daily_device_uninstalls as bigint)) as device_uninstalls,\n sum(cast(daily_device_upgrades as bigint)) as device_upgrades,\n sum(cast(daily_user_installs as bigint)) as user_installs,\n sum(cast(daily_user_uninstalls as bigint)) as user_uninstalls,\n sum(cast(install_events as bigint)) as install_events,\n sum(cast(uninstall_events as bigint)) as uninstall_events,\n sum(cast(update_events as bigint)) as update_events\n from fields\n group by 1,2,3,4\n\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.204404Z", "completed_at": "2024-07-23T16:10:47.080959Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.081667Z", "completed_at": "2024-07-23T16:10:47.081671Z"}], "thread_id": "Thread-1", "execution_time": 0.9525480270385742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_os_version", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_os_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n active_device_installs\n \n as \n \n active_device_installs\n \n, \n \n \n android_os_version\n \n as \n \n android_os_version\n \n, \n \n \n current_device_installs\n \n as \n \n current_device_installs\n \n, \n \n \n current_user_installs\n \n as \n \n current_user_installs\n \n, \n \n \n daily_device_installs\n \n as \n \n daily_device_installs\n \n, \n \n \n daily_device_uninstalls\n \n as \n \n daily_device_uninstalls\n \n, \n \n \n daily_device_upgrades\n \n as \n \n daily_device_upgrades\n \n, \n \n \n daily_user_installs\n \n as \n \n daily_user_installs\n \n, \n \n \n daily_user_uninstalls\n \n as \n \n daily_user_uninstalls\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n install_events\n \n as \n \n install_events\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_user_installs\n \n as \n \n total_user_installs\n \n, \n \n \n uninstall_events\n \n as \n \n uninstall_events\n \n, \n \n \n update_events\n \n as \n \n update_events\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(package_name as TEXT) as package_name,\n cast(android_os_version as TEXT) as android_os_version,\n sum(cast(active_device_installs as bigint)) as active_devices_last_30_days,\n sum(cast(daily_device_installs as bigint)) as device_installs,\n sum(cast(daily_device_uninstalls as bigint)) as device_uninstalls,\n sum(cast(daily_device_upgrades as bigint)) as device_upgrades,\n sum(cast(daily_user_installs as bigint)) as user_installs,\n sum(cast(daily_user_uninstalls as bigint)) as user_uninstalls,\n sum(cast(install_events as bigint)) as install_events,\n sum(cast(uninstall_events as bigint)) as uninstall_events,\n sum(cast(update_events as bigint)) as update_events\n from fields\n group by 1,2,3,4\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_os_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.210789Z", "completed_at": "2024-07-23T16:10:47.081444Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.081962Z", "completed_at": "2024-07-23T16:10:47.081967Z"}], "thread_id": "Thread-3", "execution_time": 0.9529416561126709, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_country", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_country_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n active_device_installs\n \n as \n \n active_device_installs\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n current_device_installs\n \n as \n \n current_device_installs\n \n, \n \n \n current_user_installs\n \n as \n \n current_user_installs\n \n, \n \n \n daily_device_installs\n \n as \n \n daily_device_installs\n \n, \n \n \n daily_device_uninstalls\n \n as \n \n daily_device_uninstalls\n \n, \n \n \n daily_device_upgrades\n \n as \n \n daily_device_upgrades\n \n, \n \n \n daily_user_installs\n \n as \n \n daily_user_installs\n \n, \n \n \n daily_user_uninstalls\n \n as \n \n daily_user_uninstalls\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n install_events\n \n as \n \n install_events\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_user_installs\n \n as \n \n total_user_installs\n \n, \n \n \n uninstall_events\n \n as \n \n uninstall_events\n \n, \n \n \n update_events\n \n as \n \n update_events\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(country as TEXT) as country,\n cast(package_name as TEXT) as package_name,\n sum(cast(active_device_installs as bigint)) as active_devices_last_30_days,\n sum(cast(daily_device_installs as bigint)) as device_installs,\n sum(cast(daily_device_uninstalls as bigint)) as device_uninstalls,\n sum(cast(daily_device_upgrades as bigint)) as device_upgrades,\n sum(cast(daily_user_installs as bigint)) as user_installs,\n sum(cast(daily_user_uninstalls as bigint)) as user_uninstalls,\n sum(cast(install_events as bigint)) as install_events,\n sum(cast(uninstall_events as bigint)) as uninstall_events,\n sum(cast(update_events as bigint)) as update_events\n from fields\n group by 1,2,3,4\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_country\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.778460Z", "completed_at": "2024-07-23T16:10:47.563375Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.563616Z", "completed_at": "2024-07-23T16:10:47.563622Z"}], "thread_id": "Thread-6", "execution_time": 0.83833909034729, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_installs_overview", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_overview_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n active_device_installs\n \n as \n \n active_device_installs\n \n, \n \n \n current_device_installs\n \n as \n \n current_device_installs\n \n, \n \n \n current_user_installs\n \n as \n \n current_user_installs\n \n, \n \n \n daily_device_installs\n \n as \n \n daily_device_installs\n \n, \n \n \n daily_device_uninstalls\n \n as \n \n daily_device_uninstalls\n \n, \n \n \n daily_device_upgrades\n \n as \n \n daily_device_upgrades\n \n, \n \n \n daily_user_installs\n \n as \n \n daily_user_installs\n \n, \n \n \n daily_user_uninstalls\n \n as \n \n daily_user_uninstalls\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n install_events\n \n as \n \n install_events\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_user_installs\n \n as \n \n total_user_installs\n \n, \n \n \n uninstall_events\n \n as \n \n uninstall_events\n \n, \n \n \n update_events\n \n as \n \n update_events\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(package_name as TEXT) as package_name,\n cast(active_device_installs as bigint) as active_devices_last_30_days,\n cast(daily_device_installs as bigint) as device_installs,\n cast(daily_device_uninstalls as bigint) as device_uninstalls,\n cast(daily_device_upgrades as bigint) as device_upgrades,\n cast(daily_user_installs as bigint) as user_installs,\n cast(daily_user_uninstalls as bigint) as user_uninstalls,\n cast(install_events as bigint) as install_events,\n cast(uninstall_events as bigint) as uninstall_events,\n cast(update_events as bigint) as update_events,\n _fivetran_synced\n from fields\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_overview\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.014021Z", "completed_at": "2024-07-23T16:10:47.746083Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.746937Z", "completed_at": "2024-07-23T16:10:47.746941Z"}], "thread_id": "Thread-8", "execution_time": 0.7976701259613037, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_device", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_device_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n daily_average_rating\n \n as \n \n daily_average_rating\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n device\n \n as \n \n device\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_average_rating\n \n as \n \n total_average_rating\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(device as TEXT) as device,\n cast(package_name as TEXT) as package_name,\n case when device is null then null else cast( nullif(cast(daily_average_rating as TEXT), 'NA') as float ) end as average_rating,\n case when device is null then null else total_average_rating end as rolling_total_average_rating\n from fields\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.952399Z", "completed_at": "2024-07-23T16:10:47.745707Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.746638Z", "completed_at": "2024-07-23T16:10:47.746645Z"}], "thread_id": "Thread-7", "execution_time": 0.8822593688964844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_country", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_country_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n daily_average_rating\n \n as \n \n daily_average_rating\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_average_rating\n \n as \n \n total_average_rating\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(country as TEXT) as country,\n cast(package_name as TEXT) as package_name,\n case when country is null then null else cast( nullif(cast(daily_average_rating as TEXT), 'NA') as float ) end as average_rating,\n case when country is null then null else total_average_rating end as rolling_total_average_rating\n from fields\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_country\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.812736Z", "completed_at": "2024-07-23T16:10:47.833679Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.834149Z", "completed_at": "2024-07-23T16:10:47.834157Z"}], "thread_id": "Thread-8", "execution_time": 0.022402048110961914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__app_source_relation__app_id.8b3ebfee12", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, app_id\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n group by source_relation, app_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.828317Z", "completed_at": "2024-07-23T16:10:47.835818Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.840228Z", "completed_at": "2024-07-23T16:10:47.840233Z"}], "thread_id": "Thread-7", "execution_time": 0.012650012969970703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__app_store_territory_source_relation__date_day__app_id__source_type__territory.d4a759ea32", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, territory\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_territory\"\n group by source_relation, date_day, app_id, source_type, territory\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.836068Z", "completed_at": "2024-07-23T16:10:47.844899Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.845202Z", "completed_at": "2024-07-23T16:10:47.845206Z"}], "thread_id": "Thread-8", "execution_time": 0.01014399528503418, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__app_store_platform_version_source_relation__date_day__app_id__source_type__platform_version.f38f8df8b1", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, platform_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_platform_version\"\n group by source_relation, date_day, app_id, source_type, platform_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.851953Z", "completed_at": "2024-07-23T16:10:47.859661Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.860029Z", "completed_at": "2024-07-23T16:10:47.860034Z"}], "thread_id": "Thread-7", "execution_time": 0.008725881576538086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__downloads_device_source_relation__date_day__app_id__source_type__device.0b46c778ff", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device\"\n group by source_relation, date_day, app_id, source_type, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.945959Z", "completed_at": "2024-07-23T16:10:47.746365Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.747196Z", "completed_at": "2024-07-23T16:10:47.747199Z"}], "thread_id": "Thread-4", "execution_time": 0.92171311378479, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_app_version", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_app_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n app_version_code\n \n as \n \n app_version_code\n \n, \n \n \n daily_average_rating\n \n as \n \n daily_average_rating\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_average_rating\n \n as \n \n total_average_rating\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(app_version_code as integer) as app_version_code,\n cast(package_name as TEXT) as package_name,\n case when app_version_code is null then null else cast( nullif(cast(daily_average_rating as TEXT), 'NA') as float ) end as average_rating,\n case when app_version_code is null then null else total_average_rating end as rolling_total_average_rating\n from fields\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.866296Z", "completed_at": "2024-07-23T16:10:47.874684Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.875557Z", "completed_at": "2024-07-23T16:10:47.875564Z"}], "thread_id": "Thread-8", "execution_time": 0.01359701156616211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__app_store_device_source_relation__date_day__app_id__source_type__device.019465f61c", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device\"\n group by source_relation, date_day, app_id, source_type, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.877491Z", "completed_at": "2024-07-23T16:10:47.888331Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.888617Z", "completed_at": "2024-07-23T16:10:47.888624Z"}], "thread_id": "Thread-7", "execution_time": 0.012686014175415039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__crashes_platform_version_source_relation__date_day__app_id__device__platform_version.5bf4ea102a", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, device, platform_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_platform_version\"\n group by source_relation, date_day, app_id, device, platform_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:46.957485Z", "completed_at": "2024-07-23T16:10:47.799871Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.800202Z", "completed_at": "2024-07-23T16:10:47.800209Z"}], "thread_id": "Thread-2", "execution_time": 0.957733154296875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_overview", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_overview_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n daily_average_rating\n \n as \n \n daily_average_rating\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_average_rating\n \n as \n \n total_average_rating\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(package_name as TEXT) as package_name,\n cast( nullif(cast(daily_average_rating as TEXT), 'NA') as float ) as average_rating,\n total_average_rating as rolling_total_average_rating,\n _fivetran_synced\n from fields\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_overview\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.896034Z", "completed_at": "2024-07-23T16:10:47.907332Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.908485Z", "completed_at": "2024-07-23T16:10:47.908493Z"}], "thread_id": "Thread-4", "execution_time": 0.017493247985839844, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__crashes_app_version_source_relation__date_day__app_id__device__app_version.2cba4b46da", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, device, app_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version\"\n group by source_relation, date_day, app_id, device, app_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.903177Z", "completed_at": "2024-07-23T16:10:47.909861Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.910759Z", "completed_at": "2024-07-23T16:10:47.910762Z"}], "thread_id": "Thread-8", "execution_time": 0.015673160552978516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__downloads_platform_version_source_relation__date_day__app_id__source_type__platform_version.b3f49f6945", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, platform_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_platform_version\"\n group by source_relation, date_day, app_id, source_type, platform_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.914742Z", "completed_at": "2024-07-23T16:10:47.925454Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.926327Z", "completed_at": "2024-07-23T16:10:47.926334Z"}], "thread_id": "Thread-2", "execution_time": 0.0171048641204834, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__downloads_territory_source_relation__date_day__app_id__source_type__territory.602f5096ce", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, territory\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_territory\"\n group by source_relation, date_day, app_id, source_type, territory\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.911123Z", "completed_at": "2024-07-23T16:10:47.925855Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.926803Z", "completed_at": "2024-07-23T16:10:47.926806Z"}], "thread_id": "Thread-7", "execution_time": 0.017848968505859375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__sales_account_source_relation__account_id.4e93cfed18", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, account_id\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account\"\n group by source_relation, account_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.927181Z", "completed_at": "2024-07-23T16:10:47.935526Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.939383Z", "completed_at": "2024-07-23T16:10:47.939388Z"}], "thread_id": "Thread-8", "execution_time": 0.01449894905090332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__sales_subscription_events_source_relation__date_day__account_id__app_name__subscription_name__device__event__country__state.89b9a03f45", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, account_id, app_name, subscription_name, device, event, country, state\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events\"\n group by source_relation, date_day, account_id, app_name, subscription_name, device, event, country, state\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.936143Z", "completed_at": "2024-07-23T16:10:47.949378Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.950251Z", "completed_at": "2024-07-23T16:10:47.950259Z"}], "thread_id": "Thread-2", "execution_time": 0.015943050384521484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__usage_platform_version_source_relation__date_day__app_id__source_type__platform_version.c82550bed4", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, platform_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_platform_version\"\n group by source_relation, date_day, app_id, source_type, platform_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.939780Z", "completed_at": "2024-07-23T16:10:47.950007Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.951271Z", "completed_at": "2024-07-23T16:10:47.951275Z"}], "thread_id": "Thread-7", "execution_time": 0.016616106033325195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__territory_report", "compiled": true, "compiled_code": "with app as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\napp_store_territory as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_territory\"\n),\n\ncountry_codes as (\n\n select * \n from \"postgres\".\"zz_app_reporting_apple_store_source\".\"apple_store_country_codes\"\n),\n\ndownloads_territory as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_territory\"\n),\n\nusage_territory as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_territory\"\n),\n\nreporting_grain as (\n\n select distinct\n source_relation,\n date_day,\n app_id,\n source_type,\n territory \n from app_store_territory\n),\n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.app_id,\n app.app_name,\n reporting_grain.source_type,\n reporting_grain.territory as territory_long,\n coalesce(official_country_codes.country_code_alpha_2, alternative_country_codes.country_code_alpha_2) as territory_short,\n coalesce(official_country_codes.region, alternative_country_codes.region) as region,\n coalesce(official_country_codes.sub_region, alternative_country_codes.sub_region) as sub_region,\n coalesce(app_store_territory.impressions, 0) as impressions,\n coalesce(app_store_territory.impressions_unique_device, 0) as impressions_unique_device,\n coalesce(app_store_territory.page_views, 0) as page_views,\n coalesce(app_store_territory.page_views_unique_device, 0) as page_views_unique_device,\n coalesce(downloads_territory.first_time_downloads, 0) as first_time_downloads,\n coalesce(downloads_territory.redownloads, 0) as redownloads,\n coalesce(downloads_territory.total_downloads, 0) as total_downloads,\n coalesce(usage_territory.active_devices, 0) as active_devices,\n coalesce(usage_territory.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(usage_territory.deletions, 0) as deletions,\n coalesce(usage_territory.installations, 0) as installations,\n coalesce(usage_territory.sessions, 0) as sessions\n from reporting_grain\n left join app \n on reporting_grain.app_id = app.app_id\n and reporting_grain.source_relation = app.source_relation\n left join app_store_territory \n on reporting_grain.date_day = app_store_territory.date_day\n and reporting_grain.source_relation = app_store_territory.source_relation\n and reporting_grain.app_id = app_store_territory.app_id \n and reporting_grain.source_type = app_store_territory.source_type\n and reporting_grain.territory = app_store_territory.territory\n left join downloads_territory\n on reporting_grain.date_day = downloads_territory.date_day\n and reporting_grain.source_relation = downloads_territory.source_relation\n and reporting_grain.app_id = downloads_territory.app_id \n and reporting_grain.source_type = downloads_territory.source_type\n and reporting_grain.territory = downloads_territory.territory\n left join usage_territory\n on reporting_grain.date_day = usage_territory.date_day\n and reporting_grain.source_relation = usage_territory.source_relation\n and reporting_grain.app_id = usage_territory.app_id \n and reporting_grain.source_type = usage_territory.source_type\n and reporting_grain.territory = usage_territory.territory\n left join country_codes as official_country_codes\n on reporting_grain.territory = official_country_codes.country_name\n left join country_codes as alternative_country_codes\n on reporting_grain.territory = alternative_country_codes.alternative_country_name\n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__territory_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.961135Z", "completed_at": "2024-07-23T16:10:47.973227Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.976505Z", "completed_at": "2024-07-23T16:10:47.976512Z"}], "thread_id": "Thread-2", "execution_time": 0.017102956771850586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__sales_subscription_summary_source_relation__date_day__account_id__app_name__subscription_name__device__country__state.4c663eea8c", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, account_id, app_name, subscription_name, device, country, state\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary\"\n group by source_relation, date_day, account_id, app_name, subscription_name, device, country, state\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.965786Z", "completed_at": "2024-07-23T16:10:47.976181Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.977422Z", "completed_at": "2024-07-23T16:10:47.977425Z"}], "thread_id": "Thread-4", "execution_time": 0.0176389217376709, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__usage_territory_source_relation__date_day__app_id__source_type__territory.2028f8f100", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, territory\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_territory\"\n group by source_relation, date_day, app_id, source_type, territory\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.981214Z", "completed_at": "2024-07-23T16:10:47.996564Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:47.996931Z", "completed_at": "2024-07-23T16:10:47.996938Z"}], "thread_id": "Thread-2", "execution_time": 0.01794886589050293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__usage_app_version_source_relation__date_day__app_id__source_type__app_version.29b2c0e4d2", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, app_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_app_version\"\n group by source_relation, date_day, app_id, source_type, app_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.988875Z", "completed_at": "2024-07-23T16:10:47.998296Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.002741Z", "completed_at": "2024-07-23T16:10:48.002746Z"}], "thread_id": "Thread-4", "execution_time": 0.022899866104125977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_crashes_os_version_source_relation__package_name__date_day__android_os_version.a6241d4e33", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, android_os_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_os_version\"\n group by source_relation, package_name, date_day, android_os_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.984964Z", "completed_at": "2024-07-23T16:10:47.998538Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.003176Z", "completed_at": "2024-07-23T16:10:48.003180Z"}], "thread_id": "Thread-7", "execution_time": 0.023640871047973633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store_source.dbt_utils_unique_combination_of_columns_stg_apple_store__usage_device_source_relation__date_day__app_id__source_type__device.aa048fdf6c", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device\"\n group by source_relation, date_day, app_id, source_type, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.992360Z", "completed_at": "2024-07-23T16:10:48.002231Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.003587Z", "completed_at": "2024-07-23T16:10:48.003591Z"}], "thread_id": "Thread-8", "execution_time": 0.023212909698486328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_crashes_app_version_source_relation__package_name__date_day__app_version_code.16488408eb", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, app_version_code\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_app_version\"\n group by source_relation, package_name, date_day, app_version_code\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.998765Z", "completed_at": "2024-07-23T16:10:48.018405Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.031966Z", "completed_at": "2024-07-23T16:10:48.031972Z"}], "thread_id": "Thread-2", "execution_time": 0.03429293632507324, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_crashes_overview_source_relation__package_name__date_day.15c14bf5fb", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_overview\"\n group by source_relation, package_name, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.053443Z", "completed_at": "2024-07-23T16:10:48.063562Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.064280Z", "completed_at": "2024-07-23T16:10:48.064284Z"}], "thread_id": "Thread-8", "execution_time": 0.031517744064331055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__earnings_source_relation__order_id__transaction_type__tax_type__amount_buyer_currency.cbb0102898", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, order_id, transaction_type, tax_type, amount_buyer_currency\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__earnings\"\n group by source_relation, order_id, transaction_type, tax_type, amount_buyer_currency\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.059081Z", "completed_at": "2024-07-23T16:10:48.065442Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.114270Z", "completed_at": "2024-07-23T16:10:48.114277Z"}], "thread_id": "Thread-2", "execution_time": 0.0645439624786377, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_installs_app_version_source_relation__package_name__date_day__app_version_code.827301f79d", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, app_version_code\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_app_version\"\n group by source_relation, package_name, date_day, app_version_code\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.065993Z", "completed_at": "2024-07-23T16:10:48.119673Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.120192Z", "completed_at": "2024-07-23T16:10:48.120198Z"}], "thread_id": "Thread-7", "execution_time": 0.05559396743774414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_installs_device_source_relation__package_name__date_day__device.e59a1803ff", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_device\"\n group by source_relation, package_name, date_day, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.158598Z", "completed_at": "2024-07-23T16:10:48.033223Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.034921Z", "completed_at": "2024-07-23T16:10:48.034926Z"}], "thread_id": "Thread-3", "execution_time": 0.9782211780548096, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__store_performance_source", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_source_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n search_term\n \n as \n \n search_term\n \n, \n \n \n store_listing_acquisitions\n \n as \n \n store_listing_acquisitions\n \n, \n \n \n store_listing_conversion_rate\n \n as \n \n store_listing_conversion_rate\n \n, \n \n \n store_listing_visitors\n \n as \n \n store_listing_visitors\n \n, \n \n \n traffic_source\n \n as \n \n traffic_source\n \n, \n \n \n utm_campaign\n \n as \n \n utm_campaign\n \n, \n \n \n utm_source\n \n as \n \n utm_source\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(package_name as TEXT) as package_name,\n traffic_source,\n search_term,\n utm_campaign,\n utm_source,\n cast(store_listing_acquisitions as bigint) as store_listing_acquisitions,\n store_listing_conversion_rate,\n cast(store_listing_visitors as bigint) as store_listing_visitors,\n -- make a surrogate key as the PK involves quite a few columns\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(package_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(traffic_source as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(search_term as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(utm_campaign as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(utm_source as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as traffic_source_unique_key,\n _fivetran_synced\n from fields\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_source\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.115469Z", "completed_at": "2024-07-23T16:10:48.124476Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.125571Z", "completed_at": "2024-07-23T16:10:48.125577Z"}], "thread_id": "Thread-8", "execution_time": 0.060006141662597656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_installs_os_version_source_relation__package_name__date_day__android_os_version.b30d0583ac", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, android_os_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_os_version\"\n group by source_relation, package_name, date_day, android_os_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.120611Z", "completed_at": "2024-07-23T16:10:48.125986Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.126928Z", "completed_at": "2024-07-23T16:10:48.126932Z"}], "thread_id": "Thread-2", "execution_time": 0.007984161376953125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_installs_country_source_relation__package_name__date_day__country.78328bbca0", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, country\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_country\"\n group by source_relation, package_name, date_day, country\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.152814Z", "completed_at": "2024-07-23T16:10:48.033723Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.049518Z", "completed_at": "2024-07-23T16:10:48.049525Z"}], "thread_id": "Thread-1", "execution_time": 0.9927101135253906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__store_performance_country", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_country_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n country_region\n \n as \n \n country_region\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n store_listing_acquisitions\n \n as \n \n store_listing_acquisitions\n \n, \n \n \n store_listing_conversion_rate\n \n as \n \n store_listing_conversion_rate\n \n, \n \n \n store_listing_visitors\n \n as \n \n store_listing_visitors\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(country_region as TEXT) as country_region,\n cast(package_name as TEXT) as package_name,\n sum(cast(store_listing_acquisitions as bigint)) as store_listing_acquisitions,\n avg(store_listing_conversion_rate) as store_listing_conversion_rate,\n sum(cast(store_listing_visitors as bigint)) as store_listing_visitors\n from fields\n group by 1,2,3,4\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_country\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.127544Z", "completed_at": "2024-07-23T16:10:48.141128Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.142258Z", "completed_at": "2024-07-23T16:10:48.142265Z"}], "thread_id": "Thread-7", "execution_time": 0.01716780662536621, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_installs_overview_source_relation__package_name__date_day.5fe2d4c377", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_overview\"\n group by source_relation, package_name, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.131661Z", "completed_at": "2024-07-23T16:10:48.142728Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.147280Z", "completed_at": "2024-07-23T16:10:48.147285Z"}], "thread_id": "Thread-3", "execution_time": 0.021142959594726562, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.google_play__device_report", "compiled": true, "compiled_code": "with installs as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_device\"\n), \n\nratings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_device\"\n), \n\ninstall_metrics as (\n\n select\n *,\n sum(device_installs) over (partition by source_relation, device, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs,\n sum(device_uninstalls) over (partition by source_relation, device, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from installs \n), \n\ndevice_join as (\n\n select \n -- these 4 columns are the grain of this model\n coalesce(install_metrics.source_relation, ratings.source_relation) as source_relation,\n coalesce(install_metrics.date_day, ratings.date_day) as date_day,\n coalesce(install_metrics.device, ratings.device) as device, -- device type\n coalesce(install_metrics.package_name, ratings.package_name) as package_name,\n\n -- metrics based on unique devices + users\n coalesce(install_metrics.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(install_metrics.device_installs, 0) as device_installs,\n coalesce(install_metrics.device_uninstalls, 0) as device_uninstalls,\n coalesce(install_metrics.device_upgrades, 0) as device_upgrades,\n coalesce(install_metrics.user_installs, 0) as user_installs,\n coalesce(install_metrics.user_uninstalls, 0) as user_uninstalls,\n \n -- metrics based on events. a user or device can have multiple installs in one day\n coalesce(install_metrics.install_events, 0) as install_events,\n coalesce(install_metrics.uninstall_events, 0) as uninstall_events,\n coalesce(install_metrics.update_events, 0) as update_events, \n\n -- all of the following fields (except average_rating) are rolling metrics that we'll use window functions to backfill instead of coalescing\n install_metrics.total_device_installs,\n install_metrics.total_device_uninstalls,\n ratings.average_rating, -- this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating\n ratings.rolling_total_average_rating\n from install_metrics\n full outer join ratings\n on install_metrics.date_day = ratings.date_day\n and install_metrics.source_relation = ratings.source_relation\n and install_metrics.package_name = ratings.package_name\n -- coalesce null device types otherwise they'll cause fanout with the full outer join\n and coalesce(install_metrics.device, 'null_device') = coalesce(ratings.device, 'null_device') -- in the source package we aggregate all null device-type records together into one batch per day\n), \n\n-- to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values\n-- we can't just use last_value(ignore nulls) because of postgres :/\ncreate_partitions as (\n\n select\n *, sum(case when rolling_total_average_rating is null \n then 0 else 1 end) over (partition by source_relation, device, package_name order by date_day asc rows unbounded preceding) as rolling_total_average_rating_partition, sum(case when total_device_installs is null \n then 0 else 1 end) over (partition by source_relation, device, package_name order by date_day asc rows unbounded preceding) as total_device_installs_partition, sum(case when total_device_uninstalls is null \n then 0 else 1 end) over (partition by source_relation, device, package_name order by date_day asc rows unbounded preceding) as total_device_uninstalls_partition\n from device_join\n), \n\n-- now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch\nfill_values as (\n\n select \n source_relation,\n date_day,\n device,\n package_name,\n active_devices_last_30_days,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n install_events,\n uninstall_events,\n update_events,\n average_rating\n\n , first_value( rolling_total_average_rating ) over (\n partition by source_relation, rolling_total_average_rating_partition, device, package_name order by date_day asc rows between unbounded preceding and current row) as rolling_total_average_rating, first_value( total_device_installs ) over (\n partition by source_relation, total_device_installs_partition, device, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs, first_value( total_device_uninstalls ) over (\n partition by source_relation, total_device_uninstalls_partition, device, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from create_partitions\n), \n\nfinal as (\n\n select \n source_relation,\n date_day,\n device,\n package_name,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n install_events,\n uninstall_events,\n update_events,\n active_devices_last_30_days,\n average_rating,\n\n -- leave null if there are no ratings yet\n rolling_total_average_rating,\n\n -- the first day will have NULL values, let's make it 0\n coalesce(total_device_installs, 0) as total_device_installs,\n coalesce(total_device_uninstalls, 0) as total_device_uninstalls,\n\n -- calculate difference rolling metric\n coalesce(total_device_installs, 0) - coalesce(total_device_uninstalls, 0) as net_device_installs\n from fill_values\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__device_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.138073Z", "completed_at": "2024-07-23T16:10:48.146687Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.148084Z", "completed_at": "2024-07-23T16:10:48.148091Z"}], "thread_id": "Thread-8", "execution_time": 0.017387866973876953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_ratings_device_source_relation__package_name__date_day__device.856ffd1245", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_device\"\n group by source_relation, package_name, date_day, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.142976Z", "completed_at": "2024-07-23T16:10:48.149407Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.155681Z", "completed_at": "2024-07-23T16:10:48.155689Z"}], "thread_id": "Thread-2", "execution_time": 0.018503189086914062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_ratings_country_source_relation__package_name__date_day__country.5c4427c5b6", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, country\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_country\"\n group by source_relation, package_name, date_day, country\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.149640Z", "completed_at": "2024-07-23T16:10:48.160818Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.183893Z", "completed_at": "2024-07-23T16:10:48.183908Z"}], "thread_id": "Thread-1", "execution_time": 0.03762197494506836, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.google_play__app_version_report", "compiled": true, "compiled_code": "with installs as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_app_version\"\n), \n\nratings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_app_version\"\n), \n\ncrashes as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_app_version\"\n), \n\ninstall_metrics as (\n\n select\n *,\n sum(device_installs) over (partition by source_relation, app_version_code, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs,\n sum(device_uninstalls) over (partition by source_relation, app_version_code, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from installs \n), \n\napp_version_join as (\n\n select \n -- these 4 columns are the grain of this model\n coalesce(install_metrics.source_relation, ratings.source_relation, crashes.source_relation) as source_relation,\n coalesce(install_metrics.date_day, ratings.date_day, crashes.date_day) as date_day,\n coalesce(install_metrics.app_version_code, ratings.app_version_code, crashes.app_version_code) as app_version_code,\n coalesce(install_metrics.package_name, ratings.package_name, crashes.package_name) as package_name,\n\n -- metrics based on unique devices + users\n coalesce(install_metrics.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(install_metrics.device_installs, 0) as device_installs,\n coalesce(install_metrics.device_uninstalls, 0) as device_uninstalls,\n coalesce(install_metrics.device_upgrades, 0) as device_upgrades,\n coalesce(install_metrics.user_installs, 0) as user_installs,\n coalesce(install_metrics.user_uninstalls, 0) as user_uninstalls,\n \n -- metrics based on events. a user or device can have multiple events in one day\n coalesce(crashes.crashes, 0) as crashes,\n coalesce(crashes.anrs, 0) as anrs,\n coalesce(install_metrics.install_events, 0) as install_events,\n coalesce(install_metrics.uninstall_events, 0) as uninstall_events,\n coalesce(install_metrics.update_events, 0) as update_events, \n\n -- all of the following fields (except average_rating) are rolling metrics that we'll use window functions to backfill instead of coalescing\n install_metrics.total_device_installs,\n install_metrics.total_device_uninstalls,\n ratings.average_rating, -- this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating\n ratings.rolling_total_average_rating\n from install_metrics\n full outer join ratings\n on install_metrics.date_day = ratings.date_day\n and install_metrics.source_relation = ratings.source_relation\n and install_metrics.package_name = ratings.package_name\n -- choosing an arbitrary negative integer as we can't coalesce with a string like 'null_version_code'. null app version codes will cause fanout\n and coalesce(install_metrics.app_version_code, -5) = coalesce(ratings.app_version_code, -5) -- this really doesn't happen IRL but let's be safe\n full outer join crashes\n on coalesce(install_metrics.date_day, ratings.date_day) = crashes.date_day\n and coalesce(install_metrics.source_relation, ratings.source_relation) = crashes.source_relation\n and coalesce(install_metrics.package_name, ratings.package_name) = crashes.package_name\n and coalesce(install_metrics.app_version_code, ratings.app_version_code, -5) = coalesce(crashes.app_version_code, -5)\n), \n\n-- to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values\n-- we can't just use last_value(ignore nulls) because of postgres :/\ncreate_partitions as (\n\n select\n *, sum(case when rolling_total_average_rating is null \n then 0 else 1 end) over (partition by source_relation, app_version_code, package_name order by date_day asc rows unbounded preceding) as rolling_total_average_rating_partition, sum(case when total_device_installs is null \n then 0 else 1 end) over (partition by source_relation, app_version_code, package_name order by date_day asc rows unbounded preceding) as total_device_installs_partition, sum(case when total_device_uninstalls is null \n then 0 else 1 end) over (partition by source_relation, app_version_code, package_name order by date_day asc rows unbounded preceding) as total_device_uninstalls_partition\n from app_version_join\n), \n\n-- now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch\nfill_values as (\n\n select \n source_relation,\n date_day,\n app_version_code,\n package_name,\n active_devices_last_30_days,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n crashes,\n anrs,\n install_events,\n uninstall_events,\n update_events,\n average_rating\n\n , first_value( rolling_total_average_rating ) over (\n partition by source_relation, rolling_total_average_rating_partition, app_version_code, package_name order by date_day asc rows between unbounded preceding and current row) as rolling_total_average_rating, first_value( total_device_installs ) over (\n partition by source_relation, total_device_installs_partition, app_version_code, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs, first_value( total_device_uninstalls ) over (\n partition by source_relation, total_device_uninstalls_partition, app_version_code, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from create_partitions\n), \n\nfinal as (\n\n select \n source_relation,\n date_day,\n app_version_code,\n package_name,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n crashes,\n anrs,\n install_events,\n uninstall_events,\n update_events,\n active_devices_last_30_days,\n average_rating,\n\n -- leave null if there are no ratings yet\n rolling_total_average_rating,\n\n -- the first day will have NULL values, let's make it 0\n coalesce(total_device_installs, 0) as total_device_installs,\n coalesce(total_device_uninstalls, 0) as total_device_uninstalls,\n\n -- calculate difference rolling metric\n coalesce(total_device_installs, 0) - coalesce(total_device_uninstalls, 0) as net_device_installs\n from fill_values\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__app_version_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.156550Z", "completed_at": "2024-07-23T16:10:48.190037Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.199476Z", "completed_at": "2024-07-23T16:10:48.199484Z"}], "thread_id": "Thread-7", "execution_time": 0.05085301399230957, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_ratings_app_version_source_relation__package_name__date_day__app_version_code.bcbc07a5b6", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, app_version_code\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_app_version\"\n group by source_relation, package_name, date_day, app_version_code\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.161294Z", "completed_at": "2024-07-23T16:10:48.203829Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.205142Z", "completed_at": "2024-07-23T16:10:48.205149Z"}], "thread_id": "Thread-3", "execution_time": 0.049826860427856445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__platform_version_report", "compiled": true, "compiled_code": "with __dbt__cte__int_apple_store__platform_version as (\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_platform_version\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day, \n app_id,\n platform_version,\n cast(null as TEXT) as source_type,\n sum(crashes) as crashes\n from base\n group by 1,2,3,4,5\n)\n\nselect * \nfrom aggregated\n), app as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\napp_store_platform_version as (\n \n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_platform_version\"\n),\n\ncrashes_platform_version as (\n \n select *\n from __dbt__cte__int_apple_store__platform_version\n),\n\ndownloads_platform_version as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_platform_version\"\n),\n\nusage_platform_version as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_platform_version\"\n),\n\nreporting_grain_combined as (\n\n select\n source_relation,\n date_day,\n app_id,\n source_type,\n platform_version\n from app_store_platform_version\n union all\n select \n source_relation,\n date_day,\n app_id,\n source_type,\n platform_version\n from crashes_platform_version\n),\n\nreporting_grain as (\n\n select \n distinct *\n from reporting_grain_combined\n\n),\n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.app_id, \n app.app_name,\n reporting_grain.source_type,\n reporting_grain.platform_version,\n coalesce(app_store_platform_version.impressions, 0) as impressions,\n coalesce(app_store_platform_version.impressions_unique_device, 0) as impressions_unique_device,\n coalesce(app_store_platform_version.page_views, 0) as page_views,\n coalesce(app_store_platform_version.page_views_unique_device, 0) as page_views_unique_device,\n coalesce(crashes_platform_version.crashes, 0) as crashes,\n coalesce(downloads_platform_version.first_time_downloads, 0) as first_time_downloads,\n coalesce(downloads_platform_version.redownloads, 0) as redownloads,\n coalesce(downloads_platform_version.total_downloads, 0) as total_downloads,\n coalesce(usage_platform_version.active_devices, 0) as active_devices,\n coalesce(usage_platform_version.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(usage_platform_version.deletions, 0) as deletions,\n coalesce(usage_platform_version.installations, 0) as installations,\n coalesce(usage_platform_version.sessions, 0) as sessions\n from reporting_grain\n left join app \n on reporting_grain.app_id = app.app_id\n and reporting_grain.source_relation = app.source_relation\n left join app_store_platform_version \n on reporting_grain.date_day = app_store_platform_version.date_day\n and reporting_grain.source_relation = app_store_platform_version.source_relation\n and reporting_grain.app_id = app_store_platform_version.app_id \n and reporting_grain.source_type = app_store_platform_version.source_type\n and reporting_grain.platform_version = app_store_platform_version.platform_version\n left join crashes_platform_version\n on reporting_grain.date_day = crashes_platform_version.date_day\n and reporting_grain.source_relation = crashes_platform_version.source_relation\n and reporting_grain.app_id = crashes_platform_version.app_id\n and reporting_grain.source_type = crashes_platform_version.source_type\n and reporting_grain.platform_version = crashes_platform_version.platform_version \n left join downloads_platform_version\n on reporting_grain.date_day = downloads_platform_version.date_day\n and reporting_grain.source_relation = downloads_platform_version.source_relation\n and reporting_grain.app_id = downloads_platform_version.app_id \n and reporting_grain.source_type = downloads_platform_version.source_type\n and reporting_grain.platform_version = downloads_platform_version.platform_version\n left join usage_platform_version\n on reporting_grain.date_day = usage_platform_version.date_day\n and reporting_grain.source_relation = usage_platform_version.source_relation\n and reporting_grain.app_id = usage_platform_version.app_id \n and reporting_grain.source_type = usage_platform_version.source_type\n and reporting_grain.platform_version = usage_platform_version.platform_version\n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__platform_version_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.146049Z", "completed_at": "2024-07-23T16:10:48.034709Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.057519Z", "completed_at": "2024-07-23T16:10:48.057525Z"}], "thread_id": "Thread-5", "execution_time": 1.062234878540039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__stats_ratings_os_version", "compiled": true, "compiled_code": "with base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_os_version_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n android_os_version\n \n as \n \n android_os_version\n \n, \n \n \n daily_average_rating\n \n as \n \n daily_average_rating\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n total_average_rating\n \n as \n \n total_average_rating\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(android_os_version as TEXT) as android_os_version,\n cast(package_name as TEXT) as package_name,\n case when android_os_version is null then null else cast( nullif(cast(daily_average_rating as TEXT), 'NA') as float ) end as average_rating,\n case when android_os_version is null then null else total_average_rating end as rolling_total_average_rating\n from fields\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_os_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.184445Z", "completed_at": "2024-07-23T16:10:48.206782Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.229853Z", "completed_at": "2024-07-23T16:10:48.229875Z"}], "thread_id": "Thread-8", "execution_time": 0.07370281219482422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__app_version_report", "compiled": true, "compiled_code": "with __dbt__cte__int_apple_store__crashes_app_version as (\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day, \n app_id,\n app_version,\n cast(null as TEXT) as source_type,\n sum(crashes) as crashes\n from base\n group by 1,2,3,4,5\n)\n\nselect * \nfrom aggregated\n), app as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\ncrashes_app_version_report as (\n \n select *\n from __dbt__cte__int_apple_store__crashes_app_version\n),\n\nusage_app_version_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_app_version\"\n),\n\nreporting_grain_combined as (\n \n select\n source_relation,\n date_day,\n app_id,\n source_type,\n app_version\n from usage_app_version_report\n union all \n select \n source_relation,\n date_day,\n app_id,\n source_type,\n app_version\n from crashes_app_version_report\n),\n\nreporting_grain as (\n\n select \n distinct *\n from reporting_grain_combined\n),\n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.app_id, \n app.app_name,\n reporting_grain.source_type,\n reporting_grain.app_version,\n coalesce(crashes_app_version_report.crashes, 0) as crashes,\n coalesce(usage_app_version_report.active_devices, 0) as active_devices,\n coalesce(usage_app_version_report.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(usage_app_version_report.deletions, 0) as deletions,\n coalesce(usage_app_version_report.installations, 0) as installations,\n coalesce(usage_app_version_report.sessions, 0) as sessions\n from reporting_grain\n left join app \n on reporting_grain.app_id = app.app_id\n and reporting_grain.source_relation = app.source_relation\n left join crashes_app_version_report\n on reporting_grain.date_day = crashes_app_version_report.date_day\n and reporting_grain.source_relation = crashes_app_version_report.source_relation\n and reporting_grain.app_id = crashes_app_version_report.app_id\n and reporting_grain.source_type = crashes_app_version_report.source_type\n and reporting_grain.app_version = crashes_app_version_report.app_version\n left join usage_app_version_report\n on reporting_grain.date_day = usage_app_version_report.date_day\n and reporting_grain.source_relation = usage_app_version_report.source_relation\n and reporting_grain.app_id = usage_app_version_report.app_id \n and reporting_grain.source_type = usage_app_version_report.source_type\n and reporting_grain.app_version = usage_app_version_report.app_version\n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__app_version_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.200270Z", "completed_at": "2024-07-23T16:10:48.213692Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.230817Z", "completed_at": "2024-07-23T16:10:48.230823Z"}], "thread_id": "Thread-2", "execution_time": 0.0509181022644043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_ratings_overview_source_relation__package_name__date_day.d0ee2b4dd6", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_overview\"\n group by source_relation, package_name, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.207401Z", "completed_at": "2024-07-23T16:10:48.243902Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.247938Z", "completed_at": "2024-07-23T16:10:48.247942Z"}], "thread_id": "Thread-1", "execution_time": 0.04359626770019531, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__subscription_report", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_apple_store__sales_subscription_summary as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary\"\n),\n\napp as (\n \n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\nsales_account as (\n \n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account\"\n),\n\njoined as (\n\n select \n base.source_relation,\n base.date_day,\n base.account_id,\n sales_account.account_name,\n app.app_id,\n base.app_name,\n base.subscription_name,\n base.country,\n base.state,\n sum(base.active_free_trial_introductory_offer_subscriptions) as active_free_trial_introductory_offer_subscriptions,\n sum(base.active_pay_as_you_go_introductory_offer_subscriptions) as active_pay_as_you_go_introductory_offer_subscriptions,\n sum(base.active_pay_up_front_introductory_offer_subscriptions) as active_pay_up_front_introductory_offer_subscriptions,\n sum(base.active_standard_price_subscriptions) as active_standard_price_subscriptions\n from base\n left join app \n on base.app_name = app.app_name\n and base.source_relation = app.source_relation\n left join sales_account \n on base.account_id = sales_account.account_id\n and base.source_relation = sales_account.source_relation\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom joined\n), __dbt__cte__int_apple_store__sales_subscription_events as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events\"\n),\n\napp as (\n \n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\nsales_account as (\n \n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account\"\n),\n\nfiltered as (\n\n select *\n from base \n where lower(event)\n in (\n \n \n 'renew'\n \n \n , \n \n 'cancel'\n \n \n , \n \n 'subscribe'\n \n )\n),\n\npivoted as (\n \n select\n date_day\n , source_relation\n , account_id\n , app_name\n , subscription_name\n , country\n , state\n \n , sum(case when lower(event) = 'renew' then quantity else 0 end) as event_renew\n \n , sum(case when lower(event) = 'cancel' then quantity else 0 end) as event_cancel\n \n , sum(case when lower(event) = 'subscribe' then quantity else 0 end) as event_subscribe\n \n from filtered\n group by 1,2,3,4,5,6,7\n),\n\njoined as (\n\n select \n pivoted.source_relation,\n pivoted.date_day,\n pivoted.account_id,\n sales_account.account_name,\n app.app_id,\n pivoted.app_name,\n pivoted.subscription_name,\n pivoted.country,\n pivoted.state\n \n , pivoted.event_renew\n \n , pivoted.event_cancel\n \n , pivoted.event_subscribe\n \n from pivoted\n left join app \n on pivoted.app_name = app.app_name\n and pivoted.source_relation = app.source_relation\n left join sales_account \n on pivoted.account_id = sales_account.account_id\n and pivoted.source_relation = sales_account.source_relation\n)\n\nselect * \nfrom joined\n), subscription_summary as (\n\n select *\n from __dbt__cte__int_apple_store__sales_subscription_summary\n),\n\nsubscription_events as (\n\n select *\n from __dbt__cte__int_apple_store__sales_subscription_events\n),\n\ncountry_codes as (\n \n select * \n from \"postgres\".\"zz_app_reporting_apple_store_source\".\"apple_store_country_codes\"\n),\n\nreporting_grain_combined as (\n\n select\n source_relation,\n cast(date_day as date) as date_day,\n account_id,\n account_name,\n app_name,\n app_id,\n subscription_name,\n country,\n state \n from subscription_summary\n union all\n select\n source_relation,\n cast(date_day as date) as date_day,\n account_id,\n account_name,\n app_name,\n app_id,\n subscription_name,\n country,\n state \n from subscription_events\n),\n\nreporting_grain as (\n\n select \n distinct *\n from reporting_grain_combined\n),\n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.account_id,\n reporting_grain.account_name, \n reporting_grain.app_id,\n reporting_grain.app_name,\n reporting_grain.subscription_name, \n case \n when country_codes.alternative_country_name is null then country_codes.country_name\n else country_codes.alternative_country_name\n end as territory_long,\n reporting_grain.country as territory_short,\n reporting_grain.state,\n country_codes.region, \n country_codes.sub_region,\n coalesce(subscription_summary.active_free_trial_introductory_offer_subscriptions, 0) as active_free_trial_introductory_offer_subscriptions,\n coalesce(subscription_summary.active_pay_as_you_go_introductory_offer_subscriptions, 0) as active_pay_as_you_go_introductory_offer_subscriptions,\n coalesce(subscription_summary.active_pay_up_front_introductory_offer_subscriptions, 0) as active_pay_up_front_introductory_offer_subscriptions,\n coalesce(subscription_summary.active_standard_price_subscriptions, 0) as active_standard_price_subscriptions\n \n \n , coalesce(subscription_events.event_renew, 0)\n as event_renew \n \n \n , coalesce(subscription_events.event_cancel, 0)\n as event_cancel \n \n \n , coalesce(subscription_events.event_subscribe, 0)\n as event_subscribe \n \n from reporting_grain\n left join subscription_summary\n on reporting_grain.date_day = subscription_summary.date_day\n and reporting_grain.source_relation = subscription_summary.source_relation\n and reporting_grain.account_id = subscription_summary.account_id \n and reporting_grain.app_name = subscription_summary.app_name\n and reporting_grain.subscription_name = subscription_summary.subscription_name\n and reporting_grain.country = subscription_summary.country\n and (reporting_grain.state = subscription_summary.state or (reporting_grain.state is null and subscription_summary.state is null))\n left join subscription_events\n on reporting_grain.date_day = subscription_events.date_day\n and reporting_grain.source_relation = subscription_events.source_relation\n and reporting_grain.account_id = subscription_events.account_id \n and reporting_grain.app_name = subscription_events.app_name\n and reporting_grain.subscription_name = subscription_events.subscription_name\n and reporting_grain.country = subscription_events.country\n and (reporting_grain.state = subscription_events.state or (reporting_grain.state is null and subscription_events.state is null))\n left join country_codes\n on reporting_grain.country = country_codes.country_code_alpha_2\n \n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__subscription_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.244771Z", "completed_at": "2024-07-23T16:10:48.252896Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.296541Z", "completed_at": "2024-07-23T16:10:48.296552Z"}], "thread_id": "Thread-3", "execution_time": 0.06615877151489258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_apple_store__country", "compiled": true, "compiled_code": "with country_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__territory_report\"\n),\n\nsubsetted as (\n\n select \n source_relation,\n date_day,\n 'apple_store' as app_platform,\n app_name, \n territory_long as country_long,\n territory_short as country_short,\n region,\n sub_region,\n sum(total_downloads) as downloads,\n sum(deletions) as deletions,\n sum(page_views) as page_views\n from country_report\n group by 1,2,3,4,5,6,7,8\n)\n\nselect * \nfrom subsetted", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__country\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.248306Z", "completed_at": "2024-07-23T16:10:48.296998Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.298450Z", "completed_at": "2024-07-23T16:10:48.298456Z"}], "thread_id": "Thread-5", "execution_time": 0.055995941162109375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__territory_report_source_relation__date_day__app_id__source_type__territory_long.1f8ce77eb8", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, territory_long\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__territory_report\"\n group by source_relation, date_day, app_id, source_type, territory_long\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.253170Z", "completed_at": "2024-07-23T16:10:48.301214Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.309679Z", "completed_at": "2024-07-23T16:10:48.309686Z"}], "thread_id": "Thread-8", "execution_time": 0.0652921199798584, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__device_report", "compiled": true, "compiled_code": "with __dbt__cte__int_apple_store__crashes_device as (\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day, \n app_id,\n device,\n cast(null as TEXT) as source_type,\n sum(crashes) as crashes\n from base\n group by 1,2,3,4,5\n)\n\nselect * \nfrom aggregated\n), __dbt__cte__int_apple_store__subscription_device as (\n\n\nwith app as (\n \n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\nsubscription_summary as (\n\n select\n source_relation,\n date_day,\n app_name,\n device,\n sum(active_free_trial_introductory_offer_subscriptions) as active_free_trial_introductory_offer_subscriptions,\n sum(active_pay_as_you_go_introductory_offer_subscriptions) as active_pay_as_you_go_introductory_offer_subscriptions,\n sum(active_pay_up_front_introductory_offer_subscriptions) as active_pay_up_front_introductory_offer_subscriptions,\n sum(active_standard_price_subscriptions) as active_standard_price_subscriptions\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary\"\n group by 1,2,3,4\n), \n\nfiltered_subscription_events as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events\" \n where lower(event)\n in (\n \n \n 'renew'\n \n \n , \n \n 'cancel'\n \n \n , \n \n 'subscribe'\n \n )\n),\n\npivoted_subscription_events as (\n \n select\n source_relation,\n date_day,\n app_name,\n device\n \n , sum(case when lower(event) = 'renew' then quantity else 0 end) as event_renew\n \n , sum(case when lower(event) = 'cancel' then quantity else 0 end) as event_cancel\n \n , sum(case when lower(event) = 'subscribe' then quantity else 0 end) as event_subscribe\n \n from filtered_subscription_events\n group by 1,2,3,4\n),\n\njoined as (\n\n select \n app.app_id,\n pivoted_subscription_events.*,\n subscription_summary.active_free_trial_introductory_offer_subscriptions,\n subscription_summary.active_pay_as_you_go_introductory_offer_subscriptions,\n subscription_summary.active_pay_up_front_introductory_offer_subscriptions,\n subscription_summary.active_standard_price_subscriptions,\n cast(null as TEXT) as source_type\n from subscription_summary \n left join pivoted_subscription_events\n on subscription_summary.date_day = pivoted_subscription_events.date_day\n and subscription_summary.source_relation = pivoted_subscription_events.source_relation\n and subscription_summary.app_name = pivoted_subscription_events.app_name\n and subscription_summary.device = pivoted_subscription_events.device\n left join app \n on subscription_summary.app_name = app.app_name\n and subscription_summary.source_relation = app.source_relation\n)\n\nselect * \nfrom joined\n), app as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\napp_store_device as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device\"\n),\n\ndownloads_device as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device\"\n),\n\nusage_device as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device\"\n),\n\ncrashes_device as (\n\n select *\n from __dbt__cte__int_apple_store__crashes_device\n),\n\n\nsubscription_device as (\n\n select *\n from __dbt__cte__int_apple_store__subscription_device\n),\n\n\nreporting_grain_combined as (\n\n select\n source_relation,\n date_day,\n app_id,\n source_type,\n device \n from app_store_device\n union all\n select\n source_relation,\n date_day,\n app_id,\n source_type,\n device\n from crashes_device\n),\n\nreporting_grain as (\n \n select\n distinct *\n from reporting_grain_combined\n),\n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.app_id, \n app.app_name,\n reporting_grain.source_type,\n reporting_grain.device,\n coalesce(app_store_device.impressions, 0) as impressions,\n coalesce(app_store_device.impressions_unique_device, 0) as impressions_unique_device,\n coalesce(app_store_device.page_views, 0) as page_views,\n coalesce(app_store_device.page_views_unique_device, 0) as page_views_unique_device,\n coalesce(crashes_device.crashes, 0) as crashes,\n coalesce(downloads_device.first_time_downloads, 0) as first_time_downloads,\n coalesce(downloads_device.redownloads, 0) as redownloads,\n coalesce(downloads_device.total_downloads, 0) as total_downloads,\n coalesce(usage_device.active_devices, 0) as active_devices,\n coalesce(usage_device.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(usage_device.deletions, 0) as deletions,\n coalesce(usage_device.installations, 0) as installations,\n coalesce(usage_device.sessions, 0) as sessions\n \n ,\n coalesce(subscription_device.active_free_trial_introductory_offer_subscriptions, 0) as active_free_trial_introductory_offer_subscriptions,\n coalesce(subscription_device.active_pay_as_you_go_introductory_offer_subscriptions, 0) as active_pay_a_you_go_introductory_offer_subscriptions,\n coalesce(subscription_device.active_pay_up_front_introductory_offer_subscriptions, 0) as active_pay_up_front_introductory_offer_subscriptions,\n coalesce(subscription_device.active_standard_price_subscriptions, 0) as active_standard_price_subscriptions\n \n \n , coalesce(subscription_device.event_renew, 0)\n as event_renew \n \n \n , coalesce(subscription_device.event_cancel, 0)\n as event_cancel \n \n \n , coalesce(subscription_device.event_subscribe, 0)\n as event_subscribe \n \n \n from reporting_grain\n left join app \n on reporting_grain.app_id = app.app_id\n and reporting_grain.source_relation = app.source_relation\n left join app_store_device \n on reporting_grain.date_day = app_store_device.date_day\n and reporting_grain.source_relation = app_store_device.source_relation\n and reporting_grain.app_id = app_store_device.app_id \n and reporting_grain.source_type = app_store_device.source_type\n and reporting_grain.device = app_store_device.device\n left join crashes_device\n on reporting_grain.date_day = crashes_device.date_day\n and reporting_grain.source_relation = crashes_device.source_relation\n and reporting_grain.app_id = crashes_device.app_id\n and reporting_grain.source_type = crashes_device.source_type\n and reporting_grain.device = crashes_device.device\n left join downloads_device\n on reporting_grain.date_day = downloads_device.date_day\n and reporting_grain.source_relation = downloads_device.source_relation\n and reporting_grain.app_id = downloads_device.app_id \n and reporting_grain.source_type = downloads_device.source_type\n and reporting_grain.device = downloads_device.device\n \n left join subscription_device\n on reporting_grain.date_day = subscription_device.date_day\n and reporting_grain.source_relation = subscription_device.source_relation\n and reporting_grain.app_id = subscription_device.app_id \n and reporting_grain.source_type = subscription_device.source_type\n and reporting_grain.device = subscription_device.device\n \n left join usage_device\n on reporting_grain.date_day = usage_device.date_day\n and reporting_grain.source_relation = usage_device.source_relation\n and reporting_grain.app_id = usage_device.app_id \n and reporting_grain.source_type = usage_device.source_type\n and reporting_grain.device = usage_device.device\n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__device_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.271664Z", "completed_at": "2024-07-23T16:10:48.301573Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.310131Z", "completed_at": "2024-07-23T16:10:48.310136Z"}], "thread_id": "Thread-2", "execution_time": 0.06288313865661621, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__source_type_report", "compiled": true, "compiled_code": "with __dbt__cte__int_apple_store__app_store_source_type as (\nwith base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day,\n app_id,\n source_type,\n sum(impressions) as impressions,\n sum(page_views) as page_views\n from base \n group by 1,2,3,4\n)\n\nselect * \nfrom aggregated\n), __dbt__cte__int_apple_store__downloads_source_type as (\nwith base as (\n \n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day,\n app_id,\n source_type,\n sum(first_time_downloads) as first_time_downloads,\n sum(redownloads) as redownloads,\n sum(total_downloads) as total_downloads\n from base \n group by 1,2,3,4\n)\n\nselect * \nfrom aggregated\n), __dbt__cte__int_apple_store__usage_source_type as (\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day,\n app_id,\n source_type,\n sum(active_devices) as active_devices,\n sum(deletions) as deletions,\n sum(installations) as installations,\n sum(sessions) as sessions\n from base\n group by 1,2,3,4\n)\n\nselect * \nfrom aggregated\n), app as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\napp_store_source_type as (\n\n select *\n from __dbt__cte__int_apple_store__app_store_source_type\n),\n\ndownloads_source_type as (\n\n select *\n from __dbt__cte__int_apple_store__downloads_source_type\n),\n\nusage_source_type as (\n\n select *\n from __dbt__cte__int_apple_store__usage_source_type\n),\n\nreporting_grain as (\n\n select distinct\n source_relation,\n date_day,\n app_id,\n source_type\n from app_store_source_type\n),\n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.app_id, \n app.app_name,\n reporting_grain.source_type,\n coalesce(app_store_source_type.impressions, 0) as impressions,\n coalesce(app_store_source_type.page_views, 0) as page_views,\n coalesce(downloads_source_type.first_time_downloads, 0) as first_time_downloads,\n coalesce(downloads_source_type.redownloads, 0) as redownloads,\n coalesce(downloads_source_type.total_downloads, 0) as total_downloads,\n coalesce(usage_source_type.active_devices, 0) as active_devices,\n coalesce(usage_source_type.deletions, 0) as deletions,\n coalesce(usage_source_type.installations, 0) as installations,\n coalesce(usage_source_type.sessions, 0) as sessions\n from reporting_grain\n left join app \n on reporting_grain.app_id = app.app_id\n and reporting_grain.source_relation = app.source_relation\n left join app_store_source_type\n on reporting_grain.date_day = app_store_source_type.date_day\n and reporting_grain.source_relation = app_store_source_type.source_relation\n and reporting_grain.app_id = app_store_source_type.app_id \n and reporting_grain.source_type = app_store_source_type.source_type\n left join downloads_source_type\n on reporting_grain.date_day = downloads_source_type.date_day\n and reporting_grain.source_relation = downloads_source_type.source_relation\n and reporting_grain.app_id = downloads_source_type.app_id \n and reporting_grain.source_type = downloads_source_type.source_type\n left join usage_source_type\n on reporting_grain.date_day = usage_source_type.date_day\n and reporting_grain.source_relation = usage_source_type.source_relation\n and reporting_grain.app_id = usage_source_type.app_id \n and reporting_grain.source_type = usage_source_type.source_type\n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__source_type_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.298891Z", "completed_at": "2024-07-23T16:10:48.311388Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.317346Z", "completed_at": "2024-07-23T16:10:48.317352Z"}], "thread_id": "Thread-7", "execution_time": 0.027951955795288086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_google_play__traffic_source", "compiled": true, "compiled_code": "with traffic_source_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_source\"\n),\n\nadapter as (\n\n select \n source_relation,\n date_day,\n 'google_play' as app_platform,\n package_name as app_name,\n traffic_source as traffic_source_type,\n sum(coalesce(store_listing_acquisitions, 0)) as downloads,\n sum(coalesce(store_listing_visitors, 0)) as page_views\n from traffic_source_report\n group by 1,2,3,4,5\n)\n\nselect * \nfrom adapter", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__traffic_source\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.301830Z", "completed_at": "2024-07-23T16:10:48.316839Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.323474Z", "completed_at": "2024-07-23T16:10:48.323484Z"}], "thread_id": "Thread-1", "execution_time": 0.027397871017456055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.not_null_stg_google_play__store_performance_source_traffic_source_unique_key.f2423ab9a8", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect traffic_source_unique_key\nfrom \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_source\"\nwhere traffic_source_unique_key is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.311959Z", "completed_at": "2024-07-23T16:10:48.324800Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.328824Z", "completed_at": "2024-07-23T16:10:48.328829Z"}], "thread_id": "Thread-3", "execution_time": 0.019921064376831055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.unique_stg_google_play__store_performance_source_traffic_source_unique_key.c42051d73b", "compiled": true, "compiled_code": "\n \n \n\nselect\n traffic_source_unique_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_source\"\nwhere traffic_source_unique_key is not null\ngroup by traffic_source_unique_key\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.318051Z", "completed_at": "2024-07-23T16:10:48.332443Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.333900Z", "completed_at": "2024-07-23T16:10:48.333908Z"}], "thread_id": "Thread-5", "execution_time": 0.023170948028564453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.google_play__country_report", "compiled": true, "compiled_code": "with installs as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_country\"\n), \n\nratings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_country\"\n), \n\nstore_performance as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_country\"\n), \n\ncountry_codes as (\n\n select *\n from \"postgres\".\"zz_app_reporting_google_play_source\".\"google_play__country_codes\"\n),\n\ninstall_metrics as (\n\n select\n *,\n sum(device_installs) over (partition by source_relation, country, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs,\n sum(device_uninstalls) over (partition by source_relation, country, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from installs \n), \n\nstore_performance_metrics as (\n\n select\n *,\n sum(store_listing_acquisitions) over (partition by source_relation, country_region, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_acquisitions,\n sum(store_listing_visitors) over (partition by source_relation, country_region, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_visitors\n from store_performance\n), \n\ncountry_join as (\n\n select \n -- these 4 columns are the grain of this model\n coalesce(install_metrics.source_relation, ratings.source_relation, store_performance_metrics.source_relation) as source_relation,\n coalesce(install_metrics.date_day, ratings.date_day, store_performance_metrics.date_day) as date_day,\n coalesce(install_metrics.country, ratings.country, store_performance_metrics.country_region) as country,\n coalesce(install_metrics.package_name, ratings.package_name, store_performance_metrics.package_name) as package_name,\n\n -- metrics based on unique devices + users\n coalesce(install_metrics.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(install_metrics.device_installs, 0) as device_installs,\n coalesce(install_metrics.device_uninstalls, 0) as device_uninstalls,\n coalesce(install_metrics.device_upgrades, 0) as device_upgrades,\n coalesce(install_metrics.user_installs, 0) as user_installs,\n coalesce(install_metrics.user_uninstalls, 0) as user_uninstalls,\n coalesce(store_performance_metrics.store_listing_acquisitions, 0) as store_listing_acquisitions,\n coalesce(store_performance_metrics.store_listing_visitors, 0) as store_listing_visitors,\n store_performance_metrics.store_listing_conversion_rate, -- not coalescing if there aren't any visitors \n \n -- metrics based on events. a user or device can have multiple installs in one day\n coalesce(install_metrics.install_events, 0) as install_events,\n coalesce(install_metrics.uninstall_events, 0) as uninstall_events,\n coalesce(install_metrics.update_events, 0) as update_events, \n\n -- all of the following fields (except %'s') are rolling metrics that we'll use window functions to backfill instead of coalescing\n install_metrics.total_device_installs,\n install_metrics.total_device_uninstalls,\n ratings.average_rating, -- this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating\n ratings.rolling_total_average_rating,\n store_performance_metrics.total_store_acquisitions,\n store_performance_metrics.total_store_visitors\n \n from install_metrics\n full outer join ratings\n on install_metrics.date_day = ratings.date_day\n and install_metrics.source_relation = ratings.source_relation\n and install_metrics.package_name = ratings.package_name\n -- coalesce null countries otherwise they'll cause fanout with the full outer join\n and coalesce(install_metrics.country, 'null_country') = coalesce(ratings.country, 'null_country') -- in the source package we aggregate all null country records together into one batch per day\n full outer join store_performance_metrics\n on store_performance_metrics.date_day = coalesce(install_metrics.date_day, ratings.date_day)\n and store_performance_metrics.source_relation = coalesce(install_metrics.source_relation, ratings.source_relation)\n and store_performance_metrics.package_name = coalesce(install_metrics.package_name, ratings.package_name)\n and coalesce(store_performance_metrics.country_region, 'null_country') = coalesce(install_metrics.country, ratings.country, 'null_country')\n), \n\n-- to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values\n-- we can't just use last_value(ignore nulls) because of postgres :/\ncreate_partitions as (\n\n select\n *, sum(case when rolling_total_average_rating is null \n then 0 else 1 end) over (partition by source_relation, country, package_name order by date_day asc rows unbounded preceding) as rolling_total_average_rating_partition, sum(case when total_device_installs is null \n then 0 else 1 end) over (partition by source_relation, country, package_name order by date_day asc rows unbounded preceding) as total_device_installs_partition, sum(case when total_device_uninstalls is null \n then 0 else 1 end) over (partition by source_relation, country, package_name order by date_day asc rows unbounded preceding) as total_device_uninstalls_partition, sum(case when total_store_acquisitions is null \n then 0 else 1 end) over (partition by source_relation, country, package_name order by date_day asc rows unbounded preceding) as total_store_acquisitions_partition, sum(case when total_store_visitors is null \n then 0 else 1 end) over (partition by source_relation, country, package_name order by date_day asc rows unbounded preceding) as total_store_visitors_partition\n from country_join\n), \n\n-- now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch\nfill_values as (\n\n select \n source_relation,\n date_day,\n country,\n package_name,\n active_devices_last_30_days,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n install_events,\n uninstall_events,\n update_events,\n store_listing_acquisitions, \n store_listing_visitors,\n store_listing_conversion_rate,\n average_rating\n\n , first_value( rolling_total_average_rating ) over (\n partition by source_relation, rolling_total_average_rating_partition, country, package_name order by date_day asc rows between unbounded preceding and current row) as rolling_total_average_rating, first_value( total_device_installs ) over (\n partition by source_relation, total_device_installs_partition, country, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs, first_value( total_device_uninstalls ) over (\n partition by source_relation, total_device_uninstalls_partition, country, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls, first_value( total_store_acquisitions ) over (\n partition by source_relation, total_store_acquisitions_partition, country, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_acquisitions, first_value( total_store_visitors ) over (\n partition by source_relation, total_store_visitors_partition, country, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_visitors\n from create_partitions\n), \n\nfinal as (\n\n select \n source_relation,\n date_day,\n country as country_short,\n coalesce(country_codes.alternative_country_name, country_codes.country_name) as country_long,\n country_codes.region,\n country_codes.sub_region,\n package_name,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n install_events,\n uninstall_events,\n update_events,\n store_listing_acquisitions,\n store_listing_visitors,\n store_listing_conversion_rate,\n active_devices_last_30_days,\n average_rating,\n\n -- leave null if there are no ratings yet\n rolling_total_average_rating, \n\n -- the first day will have NULL values, let's make it 0\n coalesce(total_device_installs, 0) as total_device_installs,\n coalesce(total_device_uninstalls, 0) as total_device_uninstalls,\n coalesce(total_store_acquisitions, 0) as total_store_acquisitions,\n coalesce(total_store_visitors, 0) as total_store_visitors,\n\n -- calculate percentage and difference rolling metrics\n round(cast(total_store_acquisitions as numeric(28,6)) / nullif(total_store_visitors, 0), 4) as rolling_store_conversion_rate,\n coalesce(total_device_installs, 0) - coalesce(total_device_uninstalls, 0) as net_device_installs\n from fill_values\n left join country_codes\n on country_codes.country_code_alpha_2 = fill_values.country\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__country_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.329212Z", "completed_at": "2024-07-23T16:10:48.338530Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.343526Z", "completed_at": "2024-07-23T16:10:48.343536Z"}], "thread_id": "Thread-2", "execution_time": 0.025910139083862305, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__store_performance_country_source_relation__package_name__date_day__country_region.b285211a0d", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, country_region\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_country\"\n group by source_relation, package_name, date_day, country_region\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.336262Z", "completed_at": "2024-07-23T16:10:48.345102Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.349335Z", "completed_at": "2024-07-23T16:10:48.349342Z"}], "thread_id": "Thread-7", "execution_time": 0.02097630500793457, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_google_play__device", "compiled": true, "compiled_code": "with device_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__device_report\"\n),\n\nadapter as (\n\n select \n source_relation,\n date_day,\n 'google_play' as app_platform,\n package_name as app_name,\n device,\n device_uninstalls as deletions,\n device_installs as downloads\n from device_report\n)\n\nselect * \nfrom adapter", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.340148Z", "completed_at": "2024-07-23T16:10:48.349945Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.356898Z", "completed_at": "2024-07-23T16:10:48.356907Z"}], "thread_id": "Thread-1", "execution_time": 0.02421712875366211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play.dbt_utils_unique_combination_of_columns_google_play__device_report_source_relation__package_name__date_day__device.266c6d5429", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__device_report\"\n group by source_relation, package_name, date_day, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.345685Z", "completed_at": "2024-07-23T16:10:48.356030Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.358158Z", "completed_at": "2024-07-23T16:10:48.358163Z"}], "thread_id": "Thread-3", "execution_time": 0.019259929656982422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_google_play__app_version", "compiled": true, "compiled_code": "with app_version_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__app_version_report\"\n),\n\nadapter as (\n\n select \n source_relation,\n date_day,\n 'google_play' as app_platform,\n package_name as app_name,\n cast(app_version_code as TEXT) as app_version,\n device_uninstalls as deletions,\n crashes\n from app_version_report\n)\n\nselect * \nfrom adapter", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.350875Z", "completed_at": "2024-07-23T16:10:48.363506Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.365243Z", "completed_at": "2024-07-23T16:10:48.365250Z"}], "thread_id": "Thread-5", "execution_time": 0.02082991600036621, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play.dbt_utils_unique_combination_of_columns_google_play__app_version_report_source_relation__package_name__date_day__app_version_code.7abbf03304", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, app_version_code\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__app_version_report\"\n group by source_relation, package_name, date_day, app_version_code\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.353898Z", "completed_at": "2024-07-23T16:10:48.363883Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.365693Z", "completed_at": "2024-07-23T16:10:48.365697Z"}], "thread_id": "Thread-8", "execution_time": 0.020920991897583008, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_apple_store__os_version", "compiled": true, "compiled_code": "with os_version_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__platform_version_report\"\n),\n\nsubsetted as (\n\n select \n source_relation,\n date_day,\n 'apple_store' as app_platform,\n app_name, \n platform_version as os_version,\n sum(total_downloads) as downloads,\n sum(deletions) as deletions,\n sum(crashes) as crashes\n from os_version_report\n group by 1,2,3,4,5\n)\n\nselect * \nfrom subsetted", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__os_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.359220Z", "completed_at": "2024-07-23T16:10:48.371810Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.376065Z", "completed_at": "2024-07-23T16:10:48.376078Z"}], "thread_id": "Thread-2", "execution_time": 0.02599310874938965, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__platform_version_report_source_relation__date_day__app_id__source_type__platform_version.f053b826be", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, platform_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__platform_version_report\"\n group by source_relation, date_day, app_id, source_type, platform_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.366373Z", "completed_at": "2024-07-23T16:10:48.377486Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.381612Z", "completed_at": "2024-07-23T16:10:48.381618Z"}], "thread_id": "Thread-7", "execution_time": 0.02316117286682129, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.google_play__os_version_report", "compiled": true, "compiled_code": "with installs as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_os_version\"\n), \n\nratings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_os_version\"\n), \n\ncrashes as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_os_version\"\n), \n\ninstall_metrics as (\n\n select\n *,\n sum(device_installs) over (partition by source_relation, android_os_version, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs,\n sum(device_uninstalls) over (partition by source_relation, android_os_version, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from installs \n), \n\napp_version_join as (\n\n select \n -- these 4 columns are the grain of this model\n coalesce(install_metrics.source_relation, ratings.source_relation, crashes.source_relation) as source_relation,\n coalesce(install_metrics.date_day, ratings.date_day, crashes.date_day) as date_day,\n coalesce(install_metrics.android_os_version, ratings.android_os_version, crashes.android_os_version) as android_os_version,\n coalesce(install_metrics.package_name, ratings.package_name, crashes.package_name) as package_name,\n\n -- metrics based on unique devices + users\n coalesce(install_metrics.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(install_metrics.device_installs, 0) as device_installs,\n coalesce(install_metrics.device_uninstalls, 0) as device_uninstalls,\n coalesce(install_metrics.device_upgrades, 0) as device_upgrades,\n coalesce(install_metrics.user_installs, 0) as user_installs,\n coalesce(install_metrics.user_uninstalls, 0) as user_uninstalls,\n \n -- metrics based on events. a user or device can have multiple events in one day\n coalesce(crashes.crashes, 0) as crashes,\n coalesce(crashes.anrs, 0) as anrs,\n coalesce(install_metrics.install_events, 0) as install_events,\n coalesce(install_metrics.uninstall_events, 0) as uninstall_events,\n coalesce(install_metrics.update_events, 0) as update_events, \n\n -- all of the following fields (except average_rating) are rolling metrics that we'll use window functions to backfill instead of coalescing\n install_metrics.total_device_installs,\n install_metrics.total_device_uninstalls,\n ratings.average_rating, -- this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating\n ratings.rolling_total_average_rating\n from install_metrics\n full outer join ratings\n on install_metrics.date_day = ratings.date_day\n and install_metrics.source_relation = ratings.source_relation\n and install_metrics.package_name = ratings.package_name\n -- coalesce null os versions otherwise they'll cause fanout with the full outer join\n and coalesce(install_metrics.android_os_version, 'null_os_version') = coalesce(ratings.android_os_version, 'null_os_version') -- in the source package we aggregate all null device-type records together into one batch per day\n full outer join crashes\n on coalesce(install_metrics.date_day, ratings.date_day) = crashes.date_day\n and coalesce(install_metrics.source_relation, ratings.source_relation) = crashes.source_relation\n and coalesce(install_metrics.package_name, ratings.package_name) = crashes.package_name\n -- coalesce null countries otherwise they'll cause fanout with the full outer join\n and coalesce(install_metrics.android_os_version, ratings.android_os_version, 'null_os_version') = coalesce(crashes.android_os_version, 'null_os_version') -- in the source package we aggregate all null device-type records together into one batch per day\n), \n\n-- to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values\n-- we can't just use last_value(ignore nulls) because of postgres :/\ncreate_partitions as (\n\n select\n *, sum(case when rolling_total_average_rating is null \n then 0 else 1 end) over (partition by source_relation, android_os_version, package_name order by date_day asc rows unbounded preceding) as rolling_total_average_rating_partition, sum(case when total_device_installs is null \n then 0 else 1 end) over (partition by source_relation, android_os_version, package_name order by date_day asc rows unbounded preceding) as total_device_installs_partition, sum(case when total_device_uninstalls is null \n then 0 else 1 end) over (partition by source_relation, android_os_version, package_name order by date_day asc rows unbounded preceding) as total_device_uninstalls_partition\n from app_version_join\n), \n\n-- now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch\nfill_values as (\n\n select \n source_relation,\n date_day,\n android_os_version,\n package_name,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n crashes,\n anrs,\n install_events,\n uninstall_events,\n update_events,\n active_devices_last_30_days,\n average_rating\n\n , first_value( rolling_total_average_rating ) over (\n partition by source_relation, rolling_total_average_rating_partition, android_os_version, package_name order by date_day asc rows between unbounded preceding and current row) as rolling_total_average_rating, first_value( total_device_installs ) over (\n partition by source_relation, total_device_installs_partition, android_os_version, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs, first_value( total_device_uninstalls ) over (\n partition by source_relation, total_device_uninstalls_partition, android_os_version, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from create_partitions\n), \n\nfinal as (\n\n select \n source_relation,\n date_day,\n android_os_version,\n package_name,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n crashes,\n anrs,\n install_events,\n uninstall_events,\n update_events,\n active_devices_last_30_days,\n average_rating,\n\n -- leave null if there are no ratings yet\n rolling_total_average_rating,\n\n -- the first day will have NULL values, let's make it 0\n coalesce(total_device_installs, 0) as total_device_installs,\n coalesce(total_device_uninstalls, 0) as total_device_uninstalls,\n\n -- calculate difference rolling metric\n coalesce(total_device_installs, 0) - coalesce(total_device_uninstalls, 0) as net_device_installs\n from fill_values\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__os_version_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.372900Z", "completed_at": "2024-07-23T16:10:48.382094Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.408937Z", "completed_at": "2024-07-23T16:10:48.408944Z"}], "thread_id": "Thread-1", "execution_time": 0.0441889762878418, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__stats_ratings_os_version_source_relation__package_name__date_day__android_os_version.e42db18deb", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, android_os_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_os_version\"\n group by source_relation, package_name, date_day, android_os_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.377715Z", "completed_at": "2024-07-23T16:10:48.392375Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.409875Z", "completed_at": "2024-07-23T16:10:48.409881Z"}], "thread_id": "Thread-3", "execution_time": 0.043878793716430664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_apple_store__app_version", "compiled": true, "compiled_code": "with app_version_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__app_version_report\"\n),\n\nsubsetted as (\n\n select \n source_relation,\n date_day,\n 'apple_store' as app_platform,\n app_name, \n cast(app_version as TEXT) as app_version,\n sum(deletions) as deletions,\n sum(crashes) as crashes\n from app_version_report\n group by 1,2,3,4,5\n)\n\nselect * \nfrom subsetted", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__app_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.386079Z", "completed_at": "2024-07-23T16:10:48.414722Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.416283Z", "completed_at": "2024-07-23T16:10:48.416289Z"}], "thread_id": "Thread-8", "execution_time": 0.03921198844909668, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_store.apple_store__overview_report", "compiled": true, "compiled_code": "with __dbt__cte__int_apple_store__app_store_overview as (\nwith base as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app_store_device\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day,\n app_id,\n sum(impressions) as impressions,\n sum(page_views) as page_views\n from base \n group by 1,2,3\n)\n\nselect * \nfrom aggregated\n), __dbt__cte__int_apple_store__crashes_overview as (\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__crashes_app_version\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day, \n app_id,\n sum(crashes) as crashes\n from base\n group by 1,2,3\n)\n\nselect * \nfrom aggregated\n), __dbt__cte__int_apple_store__downloads_overview as (\nwith base as (\n \n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__downloads_device\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day,\n app_id,\n sum(first_time_downloads) as first_time_downloads,\n sum(redownloads) as redownloads,\n sum(total_downloads) as total_downloads\n from base \n group by 1,2,3\n)\n\nselect * \nfrom aggregated\n), __dbt__cte__int_apple_store__sales_subscription_summary as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_summary\"\n),\n\napp as (\n \n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\nsales_account as (\n \n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account\"\n),\n\njoined as (\n\n select \n base.source_relation,\n base.date_day,\n base.account_id,\n sales_account.account_name,\n app.app_id,\n base.app_name,\n base.subscription_name,\n base.country,\n base.state,\n sum(base.active_free_trial_introductory_offer_subscriptions) as active_free_trial_introductory_offer_subscriptions,\n sum(base.active_pay_as_you_go_introductory_offer_subscriptions) as active_pay_as_you_go_introductory_offer_subscriptions,\n sum(base.active_pay_up_front_introductory_offer_subscriptions) as active_pay_up_front_introductory_offer_subscriptions,\n sum(base.active_standard_price_subscriptions) as active_standard_price_subscriptions\n from base\n left join app \n on base.app_name = app.app_name\n and base.source_relation = app.source_relation\n left join sales_account \n on base.account_id = sales_account.account_id\n and base.source_relation = sales_account.source_relation\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom joined\n), __dbt__cte__int_apple_store__sales_subscription_events as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_subscription_events\"\n),\n\napp as (\n \n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\nsales_account as (\n \n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__sales_account\"\n),\n\nfiltered as (\n\n select *\n from base \n where lower(event)\n in (\n \n \n 'renew'\n \n \n , \n \n 'cancel'\n \n \n , \n \n 'subscribe'\n \n )\n),\n\npivoted as (\n \n select\n date_day\n , source_relation\n , account_id\n , app_name\n , subscription_name\n , country\n , state\n \n , sum(case when lower(event) = 'renew' then quantity else 0 end) as event_renew\n \n , sum(case when lower(event) = 'cancel' then quantity else 0 end) as event_cancel\n \n , sum(case when lower(event) = 'subscribe' then quantity else 0 end) as event_subscribe\n \n from filtered\n group by 1,2,3,4,5,6,7\n),\n\njoined as (\n\n select \n pivoted.source_relation,\n pivoted.date_day,\n pivoted.account_id,\n sales_account.account_name,\n app.app_id,\n pivoted.app_name,\n pivoted.subscription_name,\n pivoted.country,\n pivoted.state\n \n , pivoted.event_renew\n \n , pivoted.event_cancel\n \n , pivoted.event_subscribe\n \n from pivoted\n left join app \n on pivoted.app_name = app.app_name\n and pivoted.source_relation = app.source_relation\n left join sales_account \n on pivoted.account_id = sales_account.account_id\n and pivoted.source_relation = sales_account.source_relation\n)\n\nselect * \nfrom joined\n), __dbt__cte__int_apple_store__sales_subscription_overview as (\n\n\nwith subscription_summary as (\n\n select\n source_relation,\n date_day,\n app_id,\n sum(active_free_trial_introductory_offer_subscriptions) as active_free_trial_introductory_offer_subscriptions,\n sum(active_pay_as_you_go_introductory_offer_subscriptions) as active_pay_as_you_go_introductory_offer_subscriptions,\n sum(active_pay_up_front_introductory_offer_subscriptions) as active_pay_up_front_introductory_offer_subscriptions,\n sum(active_standard_price_subscriptions) as active_standard_price_subscriptions\n from __dbt__cte__int_apple_store__sales_subscription_summary\n group by 1,2,3\n), \n\nsubscription_events as (\n\n select \n source_relation,\n date_day,\n app_id\n \n \n , coalesce(sum(event_renew), 0)\n as event_renew \n \n \n , coalesce(sum(event_cancel), 0)\n as event_cancel \n \n \n , coalesce(sum(event_subscribe), 0)\n as event_subscribe \n \n from __dbt__cte__int_apple_store__sales_subscription_events\n group by 1,2,3\n), \n\njoined as (\n\n select \n subscription_events.*,\n active_free_trial_introductory_offer_subscriptions,\n active_pay_as_you_go_introductory_offer_subscriptions,\n active_pay_up_front_introductory_offer_subscriptions,\n active_standard_price_subscriptions\n from subscription_summary \n left join subscription_events\n on subscription_summary.date_day = subscription_events.date_day\n and subscription_summary.source_relation = subscription_events.source_relation\n and subscription_summary.app_id = subscription_events.app_id \n)\n\nselect * \nfrom joined\n), __dbt__cte__int_apple_store__usage_overview as (\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__usage_device\"\n),\n\naggregated as (\n\n select \n source_relation,\n date_day,\n app_id,\n sum(active_devices) as active_devices,\n sum(deletions) as deletions,\n sum(installations) as installations,\n sum(sessions) as sessions\n from base\n group by 1,2,3\n)\n\nselect * \nfrom aggregated\n), app as (\n\n select * \n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_apple_store__app\"\n),\n\napp_store as (\n\n select *\n from __dbt__cte__int_apple_store__app_store_overview\n),\n\ncrashes as (\n\n select *\n from __dbt__cte__int_apple_store__crashes_overview\n),\n\ndownloads as (\n\n select *\n from __dbt__cte__int_apple_store__downloads_overview\n),\n\n\nsubscriptions as (\n\n select *\n from __dbt__cte__int_apple_store__sales_subscription_overview\n), \n\n\nusage as (\n\n select *\n from __dbt__cte__int_apple_store__usage_overview\n),\n\nreporting_grain as (\n\n select distinct\n source_relation,\n date_day,\n app_id \n from app_store\n), \n\njoined as (\n\n select \n reporting_grain.source_relation,\n reporting_grain.date_day,\n reporting_grain.app_id,\n app.app_name,\n coalesce(app_store.impressions, 0) as impressions,\n coalesce(app_store.page_views, 0) as page_views,\n coalesce(crashes.crashes,0) as crashes,\n coalesce(downloads.first_time_downloads, 0) as first_time_downloads,\n coalesce(downloads.redownloads, 0) as redownloads,\n coalesce(downloads.total_downloads, 0) as total_downloads,\n coalesce(usage.active_devices, 0) as active_devices,\n coalesce(usage.deletions, 0) as deletions,\n coalesce(usage.installations, 0) as installations,\n coalesce(usage.sessions, 0) as sessions\n \n ,\n coalesce(subscriptions.active_free_trial_introductory_offer_subscriptions, 0) as active_free_trial_introductory_offer_subscriptions,\n coalesce(subscriptions.active_pay_as_you_go_introductory_offer_subscriptions, 0) as active_pay_as_you_go_introductory_offer_subscriptions,\n coalesce(subscriptions.active_pay_up_front_introductory_offer_subscriptions, 0) as active_pay_up_front_introductory_offer_subscriptions,\n coalesce(subscriptions.active_standard_price_subscriptions, 0) as active_standard_price_subscriptions\n \n \n , coalesce(subscriptions.event_renew, 0)\n as event_renew \n \n \n , coalesce(subscriptions.event_cancel, 0)\n as event_cancel \n \n \n , coalesce(subscriptions.event_subscribe, 0)\n as event_subscribe \n \n \n from reporting_grain\n left join app \n on reporting_grain.app_id = app.app_id\n and reporting_grain.source_relation = app.source_relation\n left join app_store \n on reporting_grain.date_day = app_store.date_day\n and reporting_grain.source_relation = app_store.source_relation\n and reporting_grain.app_id = app_store.app_id\n left join crashes\n on reporting_grain.date_day = crashes.date_day\n and reporting_grain.source_relation = crashes.source_relation\n and reporting_grain.app_id = crashes.app_id\n left join downloads\n on reporting_grain.date_day = downloads.date_day\n and reporting_grain.source_relation = downloads.source_relation\n and reporting_grain.app_id = downloads.app_id\n \n left join subscriptions \n on reporting_grain.date_day = subscriptions.date_day\n and reporting_grain.source_relation = subscriptions.source_relation\n and reporting_grain.app_id = subscriptions.app_id\n \n left join usage\n on reporting_grain.date_day = usage.date_day\n and reporting_grain.source_relation = usage.source_relation\n and reporting_grain.app_id = usage.app_id \n)\n\nselect * \nfrom joined", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__overview_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.382656Z", "completed_at": "2024-07-23T16:10:48.415607Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.419819Z", "completed_at": "2024-07-23T16:10:48.419824Z"}], "thread_id": "Thread-5", "execution_time": 0.04317212104797363, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__app_version_report_source_relation__date_day__app_id__source_type__app_version.e43e9ef143", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, app_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__app_version_report\"\n group by source_relation, date_day, app_id, source_type, app_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.411046Z", "completed_at": "2024-07-23T16:10:48.419587Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.423302Z", "completed_at": "2024-07-23T16:10:48.423311Z"}], "thread_id": "Thread-2", "execution_time": 0.04107499122619629, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__subscription_report_source_relation__date_day__account_id__app_id__subscription_name__territory_long__state.77cd2fc10f", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, account_id, app_id, subscription_name, territory_long, state\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__subscription_report\"\n group by source_relation, date_day, account_id, app_id, subscription_name, territory_long, state\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.416749Z", "completed_at": "2024-07-23T16:10:48.424125Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.429865Z", "completed_at": "2024-07-23T16:10:48.429870Z"}], "thread_id": "Thread-7", "execution_time": 0.019512176513671875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_apple_store__device", "compiled": true, "compiled_code": "with device_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__device_report\"\n),\n\nsubsetted as (\n\n select \n source_relation,\n date_day,\n 'apple_store' as app_platform,\n app_name, \n device,\n sum(total_downloads) as downloads,\n sum(deletions) as deletions\n from device_report\n group by 1,2,3,4,5\n)\n\nselect * \nfrom subsetted", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__device\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.420997Z", "completed_at": "2024-07-23T16:10:48.430561Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.435065Z", "completed_at": "2024-07-23T16:10:48.435071Z"}], "thread_id": "Thread-1", "execution_time": 0.019861936569213867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_apple_store__traffic_source", "compiled": true, "compiled_code": "with traffic_source_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__source_type_report\"\n),\n\nsubsetted as (\n\n select \n source_relation,\n date_day,\n 'apple_store' as app_platform,\n app_name, \n source_type as traffic_source_type,\n sum(total_downloads) as downloads,\n sum(page_views) as page_views\n from traffic_source_report\n group by 1,2,3,4,5\n)\n\nselect * \nfrom subsetted", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__traffic_source\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.424352Z", "completed_at": "2024-07-23T16:10:48.431489Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.438095Z", "completed_at": "2024-07-23T16:10:48.438100Z"}], "thread_id": "Thread-3", "execution_time": 0.02223515510559082, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__device_report_source_relation__date_day__app_id__source_type__device.c04feac50f", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__device_report\"\n group by source_relation, date_day, app_id, source_type, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.431726Z", "completed_at": "2024-07-23T16:10:48.442811Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.475118Z", "completed_at": "2024-07-23T16:10:48.475134Z"}], "thread_id": "Thread-8", "execution_time": 0.0463252067565918, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__source_type_report_source_relation__date_day__app_id__source_type.5f6e6bf648", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id, source_type\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__source_type_report\"\n group by source_relation, date_day, app_id, source_type\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.435737Z", "completed_at": "2024-07-23T16:10:48.443624Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.487520Z", "completed_at": "2024-07-23T16:10:48.487527Z"}], "thread_id": "Thread-5", "execution_time": 0.057984113693237305, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_google_play__country", "compiled": true, "compiled_code": "with country_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__country_report\"\n),\n\nadapter as (\n\n select \n source_relation,\n date_day,\n 'google_play' as app_platform,\n package_name as app_name,\n country_long,\n country_short,\n region,\n sub_region,\n device_uninstalls as deletions,\n device_installs as downloads,\n store_listing_visitors as page_views\n from country_report\n)\n\nselect * \nfrom adapter", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__country\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.438822Z", "completed_at": "2024-07-23T16:10:48.486503Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.488364Z", "completed_at": "2024-07-23T16:10:48.488368Z"}], "thread_id": "Thread-2", "execution_time": 0.05765795707702637, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play.dbt_utils_unique_combination_of_columns_google_play__country_report_source_relation__package_name__date_day__country_short.1f14b27373", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, country_short\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__country_report\"\n group by source_relation, package_name, date_day, country_short\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.443861Z", "completed_at": "2024-07-23T16:10:48.491878Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.496973Z", "completed_at": "2024-07-23T16:10:48.496979Z"}], "thread_id": "Thread-7", "execution_time": 0.05921673774719238, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.google_play__overview_report", "compiled": true, "compiled_code": "with __dbt__cte__int_google_play__store_performance as (\nwith store_performance as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__store_performance_country\"\n), \n\nstore_performance_rollup as (\n\n select \n source_relation,\n date_day,\n package_name,\n sum(store_listing_acquisitions) as store_listing_acquisitions,\n sum(store_listing_visitors) as store_listing_visitors\n from store_performance\n group by 1,2,3\n),\n\nstore_performance_metrics as (\n\n select\n *,\n round(store_listing_acquisitions * 1.0 / nullif(store_listing_visitors, 0), 4) as store_listing_conversion_rate,\n sum(store_listing_acquisitions) over (partition by source_relation, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_acquisitions,\n sum(store_listing_visitors) over (partition by source_relation, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_visitors\n from store_performance_rollup\n)\n\nselect *\nfrom store_performance_metrics\n), installs as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_installs_overview\"\n), \n\nratings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_ratings_overview\"\n), \n\ncrashes as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__stats_crashes_overview\"\n), \n\nstore_performance as (\n\n select *\n from __dbt__cte__int_google_play__store_performance -- country rollup\n), \n\ninstall_metrics as (\n\n select\n *,\n sum(device_installs) over (partition by source_relation, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs,\n sum(device_uninstalls) over (partition by source_relation, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls\n from installs \n), \n\noverview_join as (\n\n select \n -- these 3 columns are the grain of this model\n coalesce(install_metrics.source_relation, ratings.source_relation, store_performance.source_relation, crashes.source_relation) as source_relation,\n coalesce(install_metrics.date_day, ratings.date_day, store_performance.date_day, crashes.date_day) as date_day,\n coalesce(install_metrics.package_name, ratings.package_name, store_performance.package_name, crashes.package_name) as package_name,\n\n -- metrics based on unique devices + users\n coalesce(install_metrics.active_devices_last_30_days, 0) as active_devices_last_30_days,\n coalesce(install_metrics.device_installs, 0) as device_installs,\n coalesce(install_metrics.device_uninstalls, 0) as device_uninstalls,\n coalesce(install_metrics.device_upgrades, 0) as device_upgrades,\n coalesce(install_metrics.user_installs, 0) as user_installs,\n coalesce(install_metrics.user_uninstalls, 0) as user_uninstalls,\n coalesce(store_performance.store_listing_acquisitions, 0) as store_listing_acquisitions,\n coalesce(store_performance.store_listing_visitors, 0) as store_listing_visitors,\n store_performance.store_listing_conversion_rate, -- not coalescing if there aren't any visitors \n\n -- metrics based on events. a user or device can have multiple installs in one day\n coalesce(crashes.crashes, 0) as crashes,\n coalesce(crashes.anrs, 0) as anrs,\n coalesce(install_metrics.install_events, 0) as install_events,\n coalesce(install_metrics.uninstall_events, 0) as uninstall_events,\n coalesce(install_metrics.update_events, 0) as update_events, \n\n -- all of the following fields (except average_rating) are rolling metrics that we'll use window functions to backfill instead of coalescing\n install_metrics.total_device_installs,\n install_metrics.total_device_uninstalls,\n ratings.average_rating, -- this one actually isn't rolling but we won't coalesce days with no reviews to 0 rating. todo: move\n ratings.rolling_total_average_rating,\n store_performance.total_store_acquisitions,\n store_performance.total_store_visitors\n from install_metrics\n full outer join ratings\n on install_metrics.date_day = ratings.date_day\n and install_metrics.source_relation = ratings.source_relation\n and install_metrics.package_name = ratings.package_name\n full outer join store_performance\n on store_performance.date_day = coalesce(install_metrics.date_day, ratings.date_day)\n and store_performance.source_relation = coalesce(install_metrics.source_relation, ratings.source_relation)\n and store_performance.package_name = coalesce(install_metrics.package_name, ratings.package_name)\n full outer join crashes\n on coalesce(install_metrics.date_day, ratings.date_day, store_performance.date_day) = crashes.date_day\n and coalesce(install_metrics.source_relation, ratings.source_relation, store_performance.source_relation) = crashes.source_relation\n and coalesce(install_metrics.package_name, ratings.package_name, store_performance.package_name) = crashes.package_name\n),\n\n-- to backfill in days with NULL values for rolling metrics, we'll create partitions to batch them together with records that have non-null values\n-- we can't just use last_value(ignore nulls) because of postgres :/\ncreate_partitions as (\n\n select\n *, sum(case when rolling_total_average_rating is null \n then 0 else 1 end) over (partition by source_relation, package_name order by date_day asc rows unbounded preceding) as rolling_total_average_rating_partition, sum(case when total_device_installs is null \n then 0 else 1 end) over (partition by source_relation, package_name order by date_day asc rows unbounded preceding) as total_device_installs_partition, sum(case when total_device_uninstalls is null \n then 0 else 1 end) over (partition by source_relation, package_name order by date_day asc rows unbounded preceding) as total_device_uninstalls_partition, sum(case when total_store_acquisitions is null \n then 0 else 1 end) over (partition by source_relation, package_name order by date_day asc rows unbounded preceding) as total_store_acquisitions_partition, sum(case when total_store_visitors is null \n then 0 else 1 end) over (partition by source_relation, package_name order by date_day asc rows unbounded preceding) as total_store_visitors_partition\n from overview_join\n), \n\n-- now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch\nfill_values as (\n\n select \n source_relation,\n date_day,\n package_name,\n active_devices_last_30_days,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n crashes,\n anrs,\n install_events,\n uninstall_events,\n update_events,\n store_listing_acquisitions,\n store_listing_visitors,\n store_listing_conversion_rate,\n average_rating\n\n , first_value( rolling_total_average_rating ) over (\n partition by source_relation, rolling_total_average_rating_partition, package_name order by date_day asc rows between unbounded preceding and current row) as rolling_total_average_rating, first_value( total_device_installs ) over (\n partition by source_relation, total_device_installs_partition, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_installs, first_value( total_device_uninstalls ) over (\n partition by source_relation, total_device_uninstalls_partition, package_name order by date_day asc rows between unbounded preceding and current row) as total_device_uninstalls, first_value( total_store_acquisitions ) over (\n partition by source_relation, total_store_acquisitions_partition, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_acquisitions, first_value( total_store_visitors ) over (\n partition by source_relation, total_store_visitors_partition, package_name order by date_day asc rows between unbounded preceding and current row) as total_store_visitors\n from create_partitions\n), \n\nfinal as (\n\n select \n source_relation,\n date_day,\n package_name,\n device_installs,\n device_uninstalls,\n device_upgrades,\n user_installs,\n user_uninstalls,\n crashes,\n anrs,\n install_events,\n uninstall_events,\n update_events,\n store_listing_acquisitions,\n store_listing_visitors,\n store_listing_conversion_rate,\n active_devices_last_30_days,\n average_rating,\n\n -- leave null if there are no ratings yet\n rolling_total_average_rating, \n\n -- the first day will have NULL values, let's make it 0\n coalesce(total_device_installs, 0) as total_device_installs,\n coalesce(total_device_uninstalls, 0) as total_device_uninstalls,\n coalesce(total_store_acquisitions, 0) as total_store_acquisitions,\n coalesce(total_store_visitors, 0) as total_store_visitors,\n\n -- calculate percentage and difference rolling metrics\n round( cast(total_store_acquisitions as numeric(28,6)) / nullif(total_store_visitors, 0), 4) as rolling_store_conversion_rate,\n coalesce(total_device_installs, 0) - coalesce(total_device_uninstalls, 0) as net_device_installs\n from fill_values\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__overview_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.489471Z", "completed_at": "2024-07-23T16:10:48.498458Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.519089Z", "completed_at": "2024-07-23T16:10:48.519096Z"}], "thread_id": "Thread-1", "execution_time": 0.07581806182861328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_google_play__os_version", "compiled": true, "compiled_code": "with os_version_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__os_version_report\"\n),\n\nadapter as (\n\n select \n source_relation,\n date_day,\n 'google_play' as app_platform,\n package_name as app_name,\n android_os_version as os_version,\n device_uninstalls as deletions,\n device_installs as downloads,\n crashes\n from os_version_report\n)\n\nselect * \nfrom adapter", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__os_version\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.493363Z", "completed_at": "2024-07-23T16:10:48.505005Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.521855Z", "completed_at": "2024-07-23T16:10:48.521867Z"}], "thread_id": "Thread-3", "execution_time": 0.0350649356842041, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play.dbt_utils_unique_combination_of_columns_google_play__os_version_report_source_relation__package_name__date_day__android_os_version.8520366a30", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, android_os_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__os_version_report\"\n group by source_relation, package_name, date_day, android_os_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.519713Z", "completed_at": "2024-07-23T16:10:48.539261Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.540773Z", "completed_at": "2024-07-23T16:10:48.540779Z"}], "thread_id": "Thread-5", "execution_time": 0.04349994659423828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_apple_store__overview", "compiled": true, "compiled_code": "with overview_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__overview_report\"\n),\n\nsubsetted as (\n\n select \n source_relation,\n date_day,\n 'apple_store' as app_platform,\n app_name, \n total_downloads as downloads,\n deletions,\n page_views,\n crashes\n from overview_report\n)\n\nselect * \nfrom subsetted", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__overview\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.529537Z", "completed_at": "2024-07-23T16:10:48.539721Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.541462Z", "completed_at": "2024-07-23T16:10:48.541466Z"}], "thread_id": "Thread-2", "execution_time": 0.04346323013305664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_store.dbt_utils_unique_combination_of_columns_apple_store__overview_report_source_relation__date_day__app_id.22a03a68cc", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_id\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"apple_store__overview_report\"\n group by source_relation, date_day, app_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.555738Z", "completed_at": "2024-07-23T16:10:48.559188Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.559818Z", "completed_at": "2024-07-23T16:10:48.559826Z"}], "thread_id": "Thread-2", "execution_time": 0.007727146148681641, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play.dbt_utils_unique_combination_of_columns_google_play__overview_report_source_relation__package_name__date_day.00e17d5062", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__overview_report\"\n group by source_relation, package_name, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.553587Z", "completed_at": "2024-07-23T16:10:48.559429Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.560308Z", "completed_at": "2024-07-23T16:10:48.560312Z"}], "thread_id": "Thread-5", "execution_time": 0.008423089981079102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.int_google_play__overview", "compiled": true, "compiled_code": "with overview_report as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__overview_report\"\n),\n\nadapter as (\n\n select \n source_relation,\n date_day,\n 'google_play' as app_platform,\n package_name as app_name,\n device_uninstalls as deletions,\n device_installs as downloads,\n store_listing_visitors as page_views,\n crashes\n from overview_report\n)\n\nselect * \nfrom adapter", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__overview\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:47.620883Z", "completed_at": "2024-07-23T16:10:48.539491Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.541238Z", "completed_at": "2024-07-23T16:10:48.541242Z"}], "thread_id": "Thread-6", "execution_time": 0.9915683269500732, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play_source.stg_google_play__subscriptions_country", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__subscriptions_country_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _file\n \n as \n \n _file\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _line\n \n as \n \n _line\n \n, \n \n \n _modified\n \n as \n \n _modified\n \n, \n \n \n active_subscriptions\n \n as \n \n active_subscriptions\n \n, \n \n \n cancelled_subscriptions\n \n as \n \n cancelled_subscriptions\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n new_subscriptions\n \n as \n \n new_subscriptions\n \n, \n \n \n package_name\n \n as \n \n package_name\n \n, \n \n \n product_id\n \n as \n \n product_id\n \n\n\n\n\n \n \n\n\n, cast('' as TEXT) as source_relation\n\n\n\n\n from base\n),\n\nfinal as (\n\n select\n cast(source_relation as TEXT) as source_relation,\n cast(date as date) as date_day,\n cast(country as TEXT) as country,\n cast(product_id as TEXT) as product_id,\n cast(package_name as TEXT) as package_name,\n sum(cast(active_subscriptions as bigint)) as total_active_subscriptions,\n sum(cast(cancelled_subscriptions as bigint)) as cancelled_subscriptions,\n sum(cast(new_subscriptions as bigint)) as new_subscriptions\n from fields\n group by 1,2,3,4,5\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__subscriptions_country\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.612476Z", "completed_at": "2024-07-23T16:10:48.616895Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.617179Z", "completed_at": "2024-07-23T16:10:48.617185Z"}], "thread_id": "Thread-6", "execution_time": 0.00529789924621582, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play_source.dbt_utils_unique_combination_of_columns_stg_google_play__subscriptions_country_source_relation__package_name__date_day__country__product_id.7023b963b3", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, package_name, date_day, country, product_id\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__subscriptions_country\"\n group by source_relation, package_name, date_day, country, product_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.035144Z", "completed_at": "2024-07-23T16:10:48.887710Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:48.888076Z", "completed_at": "2024-07-23T16:10:48.888083Z"}], "thread_id": "Thread-4", "execution_time": 0.911362886428833, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.int_google_play__earnings", "compiled": true, "compiled_code": " \n\nwith earnings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__earnings\"\n), \n\ncalc_net_amounts as (\n\n select \n *,\n sum(amount_merchant_currency) over (partition by source_relation, order_id) as net_order_amount\n from earnings\n),\n\ndaily_country_metrics as (\n\n-- let's pivot out revenue metrics associated wit each type of transaction type\n\n\n select \n source_relation,\n transaction_date as date_day,\n buyer_country as country_short, -- rolling up past states/territories\n sku_id, -- this will be a subscription or in-app product\n package_name,\n merchant_currency,\n sum(net_order_amount) as net_amount,\n count(distinct order_id) as transactions\n \n , sum( case when lower(transaction_type) = 'charge' then amount_merchant_currency else 0 end ) as charge_amount\n , count( distinct case when lower(transaction_type) = 'charge' then order_id end ) as charge_transactions\n \n , sum( case when lower(transaction_type) = 'google fee' then amount_merchant_currency else 0 end ) as google_fee_amount\n , count( distinct case when lower(transaction_type) = 'google fee' then order_id end ) as google_fee_transactions\n \n from calc_net_amounts\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom daily_country_metrics", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__earnings\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.499590Z", "completed_at": "2024-07-23T16:10:49.395353Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.395689Z", "completed_at": "2024-07-23T16:10:49.395697Z"}], "thread_id": "Thread-8", "execution_time": 0.9581689834594727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.app_reporting__app_version_report", "compiled": true, "compiled_code": "with unioned as (\n\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__app_version\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"app_version\" as text) as \"app_version\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"crashes\" as numeric) as \"crashes\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__app_version\"\n\n \n )\n\n union all\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__app_version\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"app_version\" as text) as \"app_version\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"crashes\" as numeric) as \"crashes\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__app_version\"\n\n \n )\n\n \n), \n\nfinal as (\n\n select \n source_relation,\n date_day,\n app_platform,\n app_name,\n app_version,\n deletions,\n crashes\n from unioned\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__app_version_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.452425Z", "completed_at": "2024-07-23T16:10:49.457305Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.457611Z", "completed_at": "2024-07-23T16:10:49.457617Z"}], "thread_id": "Thread-4", "execution_time": 0.0059320926666259766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.app_reporting.dbt_utils_unique_combination_of_columns_app_reporting__app_version_report_source_relation__date_day__app_platform__app_name__app_version.48a2f57d81", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_platform, app_name, app_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__app_version_report\"\n group by source_relation, date_day, app_platform, app_name, app_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.561537Z", "completed_at": "2024-07-23T16:10:49.403197Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.403513Z", "completed_at": "2024-07-23T16:10:49.403520Z"}], "thread_id": "Thread-2", "execution_time": 0.9070188999176025, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.app_reporting__os_version_report", "compiled": true, "compiled_code": "with unioned as (\n\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__os_version\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"os_version\" as text) as \"os_version\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"crashes\" as numeric) as \"crashes\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__os_version\"\n\n \n )\n\n union all\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__os_version\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"os_version\" as text) as \"os_version\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"crashes\" as numeric) as \"crashes\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__os_version\"\n\n \n )\n\n \n),\n\nfinal as (\n\n select \n source_relation,\n date_day,\n app_platform,\n app_name, \n os_version,\n downloads,\n deletions,\n crashes\n from unioned\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__os_version_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.469634Z", "completed_at": "2024-07-23T16:10:49.474368Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.474667Z", "completed_at": "2024-07-23T16:10:49.474674Z"}], "thread_id": "Thread-8", "execution_time": 0.005834102630615234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.app_reporting.dbt_utils_unique_combination_of_columns_app_reporting__os_version_report_source_relation__date_day__app_platform__app_name__os_version.28d843b575", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_platform, app_name, os_version\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__os_version_report\"\n group by source_relation, date_day, app_platform, app_name, os_version\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.534398Z", "completed_at": "2024-07-23T16:10:49.535770Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.536166Z", "completed_at": "2024-07-23T16:10:49.536174Z"}], "thread_id": "Thread-7", "execution_time": 1.0762231349945068, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.app_reporting__device_report", "compiled": true, "compiled_code": "with unioned as (\n\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__device\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"device\" as text) as \"device\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__device\"\n\n \n )\n\n union all\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__device\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"device\" as text) as \"device\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__device\"\n\n \n )\n\n \n), \n\nfinal as (\n\n select\n source_relation,\n date_day,\n app_platform,\n app_name, \n device,\n downloads,\n deletions\n from unioned\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__device_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.597156Z", "completed_at": "2024-07-23T16:10:49.601559Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.602081Z", "completed_at": "2024-07-23T16:10:49.602087Z"}], "thread_id": "Thread-2", "execution_time": 0.005570173263549805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.app_reporting.dbt_utils_unique_combination_of_columns_app_reporting__device_report_source_relation__date_day__app_platform__app_name__device.351f9ea304", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_platform, app_name, device\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__device_report\"\n group by source_relation, date_day, app_platform, app_name, device\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.567352Z", "completed_at": "2024-07-23T16:10:49.537508Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.537861Z", "completed_at": "2024-07-23T16:10:49.537869Z"}], "thread_id": "Thread-5", "execution_time": 1.036470890045166, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.app_reporting__overview_report", "compiled": true, "compiled_code": "with unioned as (\n\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__overview\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"page_views\" as numeric) as \"page_views\" ,\n cast(\"crashes\" as numeric) as \"crashes\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__overview\"\n\n \n )\n\n union all\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__overview\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"page_views\" as numeric) as \"page_views\" ,\n cast(\"crashes\" as numeric) as \"crashes\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__overview\"\n\n \n )\n\n \n),\n\nfinal as (\n\n select \n source_relation,\n date_day,\n app_platform,\n app_name, \n downloads,\n deletions,\n page_views,\n crashes\n from unioned\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__overview_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.546768Z", "completed_at": "2024-07-23T16:10:49.536453Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.536989Z", "completed_at": "2024-07-23T16:10:49.536994Z"}], "thread_id": "Thread-3", "execution_time": 1.0633909702301025, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.app_reporting__country_report", "compiled": true, "compiled_code": "with unioned as (\n\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__country\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"country_long\" as text) as \"country_long\" ,\n cast(\"country_short\" as text) as \"country_short\" ,\n cast(\"region\" as character varying(255)) as \"region\" ,\n cast(\"sub_region\" as character varying(255)) as \"sub_region\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"page_views\" as numeric) as \"page_views\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__country\"\n\n \n )\n\n union all\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__country\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"country_long\" as text) as \"country_long\" ,\n cast(\"country_short\" as text) as \"country_short\" ,\n cast(\"region\" as character varying(255)) as \"region\" ,\n cast(\"sub_region\" as character varying(255)) as \"sub_region\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"deletions\" as numeric) as \"deletions\" ,\n cast(\"page_views\" as numeric) as \"page_views\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__country\"\n\n \n )\n\n \n),\n\nfinal as (\n\n select\n source_relation,\n date_day,\n app_platform,\n app_name, \n country_long,\n country_short,\n region,\n sub_region,\n downloads,\n deletions,\n page_views\n from unioned\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__country_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.542045Z", "completed_at": "2024-07-23T16:10:49.536767Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.537251Z", "completed_at": "2024-07-23T16:10:49.537255Z"}], "thread_id": "Thread-1", "execution_time": 1.0798211097717285, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.app_reporting.app_reporting__traffic_source_report", "compiled": true, "compiled_code": "with unioned as (\n\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__traffic_source\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"traffic_source_type\" as text) as \"traffic_source_type\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"page_views\" as numeric) as \"page_views\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_apple_store__traffic_source\"\n\n \n )\n\n union all\n \n\n (\n select\n cast('\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__traffic_source\"' as TEXT) as _dbt_source_relation,\n\n \n cast(\"source_relation\" as text) as \"source_relation\" ,\n cast(\"date_day\" as date) as \"date_day\" ,\n cast(\"app_platform\" as text) as \"app_platform\" ,\n cast(\"app_name\" as text) as \"app_name\" ,\n cast(\"traffic_source_type\" as text) as \"traffic_source_type\" ,\n cast(\"downloads\" as numeric) as \"downloads\" ,\n cast(\"page_views\" as numeric) as \"page_views\" \n\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__traffic_source\"\n\n \n )\n\n \n),\n\nfinal as (\n\n select\n source_relation,\n date_day,\n app_platform,\n app_name,\n traffic_source_type,\n downloads,\n page_views\n from unioned\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__traffic_source_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.605448Z", "completed_at": "2024-07-23T16:10:49.614475Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.615364Z", "completed_at": "2024-07-23T16:10:49.615370Z"}], "thread_id": "Thread-8", "execution_time": 0.011166095733642578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.app_reporting.dbt_utils_unique_combination_of_columns_app_reporting__country_report_source_relation__date_day__app_platform__app_name__country_short__country_long.5e2595155d", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_platform, app_name, country_short, country_long\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__country_report\"\n group by source_relation, date_day, app_platform, app_name, country_short, country_long\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.609307Z", "completed_at": "2024-07-23T16:10:49.614820Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.615833Z", "completed_at": "2024-07-23T16:10:49.615836Z"}], "thread_id": "Thread-7", "execution_time": 0.011322259902954102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.app_reporting.dbt_utils_unique_combination_of_columns_app_reporting__overview_report_source_relation__date_day__app_platform__app_name.40d1661082", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_platform, app_name\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__overview_report\"\n group by source_relation, date_day, app_platform, app_name\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.616894Z", "completed_at": "2024-07-23T16:10:49.620867Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.621101Z", "completed_at": "2024-07-23T16:10:49.621105Z"}], "thread_id": "Thread-2", "execution_time": 0.004957914352416992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.app_reporting.dbt_utils_unique_combination_of_columns_app_reporting__traffic_source_report_source_relation__date_day__app_platform__app_name__traffic_source_type.59fdf9104b", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, date_day, app_platform, app_name, traffic_source_type\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"app_reporting__traffic_source_report\"\n group by source_relation, date_day, app_platform, app_name, traffic_source_type\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:48.938875Z", "completed_at": "2024-07-23T16:10:49.660265Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.660520Z", "completed_at": "2024-07-23T16:10:49.660527Z"}], "thread_id": "Thread-6", "execution_time": 0.7747180461883545, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.google_play.google_play__finance_report", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_play__latest_product_info as (\n \n\nwith earnings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__earnings\"\n), \n\n-- figure out when the latest transaction involving this product was to find the latest product title used for it\ntransaction_recency as (\n\n select\n source_relation,\n package_name,\n product_title,\n sku_id,\n max(transaction_pt_timestamp) as last_transaction_at\n from earnings\n group by 1,2,3,4\n), \n\norder_product_records as (\n\n select \n *,\n row_number() over(partition by source_relation, sku_id order by last_transaction_at desc) as n\n from transaction_recency\n), \n\nlatest_product_record as (\n\n select\n source_relation,\n package_name,\n product_title,\n sku_id\n from order_product_records\n where n = 1\n)\n\nselect *\nfrom latest_product_record\n), earnings as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"int_google_play__earnings\"\n), \n\ncountry_codes as (\n\n select *\n from \"postgres\".\"zz_app_reporting_google_play_source\".\"google_play__country_codes\"\n),\n\nproduct_info as (\n\n select *\n from __dbt__cte__int_google_play__latest_product_info\n\n-- there's honestly quite a bit in here since we only need to do backfilling stuff if there is indeed a full outer join \n), \n\nsubscriptions as (\n\n select *\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"stg_google_play__subscriptions_country\"\n), \n\ndaily_join as (\n\n-- these are dynamically set. perhaps we should extract into a variable in case people's tables get to wide?\n\n\n select\n -- these columns are the grain of this model (day + country + package_name + product (sku_id))\n coalesce(earnings.source_relation, subscriptions.source_relation) as source_relation,\n coalesce(earnings.date_day, subscriptions.date_day) as date_day,\n coalesce(earnings.country_short, subscriptions.country) as country_short,\n coalesce(earnings.package_name, subscriptions.package_name) as package_name,\n coalesce(earnings.sku_id, subscriptions.product_id) as sku_id,\n earnings.merchant_currency, -- this will just be null if there aren't transactions on a given day\n\n coalesce( net_amount, 0) as net_amount,\n coalesce( transactions, 0) as transactions,\n coalesce( charge_amount, 0) as charge_amount,\n coalesce( charge_transactions, 0) as charge_transactions,\n coalesce( google_fee_amount, 0) as google_fee_amount,\n coalesce( google_fee_transactions, 0) as google_fee_transactions,\n coalesce(subscriptions.new_subscriptions, 0) as new_subscriptions,\n coalesce(subscriptions.cancelled_subscriptions, 0) as cancelled_subscriptions,\n\n -- this is a rolling metric, so we'll use window functions to backfill instead of coalescing\n subscriptions.total_active_subscriptions\n from earnings\n full outer join subscriptions\n on earnings.date_day = subscriptions.date_day\n and earnings.source_relation = subscriptions.source_relation\n and earnings.package_name = subscriptions.package_name\n -- coalesce null countries otherwise they'll cause fanout with the full outer join\n and coalesce(earnings.country_short, 'null_country') = coalesce(subscriptions.country, 'null_country') -- in the source package we aggregate all null country records together into one batch per day\n and earnings.sku_id = subscriptions.product_id\n), \n\n-- to backfill in days with NULL values for rolling metrics, we'll create a partition to batch them together with records that have non-null values\n-- we can't just use last_value(ignore nulls) because of postgres :/\ncreate_partitions as (\n\n select \n *,\n sum(case when total_active_subscriptions is null \n then 0 else 1 end) over (partition by source_relation, country_short, sku_id order by date_day asc rows unbounded preceding) as total_active_subscriptions_partition\n from daily_join\n), \n\nfill_values as (\n\n select \n -- we can include these in earning_transaction_metrics but wanna keep them in this column position\n source_relation,\n date_day,\n country_short,\n package_name, \n sku_id,\n merchant_currency,\n net_amount,\n transactions,\n charge_amount,\n charge_transactions,\n google_fee_amount,\n google_fee_transactions,\n new_subscriptions,\n cancelled_subscriptions,\n\n -- now we'll take the non-null value for each partitioned batch and propagate it across the rows included in the batch\n first_value( total_active_subscriptions ) over (\n partition by source_relation, total_active_subscriptions_partition, country_short, sku_id order by date_day asc rows between unbounded preceding and current row) as total_active_subscriptions\n from create_partitions\n), \n\nfinal_values as (\n\n select \n source_relation,\n date_day,\n country_short,\n package_name, \n sku_id,\n merchant_currency,\n net_amount,\n transactions,\n charge_amount,\n charge_transactions,\n google_fee_amount,\n google_fee_transactions,\n new_subscriptions,\n cancelled_subscriptions,\n \n -- the first day will have NULL values, let's make it 0\n coalesce(total_active_subscriptions, 0) as total_active_subscriptions\n from fill_values\n\n), \n\nadd_product_country_info as (\n\n select \n base.*,\n product_info.product_title,\n coalesce(country_codes.alternative_country_name, country_codes.country_name) as country_long,\n country_codes.region,\n country_codes.sub_region\n from final_values as base\n left join product_info \n on base.package_name = product_info.package_name\n and base.source_relation = product_info.source_relation\n and base.sku_id = product_info.sku_id\n left join country_codes \n on country_codes.country_code_alpha_2 = base.country_short\n)\n\nselect *\nfrom add_product_country_info", "relation_name": "\"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__finance_report\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-23T16:10:49.714830Z", "completed_at": "2024-07-23T16:10:49.719684Z"}, {"name": "execute", "started_at": "2024-07-23T16:10:49.719918Z", "completed_at": "2024-07-23T16:10:49.719923Z"}], "thread_id": "Thread-3", "execution_time": 0.005816936492919922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.google_play.dbt_utils_unique_combination_of_columns_google_play__finance_report_source_relation__sku_id__country_short__date_day.0609b46134", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n source_relation, sku_id, country_short, date_day\n from \"postgres\".\"zz_app_reporting_app_reporting_dev\".\"google_play__finance_report\"\n group by source_relation, sku_id, country_short, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "relation_name": null}], "elapsed_time": 8.511908054351807, "args": {"partial_parse_file_diff": true, "compile": true, "printer_width": 80, "static": false, "require_resource_names_without_spaces": false, "populate_cache": true, "write_json": true, "use_colors": true, "select": [], "invocation_command": "dbt docs generate", "defer": false, "static_parser": true, "require_explicit_package_overrides_for_builtin_materializations": true, "exclude": [], "show_resource_report": false, "print": true, "partial_parse": true, "project_dir": "/Users/catherinefritz/Documents/dbt_packages/app_reporting/dbt_app_reporting/integration_tests", "log_format": "default", "log_path": "/Users/catherinefritz/Documents/dbt_packages/app_reporting/dbt_app_reporting/integration_tests/logs", "empty_catalog": false, "log_file_max_bytes": 10485760, "cache_selected_only": false, "profiles_dir": "/Users/catherinefritz/.dbt", "vars": {}, "macro_debugging": false, "which": "generate", "use_colors_file": true, "version_check": true, "indirect_selection": "eager", "source_freshness_run_project_hooks": false, "log_format_file": "debug", "introspect": true, "warn_error_options": {"include": [], "exclude": []}, "quiet": false, "log_level": "info", "send_anonymous_usage_stats": true, "enable_legacy_logger": false, "strict_mode": false, "favor_state": false, "log_level_file": "debug"}}