Skip to content

Commit

Permalink
revert to prev state
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeperdeep committed Sep 3, 2024
1 parent 90d5d4c commit 09aea86
Show file tree
Hide file tree
Showing 5 changed files with 666 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
view: employee_salary_rating {
derived_table: {
sql: SELECT
employee_id,
employee_name,
{% if dw_eff_dt_date._is_selected or finance_dw_eff_dt_date._is_selected %}
prod_core.data.r_metric_summary_v2
{% elsif dw_eff_dt_week._is_selected or finance_dw_eff_dt_week._is_selected %}
prod_core.data.r_metric_summary_v3
{% else %}
'default_table' as source
{% endif %},
employee_income
FROM source_table
WHERE
{% condition source_region %} source_table.region {% endcondition %} AND
{% if rating_window._is_filtered %}
{% condition rating_window %} DATE (rating_created) {% endcondition %}
{% endif %}
;;
}

filter: rating_window {
description: "Date window in which to look for rating"
default_value: "90 days ago for 90 days"
datatype: date
type: date
}

dimension: id {
type: number
sql: ${TABLE}.employee_id;;
}

dimension: name {
type: string
sql: ${TABLE}.employee_name;;
}

dimension: source {
type: string
sql: ${TABLE}.source ;;
}

dimension: income {
type: number
sql: ${TABLE}.employee_income ;;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
view: parent_view {
sql_table_name: `dataset.table` ;;

dimension: id {
primary_key: yes
type: string
sql: ${TABLE}.id ;;
}

dimension: parent_dimension_1 {
type: string
sql: ${TABLE}.parent_dimension_1 ;;
}

measure: parent_count {
type: count
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
view: rent_as_employee_income_source {
sql_table_name: (
SELECT id,
name,
source
FROM ${employee_income_source.SQL_TABLE_NAME}
WHERE source = "RENT"
ORDER BY source desc
LIMIT 10
);;


dimension: id {
type: number
sql: ${TABLE}.id ;;
}

dimension: name {
type: string
sql: ${TABLE}.name ;;
}

dimension: source {
type: string
sql: ${TABLE}.source ;;
}
}
Loading

0 comments on commit 09aea86

Please sign in to comment.