From 1c927a48e904ef1bef1e1cb49ef7111108b9e2f2 Mon Sep 17 00:00:00 2001 From: ctingue Date: Wed, 28 Dec 2016 08:08:19 -0800 Subject: [PATCH] Filter synthetic OneTimes from billing SQL I intend to configure ExpandRecurringBillingEventsAction in production in the near future, but until I verify that there's a 1:1 match between OneTimes expanded via SQL and OneTimes expanded via MR, filter the MR-synthetic OneTimes from the billing data view SQL. I confirmed that this is the only script that consumes data from OneTime. (Note that the best way would be to check for the SYNTHETIC flag, but syntheticCreationTime has a value iff the flag exists, and parsing the flags field is a relative pain in the neck compared to checking for null -- this is temporary.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143108200 --- java/google/registry/tools/sql/billing_data_view.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/google/registry/tools/sql/billing_data_view.sql b/java/google/registry/tools/sql/billing_data_view.sql index 5ebc2b7bb..b0a618a3b 100644 --- a/java/google/registry/tools/sql/billing_data_view.sql +++ b/java/google/registry/tools/sql/billing_data_view.sql @@ -146,7 +146,10 @@ LEFT JOIN EACH ( [%SOURCE_DATASET%.Cancellation] WHERE -- Filter out Registry 1.0 data - TODO(b/20828509): remove this. - __key__.namespace = '') + __key__.namespace = '' + -- TODO(b/27562876): Filter out synthetic OneTime events until we verify + -- that expanded OneTime events via MapReduce are correct and complete. + AND syntheticCreationTime IS NULL) WHERE -- Filter out prober data. tld IN