create revenue_view
Change-Id: If21e72c35faa0d5167b9f44990cbc5e76b689467
diff --git a/hdeist-pdt.model.lkml b/hdeist-pdt.model.lkml
deleted file mode 100644
index 61cebad..0000000
--- a/hdeist-pdt.model.lkml
+++ /dev/null
@@ -1,13 +0,0 @@
-connection: "fdm_pdt"
-
-include: "/*.view"
-include: "//hdeist-fdm/uli_explore.explore"
-datagroup: pdt_datagroup {
- max_cache_age: "1 hour"
-}
-
-persist_with: pdt_datagroup
-
-explore: pru {}
-
-explore: uli_view2 {}
diff --git a/manifest.lkml b/manifest.lkml
deleted file mode 100644
index a9677a8..0000000
--- a/manifest.lkml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-project_name: "hdeist-pdt"
-
-local_dependency: {
- project: "hdeist-fdm"
-}
diff --git a/pru.view.lkml b/pru.view.lkml
deleted file mode 100644
index a2643d6..0000000
--- a/pru.view.lkml
+++ /dev/null
@@ -1,30 +0,0 @@
-include: "//hdeist-fdm/uli_explore.explore"
-
-view: pru {
- derived_table : {
- persist_for: "24 hours"
- explore_source: uli_view {
- column: partition_date {
- field: uli_view.partition_date
- }
- column: usage_date {
- field: uli_view.usage_date
- }
- column: zork {
- field: uli_view.zork
- }
- }
- }
- dimension: partition_date {
- type: string
- sql: ${TABLE}.partition_date ;;
- }
-dimension: usage_date {
- type: string
- sql: ${TABLE}.usage_date ;;
-}
-dimension: zork {
- type: string
- sql: ${TABLE}.zork ;;
-}
-}
diff --git a/uli_view2.view.lkml b/uli_view2.view.lkml
deleted file mode 100644
index 18d6d1f..0000000
--- a/uli_view2.view.lkml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-view: uli_view2 {
- 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: magoo {
- type: string
- sql: 'magoo' ;;
- }
- 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.view.lkml b/views/revenue_view.view.lkml
new file mode 100644
index 0000000..04083e4
--- /dev/null
+++ b/views/revenue_view.view.lkml
@@ -0,0 +1,69 @@
+view: revenue_view {
+ # # You can specify the table name if it's different from the view name:
+ sql_table_name: gcc_internal.revenue ;;
+ #
+ # # Define your dimensions and measures here, like this:
+ dimension: usage_date {
+ description: "usage date"
+ type: date
+ sql: ${TABLE}.usage_date ;;
+ }
+ #
+ # dimension: lifetime_orders {
+ # description: "The total number of orders for each user"
+ # type: number
+ # sql: ${TABLE}.lifetime_orders ;;
+ # }
+ #
+ # dimension_group: most_recent_purchase {
+ # description: "The date when each user last ordered"
+ # type: time
+ # timeframes: [date, week, month, year]
+ # sql: ${TABLE}.most_recent_purchase_at ;;
+ # }
+ #
+ # measure: total_lifetime_orders {
+ # description: "Use this for counting lifetime orders across many users"
+ # type: sum
+ # sql: ${lifetime_orders} ;;
+ # }
+}
+
+# view: revenue_view {
+# # Or, you could make this view a derived table, like this:
+# derived_table: {
+# sql: SELECT
+# user_id as user_id
+# , COUNT(*) as lifetime_orders
+# , MAX(orders.created_at) as most_recent_purchase_at
+# FROM orders
+# GROUP BY user_id
+# ;;
+# }
+#
+# # Define your dimensions and measures here, like this:
+# dimension: user_id {
+# description: "Unique ID for each user that has ordered"
+# type: number
+# sql: ${TABLE}.user_id ;;
+# }
+#
+# dimension: lifetime_orders {
+# description: "The total number of orders for each user"
+# type: number
+# sql: ${TABLE}.lifetime_orders ;;
+# }
+#
+# dimension_group: most_recent_purchase {
+# description: "The date when each user last ordered"
+# type: time
+# timeframes: [date, week, month, year]
+# sql: ${TABLE}.most_recent_purchase_at ;;
+# }
+#
+# measure: total_lifetime_orders {
+# description: "Use this for counting lifetime orders across many users"
+# type: sum
+# sql: ${lifetime_orders} ;;
+# }
+# }