create revenue_view

Change-Id: I115fcc70fc6d8cee60ab76b2ed60ab28cf68d695
diff --git a/explores/.gitkeep b/explores/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/explores/.gitkeep
diff --git a/explores/revenue_explore.view.lkml b/explores/revenue_explore.view.lkml
new file mode 100644
index 0000000..d3a7a0f
--- /dev/null
+++ b/explores/revenue_explore.view.lkml
@@ -0,0 +1,9 @@
+include: "../views/*.view.lkml"
+explore: revenue_view {
+  view_name: revenue_view
+  label: "revenue explore label"
+  access_filter: {
+    field: revenue_view.billing_account_id
+    user_attribute: dept
+  }
+  }
diff --git a/hdeist-fdm.model.lkml b/hdeist-fdm.model.lkml
index 6007f90..d7800a6 100644
--- a/hdeist-fdm.model.lkml
+++ b/hdeist-fdm.model.lkml
@@ -1,10 +1,10 @@
 
-connection: "concord"
+connection: "gcc-internal"
 
 # bozo
 # wednesday
-include: "/*.view"
-include: "/*.explore"
+include: "views/*.view.lkml"
+# include: "/*.explore"
 datagroup: hdeist_fdm_default_datagroup {
   max_cache_age: "1 hour"
 }
diff --git a/uli_explore.explore.lkml b/uli_explore.explore.lkml
deleted file mode 100644
index 5a9dd8e..0000000
--- a/uli_explore.explore.lkml
+++ /dev/null
@@ -1,3 +0,0 @@
-include: "/*.view"
-
-explore: uli_view {}
diff --git a/uli_view.view.lkml b/uli_view.view.lkml
deleted file mode 100644
index 4b1ce12..0000000
--- a/uli_view.view.lkml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-view: uli_view {
-  sql_table_name: `irvine-sbx.fdm.uli` ;;
-
-  dimension: partition_date {
-    type: string
-    sql: ${TABLE}.partition_date ;;
-  }
-
-  dimension: service_id {
-    type: string
-    sql: ${TABLE}.service_id ;;
-  }
-
-  dimension: usage_date {
-    type: date
-    datatype: date
-    sql: ${TABLE}.usage_date ;;
-  }
-
-  dimension: zork {
-    type: string
-    sql: 'zork' ;;
-  }
-
-  measure: count {
-    type: count
-  }
-
-}
diff --git a/views/.gitkeep b/views/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/views/.gitkeep
diff --git a/views/revenue.view.lkml b/views/revenue.view.lkml
new file mode 100644
index 0000000..78cd57a
--- /dev/null
+++ b/views/revenue.view.lkml
@@ -0,0 +1,84 @@
+view: revenue_view {
+  sql_table_name: `irvine-sbx2.gcc_internal.revenue`
+    ;;
+
+  dimension: billing_account_id {
+    type: string
+    sql: ${TABLE}.billing_account_id ;;
+  }
+
+  dimension: currency_code {
+    type: string
+    sql: ${TABLE}.currency_code ;;
+  }
+
+  dimension_group: invoice_month_start {
+    type: time
+    timeframes: [
+      raw,
+      date,
+      week,
+      month,
+      quarter,
+      year
+    ]
+    convert_tz: no
+    datatype: date
+    sql: ${TABLE}.invoice_month_start ;;
+  }
+
+  dimension: product_group {
+    type: string
+    sql: ${TABLE}.product_group ;;
+  }
+
+  dimension: product_line {
+    type: string
+    sql: ${TABLE}.product_line ;;
+  }
+
+  dimension: segment {
+    type: string
+    sql: ${TABLE}.segment ;;
+  }
+
+  dimension: sfdc_account_id {
+    type: string
+    sql: ${TABLE}.sfdc_account_id ;;
+  }
+
+  dimension_group: usage {
+    type: time
+    timeframes: [
+      raw,
+      date,
+      week,
+      month,
+      quarter,
+      year
+    ]
+    convert_tz: no
+    datatype: date
+    sql: ${TABLE}.usage_date ;;
+  }
+
+  dimension: usd_revenue_cn {
+    type: number
+    sql: ${TABLE}.usd_revenue_cn ;;
+  }
+
+  dimension: usd_revenue_gross {
+    type: number
+    sql: ${TABLE}.usd_revenue_gross ;;
+  }
+
+  dimension: usd_revenue_net {
+    type: number
+    sql: ${TABLE}.usd_revenue_net ;;
+  }
+
+  measure: count {
+    type: count
+    drill_fields: []
+  }
+}