mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 03:09:33 +02:00
Upgrade activity reporting queries to StandardSQL
This also brings the SQL template parameters in-line with the anticipated Bigquery dataset format, and switches from DateTime to the more appropriate LocalDate (since we only need monthly granularity). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162747692
This commit is contained in:
parent
8a921f08ed
commit
33eb5f1c87
14 changed files with 160 additions and 171 deletions
|
@ -19,7 +19,7 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.io.IOException;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
@ -34,7 +34,7 @@ public class ActivityReportingQueryBuilderTest {
|
|||
ImmutableList.of(
|
||||
ActivityReportingQueryBuilder.REGISTRAR_OPERATING_STATUS,
|
||||
ActivityReportingQueryBuilder.DNS_COUNTS,
|
||||
ActivityReportingQueryBuilder.MONTHLY_LOGS,
|
||||
ActivityReportingQueryBuilder.MONTHLY_LOGS_TABLE,
|
||||
ActivityReportingQueryBuilder.EPP_METRICS,
|
||||
ActivityReportingQueryBuilder.WHOIS_COUNTS,
|
||||
"activity_report_aggregation");
|
||||
|
@ -46,7 +46,8 @@ public class ActivityReportingQueryBuilderTest {
|
|||
}
|
||||
ImmutableMap<String, String> testQueries = testQueryBuilder.build();
|
||||
ImmutableMap<String, String> queries =
|
||||
ActivityReportingQueryBuilder.getQueryMap(new DateTime(2017, 05, 15, 0, 0));
|
||||
ActivityReportingQueryBuilder.getQueryMap(
|
||||
new LocalDate(2017, 05, 15), "domain-registry-alpha");
|
||||
for (String query : queryNames) {
|
||||
assertThat(queries.get(query)).isEqualTo(testQueries.get(query));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue