-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ingest/lookml): emit all views with same name and different file …
…path (#9279)
- Loading branch information
1 parent
298b9be
commit a34fdfd
Showing
7 changed files
with
755 additions
and
6 deletions.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
...tests/integration/lookml/lkml_same_name_views_different_file_path_samples/data.model.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,7 @@ | ||
connection: "my_connection" | ||
|
||
include: "path1/foo.view.lkml" | ||
|
||
explore: aliased_explore { | ||
from: my_view | ||
} |
6 changes: 6 additions & 0 deletions
6
...ests/integration/lookml/lkml_same_name_views_different_file_path_samples/data2.model.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,6 @@ | ||
connection: "my_connection" | ||
include: "path2/foo.view.lkml" | ||
|
||
explore: duplicate_explore { | ||
from: my_view | ||
} |
47 changes: 47 additions & 0 deletions
47
...s/integration/lookml/lkml_same_name_views_different_file_path_samples/path1/foo.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,47 @@ | ||
view: my_view { | ||
derived_table: { | ||
sql: | ||
SELECT | ||
is_latest, | ||
country, | ||
city, | ||
timestamp, | ||
measurement | ||
FROM | ||
my_table ;; | ||
} | ||
|
||
dimension: country { | ||
type: string | ||
description: "The country" | ||
sql: ${TABLE}.country ;; | ||
} | ||
|
||
dimension: city { | ||
type: string | ||
description: "City" | ||
sql: ${TABLE}.city ;; | ||
} | ||
|
||
dimension: is_latest { | ||
type: yesno | ||
description: "Is latest data" | ||
sql: ${TABLE}.is_latest ;; | ||
} | ||
|
||
dimension_group: timestamp { | ||
group_label: "Timestamp" | ||
type: time | ||
description: "Timestamp of measurement" | ||
sql: ${TABLE}.timestamp ;; | ||
timeframes: [hour, date, week, day_of_week] | ||
} | ||
|
||
measure: average_measurement { | ||
group_label: "Measurement" | ||
type: average | ||
description: "My measurement" | ||
sql: ${TABLE}.measurement ;; | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...s/integration/lookml/lkml_same_name_views_different_file_path_samples/path2/foo.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,41 @@ | ||
view: my_view { | ||
derived_table: { | ||
sql: | ||
SELECT | ||
is_latest, | ||
country, | ||
city, | ||
timestamp, | ||
measurement | ||
FROM | ||
my_table ;; | ||
} | ||
|
||
dimension: city { | ||
type: string | ||
description: "City" | ||
sql: ${TABLE}.city ;; | ||
} | ||
|
||
dimension: is_latest { | ||
type: yesno | ||
description: "Is latest data" | ||
sql: ${TABLE}.is_latest ;; | ||
} | ||
|
||
dimension_group: timestamp { | ||
group_label: "Timestamp" | ||
type: time | ||
description: "Timestamp of measurement" | ||
sql: ${TABLE}.timestamp ;; | ||
timeframes: [hour, date, week, day_of_week] | ||
} | ||
|
||
measure: average_measurement { | ||
group_label: "Measurement" | ||
type: average | ||
description: "My measurement" | ||
sql: ${TABLE}.measurement ;; | ||
} | ||
|
||
} |
Oops, something went wrong.