diff --git a/bigquery_etl/dryrun.py b/bigquery_etl/dryrun.py index 89ec6000b0..2aec819e7a 100644 --- a/bigquery_etl/dryrun.py +++ b/bigquery_etl/dryrun.py @@ -56,16 +56,6 @@ SKIP = { "sql/moz-fx-data-shared-prod/regrets_reporter/regrets_reporter_update/view.sql", "sql/moz-fx-data-shared-prod/revenue_derived/client_ltv_v1/query.sql", "sql/moz-fx-data-shared-prod/shredder_state/progress/view.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_referrer/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_version/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_campaign/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform_version/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_region/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_source/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_storefront/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_web_referrer/query.sql", - "sql/moz-fx-data-shared-prod/apple_app_store/metrics_total/query.sql", "sql/moz-fx-data-shared-prod/monitoring/telemetry_distinct_docids_v1/query.sql", "sql/moz-fx-data-shared-prod/revenue_derived/client_ltv_normalized/query.sql", "sql/moz-fx-data-shared-prod/stripe_derived/customers_v1/query.sql", diff --git a/script/marketing/generate_app_store_queries.py b/script/marketing/generate_app_store_queries.py index 5abc9b288c..184581d240 100755 --- a/script/marketing/generate_app_store_queries.py +++ b/script/marketing/generate_app_store_queries.py @@ -19,7 +19,7 @@ sys.path.append( ) from bigquery_etl.format_sql.formatter import reformat # noqa E402 -SQL_DIR = "sql/moz-fx-data-shared-prod/" +SQL_DIR = "sql/moz-fx-data-marketing-prod/" QUERY_TEMPLATE = """ SELECT @@ -65,7 +65,7 @@ def parse_args(): "--backfill", action="store_true", help="If --create-table is set, backfill will populate" - " tables with data from eported tables", + " tables with data from exported tables", ) return parser.parse_args() @@ -135,7 +135,7 @@ def main(project, source_dataset, destination_dataset, create_table, backfill, d additional_fields=", ".join(additional_fields), first_table=qualified_table_names[0], joined_tables="\n".join(join_clauses), - filter="date=@date", + filter="date=@submission_date", ) query_path = os.path.join(SQL_DIR, destination_dataset, table_name, "query.sql") diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_referrer/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_app_referrer/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_referrer/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_app_referrer/query.sql index d808df423a..ace1de28b7 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_referrer/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_app_referrer/query.sql @@ -44,4 +44,4 @@ FULL JOIN USING (date, app_name, app_referrer) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_version/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_app_version/query.sql similarity index 97% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_version/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_app_version/query.sql index 953865c7c2..b93a2bbcb5 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_app_version/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_app_version/query.sql @@ -36,4 +36,4 @@ FULL JOIN USING (date, app_name, app_version) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_campaign/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_campaign/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_campaign/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_campaign/query.sql index 24935d4395..8a51af79cb 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_campaign/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_campaign/query.sql @@ -44,4 +44,4 @@ FULL JOIN USING (date, app_name, campaign) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_platform/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_platform/query.sql index 4f0137f920..0ac24ec096 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_platform/query.sql @@ -56,4 +56,4 @@ FULL JOIN USING (date, app_name, platform) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform_version/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_platform_version/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform_version/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_platform_version/query.sql index 4d9d281a9e..2f386a0989 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_platform_version/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_platform_version/query.sql @@ -56,4 +56,4 @@ FULL JOIN USING (date, app_name, platform_version) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_region/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_region/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_region/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_region/query.sql index 49c8d1e85f..d791a21e7f 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_region/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_region/query.sql @@ -49,4 +49,4 @@ FULL JOIN USING (date, app_name, region) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_source/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_source/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_source/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_source/query.sql index e08a9fc7ad..3e4e2b674a 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_source/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_source/query.sql @@ -44,4 +44,4 @@ FULL JOIN USING (date, app_name, source) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_storefront/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_storefront/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_storefront/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_storefront/query.sql index 9ef3561462..8975846e14 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_storefront/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_storefront/query.sql @@ -49,4 +49,4 @@ FULL JOIN USING (date, app_name, storefront) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_web_referrer/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_web_referrer/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_web_referrer/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_web_referrer/query.sql index 9db07e4d2f..5995af8063 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_by_web_referrer/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_by_web_referrer/query.sql @@ -44,4 +44,4 @@ FULL JOIN USING (date, app_name, web_referrer) WHERE - date = @date + date = @submission_date diff --git a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_total/query.sql b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_total/query.sql similarity index 98% rename from sql/moz-fx-data-shared-prod/apple_app_store/metrics_total/query.sql rename to sql/moz-fx-data-marketing-prod/apple_app_store/metrics_total/query.sql index fe7b442569..85cc634da3 100644 --- a/sql/moz-fx-data-shared-prod/apple_app_store/metrics_total/query.sql +++ b/sql/moz-fx-data-marketing-prod/apple_app_store/metrics_total/query.sql @@ -62,4 +62,4 @@ FULL JOIN USING (date, app_name) WHERE - date = @date + date = @submission_date