-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90d5d4c
commit 09aea86
Showing
5 changed files
with
666 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
...tests/integration/lookml/vv-lineage-and-liquid-templates/employee_salary_rating.view.lkml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ;; | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
...-ingestion/tests/integration/lookml/vv-lineage-and-liquid-templates/parent_view.view.lkml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...tegration/lookml/vv-lineage-and-liquid-templates/rent_as_employee_income_source.view.lkml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ;; | ||
} | ||
} |
Oops, something went wrong.