mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Cut over to synthetic OneTime billing events
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147048115
This commit is contained in:
parent
090983cc7f
commit
cb215adac3
4 changed files with 20 additions and 363 deletions
|
@ -49,8 +49,6 @@ final class MakeBillingTablesCommand extends BigqueryCommand {
|
|||
private static final SqlTemplate REGISTRY_DATA_SQL = getSql("registry_data_view.sql");
|
||||
private static final SqlTemplate CREDIT_DATA_SQL = getSql("credit_data_view.sql");
|
||||
private static final SqlTemplate CREDIT_BALANCE_DATA_SQL = getSql("credit_balance_data_view.sql");
|
||||
private static final SqlTemplate PREMIUM_LIST_DATA_SQL = getSql("premium_list_data_view.sql");
|
||||
private static final SqlTemplate RECURRING_DATA_SQL = getSql("recurring_event_data_view.sql");
|
||||
private static final SqlTemplate BILLING_DATA_SQL = getSql("billing_data_view.sql");
|
||||
|
||||
/** Runs the main billing table/view creation logic. */
|
||||
|
@ -66,8 +64,6 @@ final class MakeBillingTablesCommand extends BigqueryCommand {
|
|||
makeRegistryView();
|
||||
makeCreditView();
|
||||
makeCreditBalanceView();
|
||||
makePremiumListView();
|
||||
makeRecurringEventView();
|
||||
makeBillingView();
|
||||
} catch (TableCreationException e) {
|
||||
// Swallow since we already will have printed an error message.
|
||||
|
@ -161,36 +157,6 @@ final class MakeBillingTablesCommand extends BigqueryCommand {
|
|||
.build()));
|
||||
}
|
||||
|
||||
/** Generates a view of premium list data for each TLD. */
|
||||
private void makePremiumListView() throws Exception {
|
||||
handleTableCreation(
|
||||
"premium list data view",
|
||||
bigquery().query(
|
||||
PREMIUM_LIST_DATA_SQL
|
||||
.put("SOURCE_DATASET", sourceDatasetId)
|
||||
.put("DEST_DATASET", bigquery().getDatasetId())
|
||||
.build(),
|
||||
bigquery().buildDestinationTable("PremiumListData")
|
||||
.description("Synthetic view of premium list data.")
|
||||
.type(TableType.VIEW)
|
||||
.build()));
|
||||
}
|
||||
|
||||
/** Generates a view of recurring billing events expanded into individual recurrences. */
|
||||
private void makeRecurringEventView() throws Exception {
|
||||
handleTableCreation(
|
||||
"recurring event data view",
|
||||
bigquery().query(
|
||||
RECURRING_DATA_SQL
|
||||
.put("SOURCE_DATASET", sourceDatasetId)
|
||||
.put("DEST_DATASET", bigquery().getDatasetId())
|
||||
.build(),
|
||||
bigquery().buildDestinationTable("RecurringEventData")
|
||||
.description("Synthetic view of recurring billing event recurrence data.")
|
||||
.type(TableType.VIEW)
|
||||
.build()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a view of consolidated billing information that includes currency conversions,
|
||||
* registrar details, and cancellation flags on top of the original BillingEvent.OneTime data.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue