Mimic gcc file structure Change-Id: I60ae99ee40623861efcae3911c9e51a7f47867f4
diff --git a/models/explores/.gitkeep b/explores/.gitkeep similarity index 100% rename from models/explores/.gitkeep rename to explores/.gitkeep
diff --git a/explores/revenue.view.lkml b/explores/revenue.view.lkml new file mode 100644 index 0000000..e188b19 --- /dev/null +++ b/explores/revenue.view.lkml
@@ -0,0 +1,4 @@ +# Approximates https://lookercs-internal.git.corp.google.com/cloud_sales_bi/+/refs/heads/master/explores/revenue.view.lkml +include: "/views/revenue/revenue.view.lkml" + +explore: revenue {}
diff --git a/hdeist-test-model.model.lkml b/hdeist-test-model.model.lkml new file mode 100644 index 0000000..0a6ecd2 --- /dev/null +++ b/hdeist-test-model.model.lkml
@@ -0,0 +1,5 @@ +connection: "concord" + +include: "explores/*.view.lkml" + +label: "Cloud Sales BI"
diff --git a/models/hdeist-test-model.model.lkml b/models/hdeist-test-model.model.lkml deleted file mode 100644 index aeaba5d..0000000 --- a/models/hdeist-test-model.model.lkml +++ /dev/null
@@ -1,3 +0,0 @@ -connection: "concord" - -# include: "/*.views"
diff --git a/models/views/.gitkeep b/views/.gitkeep similarity index 100% rename from models/views/.gitkeep rename to views/.gitkeep
diff --git a/models/explores/.gitkeep b/views/revenue/.gitkeep similarity index 100% copy from models/explores/.gitkeep copy to views/revenue/.gitkeep
diff --git a/views/revenue/revenue.view.lkml b/views/revenue/revenue.view.lkml new file mode 100644 index 0000000..9dfb42d --- /dev/null +++ b/views/revenue/revenue.view.lkml
@@ -0,0 +1,80 @@ +# Approximates https://lookercs-internal.git.corp.google.com/cloud_sales_bi/+/refs/heads/master/views/revenue/revenue.view.lkml + +# bits from: +# https://lookercs-internal.git.corp.google.com/cloud_sales_bi/+/refs/heads/master/views/revenue/account_from_account_revenue.view.lkml +view: revenue { + + + sql_table_name: `concord-test.stagingservice_gcc.gcc_revenue_partitioned_view`;; + + dimension: billing_account_id { + view_label: "Account" + group_label: "Identifiers" + description: "Billing account ID" + sql: ${TABLE}.billing_account_id ;; + } + + dimension: sfdc_account_id { + alias: [account_meta.sfdc_account_id] + label: "SFDC Account ID" + view_label: "Account" + description: "Salesforce account of the opportunity" + type: string + sql: ${TABLE}.sfdc_account_id ;; + link: { + label: "Account in Vector" + url: "https://vector.lightning.force.com/lightning/r/Account/{{ value }}/view" + } + } + + dimension: currency_code { + view_label: "Revenue" + description: "Three letter currency code (e.g. USD) for local billing amount." + sql: ${TABLE}.currency_code ;; + } + + dimension_group: invoice_month_start { + type: time + timeframes: [raw, date, week, month, quarter, year] + view_label: "Revenue" + sql: ${TABLE}.invoice_month_start ;; + datatype: date + convert_tz: no + } + + dimension: product_family_l1 { + label: "Product Family (L1)" + group_label: "Finance Product Hierarchy" + view_label: "Product" + description: "Examples: Google Workspace, GCP, Maps, PSO" + sql: ${TABLE}.product_group ;; + drill_fields: [product_group_l2] + } + dimension: product_group_l2 { + label: "Product Group (L2)" + group_label: "Finance Product Hierarchy" + view_label: "Product" + description: "Examples: Marketplace Services, Compute, Support, Databases, etc." + sql: ${TABLE}.product_group_l2 ;; + drill_fields: [logical_product_l3] + } + dimension: logical_product_l3 { + label: "Logical Product (L3)" + group_label: "Finance Product Hierarchy" + view_label: "Product" + description: "Examples: Persistent Disk, VM Image Storage, GCE" + sql: ${TABLE}.logical_product_l3 ;; + } + + dimension: usd_revenue_gross { + # hidden: yes + view_label: "Revenue" + description: "Monetised value for resource consumption, before application of any credits, reported in USD($) using a monthly Ceilometer exchange rate. (Generally a positive number)" + sql: ${TABLE}.usd_revenue_gross ;; + } + dimension: usd_revenue_gross_cn { + hidden: yes + view_label: "Revenue" + sql: ${TABLE}.usd_revenue_gross_cn ;; + } +}