sku_id, sku_description
diff --git a/revenue_trends.dashboard.lookml b/revenue_trends.dashboard.lookml
index a8a432d..42d0d63 100644
--- a/revenue_trends.dashboard.lookml
+++ b/revenue_trends.dashboard.lookml
@@ -62,8 +62,8 @@
GCP Revenue Source: revenue.gcp_revenue_source
Billing Account ID: revenue.billing_account_id
Logical Product (L3): revenue.logical_product_l3
- # SKU ID: revenue.sku_id
- # Sub-Account Name: vector_customers.account_name
+ SKU ID: revenue.sku_id
+ Sub-Account Name: vector_customers.account_name
Is Data Analytics? (Yes / No): revenue.is_data_analytics
Revenue Granularity: revenue.revenue_granularity
Region: revenue.region
@@ -72,12 +72,12 @@
Sub Region: revenue.sub_region
Micro Region: revenue.micro_region
NAL Cluster: revenue.nal_cluster
- # NAL Subcluster: vector_customers.nal_sub_cluster
+ NAL Subcluster: vector_customers.nal_sub_cluster
NAL Name: revenue.nal_name
- # Reporting Account Name: revenue.reporting_account_name
+ Reporting Account Name: revenue.reporting_account_name
Segment: revenue.segment
- # Digital Native vs. Traditional: vector_customers.is_digital_native
- # Is ISV? (Yes / No): vector_customers.is_isv
+ Digital Native vs Traditional: vector_customers.is_digital_native
+ Is ISV? (Yes / No): vector_customers.is_isv
row: 12
col: 0
width: 24
@@ -157,8 +157,8 @@
GCP Revenue Source: revenue.gcp_revenue_source
Billing Account ID: revenue.billing_account_id
Logical Product (L3): revenue.logical_product_l3
- # SKU ID: revenue.sku_id
- # Sub-Account Name: vector_customers.account_name
+ SKU ID: revenue.sku_id
+ Sub-Account Name: vector_customers.account_name
Is Data Analytics? (Yes / No): revenue.is_data_analytics
Revenue Granularity: revenue.revenue_granularity
Region: revenue.region
@@ -167,12 +167,12 @@
Sub Region: revenue.sub_region
Micro Region: revenue.micro_region
NAL Cluster: revenue.nal_cluster
- # NAL Subcluster: vector_customers.nal_sub_cluster
+ NAL Subcluster: vector_customers.nal_sub_cluster
NAL Name: revenue.nal_name
- # Reporting Account Name: revenue.reporting_account_name
+ Reporting Account Name: revenue.reporting_account_name
Segment: revenue.segment
- # Digital Native vs. Traditional: vector_customers.is_digital_native
- # Is ISV? (Yes / No): vector_customers.is_isv
+ Digital Native vs Traditional: vector_customers.is_digital_native
+ Is ISV? (Yes / No): vector_customers.is_isv
row: 24
col: 0
width: 24
@@ -248,8 +248,8 @@
GCP Revenue Source: revenue.gcp_revenue_source
Billing Account ID: revenue.billing_account_id
Logical Product (L3): revenue.logical_product_l3
- # SKU ID: revenue.sku_id
- # Sub-Account Name: vector_customers.account_name
+ SKU ID: revenue.sku_id
+ Sub-Account Name: vector_customers.account_name
Is Data Analytics? (Yes / No): revenue.is_data_analytics
Revenue Granularity: revenue.revenue_granularity
Region: revenue.region
@@ -258,12 +258,12 @@
Sub Region: revenue.sub_region
Micro Region: revenue.micro_region
NAL Cluster: revenue.nal_cluster
- # NAL Subcluster: vector_customers.nal_sub_cluster
+ NAL Subcluster: vector_customers.nal_sub_cluster
NAL Name: revenue.nal_name
- # Reporting Account Name: revenue.reporting_account_name
+ Reporting Account Name: revenue.reporting_account_name
Segment: revenue.segment
- # Digital Native vs. Traditional: vector_customers.is_digital_native
- # Is ISV? (Yes / No): vector_customers.is_isv
+ Digital Native vs Traditional: vector_customers.is_digital_native
+ Is ISV? (Yes / No): vector_customers.is_isv
row: 7
col: 3
width: 7
@@ -1778,20 +1778,20 @@
explore: revenue
listens_to_filters: []
field: revenue.nal_cluster
- # - name: NAL Subcluster
- # title: NAL Subcluster
- # type: field_filter
- # default_value: ''
- # allow_multiple_values: true
- # required: false
- # ui_config:
- # type: tag_list
- # display: popover
- # options: []
- # model: hdeist-test-model
- # explore: revenue
- # listens_to_filters: []
- # field: vector_customers.nal_sub_cluster
+ - name: NAL Subcluster
+ title: NAL Subcluster
+ type: field_filter
+ default_value: ''
+ allow_multiple_values: true
+ required: false
+ ui_config:
+ type: tag_list
+ display: popover
+ options: []
+ model: hdeist-test-model
+ explore: revenue
+ listens_to_filters: []
+ field: vector_customers.nal_sub_cluster
- name: NAL Name
title: NAL Name
type: field_filter
@@ -1806,34 +1806,34 @@
explore: revenue
listens_to_filters: []
field: revenue.nal_name
- # - name: Reporting Account Name
- # title: Reporting Account Name
- # type: field_filter
- # default_value: ''
- # allow_multiple_values: true
- # required: false
- # ui_config:
- # type: tag_list
- # display: popover
- # options: []
- # model: hdeist-test-model
- # explore: vector_customers
- # listens_to_filters: []
- # field: vector_customers.reporting_account_name
- # - name: Sub-Account Name
- # title: Sub-Account Name
- # type: field_filter
- # default_value: ''
- # allow_multiple_values: true
- # required: false
- # ui_config:
- # type: tag_list
- # display: popover
- # options: []
- # model: cloud_sales_bi
- # explore: revenue
- # listens_to_filters: [Reporting Account Name]
- # field: vector_customers.account_name
+ - name: Reporting Account Name
+ title: Reporting Account Name
+ type: field_filter
+ default_value: ''
+ allow_multiple_values: true
+ required: false
+ ui_config:
+ type: tag_list
+ display: popover
+ options: []
+ model: hdeist-test-model
+ explore: vector_customers
+ listens_to_filters: []
+ field: vector_customers.reporting_account_name
+ - name: Sub-Account Name
+ title: Sub-Account Name
+ type: field_filter
+ default_value: ''
+ allow_multiple_values: true
+ required: false
+ ui_config:
+ type: tag_list
+ display: popover
+ options: []
+ model: hdeist-test-model
+ explore: revenue
+ listens_to_filters: [Reporting Account Name]
+ field: vector_customers.account_name
- name: SFDC Account ID
title: SFDC Account ID
type: field_filter
@@ -1935,34 +1935,34 @@
explore: revenue
listens_to_filters: []
field: revenue.segment
- # - name: Digital Native vs. Traditional
- # title: Digital Native vs. Traditional
- # type: field_filter
- # default_value: ''
- # allow_multiple_values: true
- # required: false
- # ui_config:
- # type: button_group
- # display: inline
- # options: []
- # model: cloud_sales_bi
- # explore: revenue
- # listens_to_filters: []
- # field: vector_customers.is_digital_native
- # - name: SKU ID
- # title: SKU ID
- # type: field_filter
- # default_value: ''
- # allow_multiple_values: true
- # required: false
- # ui_config:
- # type: advanced
- # display: popover
- # options: []
- # model: cloud_sales_bi
- # explore: revenue
- # listens_to_filters: []
- # field: revenue.sku_id
+ - name: Digital Native vs Traditional
+ title: Digital Native vs Traditional
+ type: field_filter
+ default_value: ''
+ allow_multiple_values: true
+ required: false
+ ui_config:
+ type: button_group
+ display: inline
+ options: []
+ model: hdeist-test-model
+ explore: revenue
+ listens_to_filters: []
+ field: vector_customers.is_digital_native
+ - name: SKU ID
+ title: SKU ID
+ type: field_filter
+ default_value: ''
+ allow_multiple_values: true
+ required: false
+ ui_config:
+ type: advanced
+ display: popover
+ options: []
+ model: hdeist-test-model
+ explore: revenue
+ listens_to_filters: []
+ field: revenue.sku_id
- name: Revenue Granularity
title: Revenue Granularity
type: field_filter
@@ -1977,17 +1977,17 @@
explore: revenue
listens_to_filters: []
field: revenue.revenue_granularity
- # - name: Is ISV? (Yes / No)
- # title: Is ISV? (Yes / No)
- # type: field_filter
- # default_value: ''
- # allow_multiple_values: true
- # required: false
- # ui_config:
- # type: advanced
- # display: inline
- # options: []
- # model: cloud_sales_bi
- # explore: vector_customers
- # listens_to_filters: []
- # field: vector_customers.is_isv
+ - name: Is ISV? (Yes / No)
+ title: Is ISV? (Yes / No)
+ type: field_filter
+ default_value: ''
+ allow_multiple_values: true
+ required: false
+ ui_config:
+ type: advanced
+ display: inline
+ options: []
+ model: hdeist-test-model
+ explore: vector_customers
+ listens_to_filters: []
+ field: vector_customers.is_isv
diff --git a/views/revenue/revenue.view.lkml b/views/revenue/revenue.view.lkml
index 2c038a3..f2b0367 100644
--- a/views/revenue/revenue.view.lkml
+++ b/views/revenue/revenue.view.lkml
@@ -2,15 +2,39 @@
include: "account_from_account_revenue.view.lkml"
include: "comparisons_from_revenue.view.lkml"
include: "revenue_from_revenue.view.lkml"
-include: "rolling_window.view.lkml"
+# include: "revenue_dailies.view.lkml"
+include: "revenue_from_project_usage_daily.view.lkml"
include: "to_date_fields.view.lkml"
+include: "rolling_window.view.lkml"
+include: "/views/region.view.lkml"
+
view: revenue {
- extends: [account_from_revenue, comparisons_from_revenue, revenue_from_revenue, to_date_fields, rolling_window]
+ extends: [account_from_revenue, comparisons_from_revenue, revenue_from_revenue, to_date_fields, rolling_window, region, revenue_from_project_usage_daily]
+
sql_table_name: `concord-test.stagingservice_gcc.gcc_revenue_partitioned_view`;;
+########## DIMENSIONS ############
+
+ dimension: access_key_hierarchy {
+ description: "Pipe-separated string containing the usernames of individuals assigned to the associated Vector account and everyone in their reporting hierarchy"
+ sql: ${TABLE}.access_key_hierarchy ;;
+ }
+
+ dimension: access_tag_list {
+ description: "Pipe-seperated string containing access information such as Segment, Region, etc"
+ hidden: yes
+ type: string
+ sql: ${TABLE}.access_tag_list ;;
+ }
+
+ dimension: nal_id {
+ sql: ${TABLE}.nal_id ;;
+ }
+
##### PARAMETERS #####
+
parameter: revenue_granularity {
view_label: "Pre- or Post-Split"
description: "Allows the user to toggle between split revenue and non-split revenue. Default value is Split"
diff --git a/views/revenue/revenue_from_revenue.view.lkml b/views/revenue/revenue_from_revenue.view.lkml
index 4220b22..59ec8f2 100644
--- a/views/revenue/revenue_from_revenue.view.lkml
+++ b/views/revenue/revenue_from_revenue.view.lkml
@@ -1,12 +1,16 @@
# emulates https://lookercs-internal.git.corp.google.com/cloud_sales_bi/+/refs/heads/master/views/revenue/revenue_from_revenue.view.lkml
view: revenue_from_revenue {
+
extension: required
+
########## DIMENSIONS ############
+
dimension: currency_code {
view_label: "Revenue"
description: "Three letter currency code (e.g. USD) for local billing amount."
sql: ${TABLE}.currency_code ;;
}
+
dimension: dynamic_usage_timeframe {
view_label: "Revenue"
description: "Dynamic field that is returns usage date, dependent on `Usage Timeframe Selector`. If none selected, defaults to daily."
@@ -17,6 +21,7 @@
WHEN {% parameter usage_timeframe_selector %} = 'Month' THEN CONCAT(${usage_month},"-01")
END ;;
}
+
dimension: gcp_revenue_source {
view_label: "Revenue"
label: "GCP Revenue Source"
@@ -37,6 +42,7 @@
else: "Other Revenue"
}
}
+
dimension_group: invoice_month_start {
type: time
timeframes: [raw, date, week, month, quarter, year]
@@ -57,6 +63,7 @@
'Informatica', 'MongoDB Inc.', 'Palantir') ;;
description: "Returns yes if this is Data & Analytics (DA) usage"
}
+
dimension: is_dataproc {
type: yesno
label: "Is Dataproc Node?"
@@ -64,12 +71,14 @@
sql: ${TABLE}.is_dataproc_node ;;
description: "Does this usage come from a Dataproc node?"
}
+
dimension: is_gcp_marketplace {
type: yesno
label: "Is GCP Marketplace?"
view_label: "Product"
sql: ${TABLE}.is_gcp_marketplace ;;
}
+
dimension: is_gke_node {
type: yesno
label: "Is GKE Node?"
@@ -77,6 +86,7 @@
sql: ${TABLE}.is_gke_node ;;
description: "Does this usage come from a GKE node?"
}
+
dimension: product_family_l1 {
label: "Product Family (L1)"
group_label: "Finance Product Hierarchy"
@@ -85,6 +95,7 @@
sql: ${TABLE}.product_group ;;
drill_fields: [product_group_l2]
}
+
dimension: product_group_l2 {
label: "Product Group (L2)"
group_label: "Finance Product Hierarchy"
@@ -93,6 +104,7 @@
sql: ${TABLE}.product_group_l2 ;;
drill_fields: [logical_product_l3]
}
+
dimension: logical_product_l3 {
label: "Logical Product (L3)"
group_label: "Finance Product Hierarchy"
@@ -100,23 +112,26 @@
description: "Examples: Persistent Disk, VM Image Storage, GCE"
sql: ${TABLE}.logical_product_l3 ;;
}
- # dimension: machine_type {
- # view_label: "Product"
- # description: "Machine Type Classifications for Compute Engine"
- # sql: IF(${product_line_raw} = "Compute Engine", CASE
- # WHEN ${is_gke_node} THEN "GKE"
- # WHEN ${is_dataproc} THEN "Dataproc"
- # WHEN ${sku_description} LIKE '%A2 %' THEN 'A2'
- # WHEN ${sku_description} LIKE '%E2 %' THEN 'E2'
- # WHEN ${sku_description} LIKE '%Memory%optimized%' THEN 'M1/M2'
- # WHEN ${sku_description} LIKE '%N2 %' THEN 'N2'
- # WHEN ${sku_description} LIKE '%N2D%' THEN 'N2D'
- # WHEN ${sku_description} LIKE '%Compute%optimized%' THEN 'C2'
- # WHEN LOWER(${sku_description}) LIKE '%custom%ram%' OR ${sku_description} LIKE '%Custom%Core%' OR ${sku_description} LIKE '%N1 %' OR ${sku_description} LIKE '%v1: Cpu%' OR ${sku_description} LIKE '%v1: Ram%' OR ${sku_description} LIKE '%Instance Ram hosted on Sole Tenancy%' OR ${sku_description} LIKE '%Sole Tenancy Instance RAM%' OR ${sku_description} LIKE '%Sole Tenancy Instance Ram%' OR ${sku_description} LIKE '%Instance Core hosted on Sole Tenancy%' OR ${sku_description} LIKE '%Sole Tenancy Instance Core%' OR ${sku_description} LIKE 'Micro Instance%' OR ${sku_description} LIKE 'Preemptible Micro Instance%' OR ${sku_description} LIKE '%Small Instance%' THEN "N1"
- # ELSE "Other Machine Type"
- # END, NULL) ;;
- # drill_fields: [sku_description]
- # }
+
+
+ dimension: machine_type {
+ view_label: "Product"
+ description: "Machine Type Classifications for Compute Engine"
+ sql: IF(${product_line_raw} = "Compute Engine", CASE
+ WHEN ${is_gke_node} THEN "GKE"
+ WHEN ${is_dataproc} THEN "Dataproc"
+ WHEN ${sku_description} LIKE '%A2 %' THEN 'A2'
+ WHEN ${sku_description} LIKE '%E2 %' THEN 'E2'
+ WHEN ${sku_description} LIKE '%Memory%optimized%' THEN 'M1/M2'
+ WHEN ${sku_description} LIKE '%N2 %' THEN 'N2'
+ WHEN ${sku_description} LIKE '%N2D%' THEN 'N2D'
+ WHEN ${sku_description} LIKE '%Compute%optimized%' THEN 'C2'
+ WHEN LOWER(${sku_description}) LIKE '%custom%ram%' OR ${sku_description} LIKE '%Custom%Core%' OR ${sku_description} LIKE '%N1 %' OR ${sku_description} LIKE '%v1: Cpu%' OR ${sku_description} LIKE '%v1: Ram%' OR ${sku_description} LIKE '%Instance Ram hosted on Sole Tenancy%' OR ${sku_description} LIKE '%Sole Tenancy Instance RAM%' OR ${sku_description} LIKE '%Sole Tenancy Instance Ram%' OR ${sku_description} LIKE '%Instance Core hosted on Sole Tenancy%' OR ${sku_description} LIKE '%Sole Tenancy Instance Core%' OR ${sku_description} LIKE 'Micro Instance%' OR ${sku_description} LIKE 'Preemptible Micro Instance%' OR ${sku_description} LIKE '%Small Instance%' THEN "N1"
+ ELSE "Other Machine Type"
+ END, NULL) ;;
+ drill_fields: [sku_description]
+ }
+
dimension: product_group {
group_label: "Legacy Product Hierarchy"
view_label: "Product"