mirror of
https://github.com/google/nomulus.git
synced 2025-05-30 09:20:29 +02:00
Enhance transfer logic for transaction reporting
Explicit transfer acks/nacks reverse the roles for transaction reporting tabulation- this adds a quick check to account for this going forward. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199474444
This commit is contained in:
parent
5c7a20797e
commit
7487639e62
4 changed files with 33 additions and 3 deletions
|
@ -45,7 +45,16 @@ FROM (
|
|||
SUM(amount) AS metricValue
|
||||
FROM (
|
||||
SELECT
|
||||
entries.%CLIENT_ID% AS clientId,
|
||||
CASE
|
||||
-- Explicit transfer acks (approve) and nacks (reject) are done
|
||||
-- by the opposing registrar. Thus, for these specific actions,
|
||||
-- we swap the 'otherClientId' with the 'clientId' to properly
|
||||
-- account for this reversal.
|
||||
WHEN (entries.type = 'DOMAIN_TRANSFER_APPROVE'
|
||||
OR entries.type = 'DOMAIN_TRANSFER_REJECT')
|
||||
THEN entries.%OTHER_CLIENT_ID%
|
||||
ELSE entries.%CLIENT_ID%
|
||||
END AS clientId,
|
||||
entries.domainTransactionRecords.tld[SAFE_OFFSET(index)] AS tld,
|
||||
entries.domainTransactionRecords.reportingTime[SAFE_OFFSET(index)]
|
||||
AS reportingTime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue