-
Notifications
You must be signed in to change notification settings - Fork 16
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
6f0ea77
commit 48e7af5
Showing
3 changed files
with
30 additions
and
19 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
24 changes: 15 additions & 9 deletions
24
tutoraspects/templates/openedx-assets/queries/learner_performance_breakdown.sql
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
21 changes: 12 additions & 9 deletions
21
tutoraspects/templates/openedx-assets/queries/tag_filter_dataset.sql
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
with data as ( | ||
select | ||
id, | ||
case when parent = 0 then id else cast(parent as int) end as sort_order_1, | ||
case when parent = 0 then 0 else 1 end as sort_order_2, | ||
concat(repeat('- ',countMatches(lineage,',')),value) as tag, | ||
row_number() over (order by sort_order_1, sort_order_2, value) as rownum | ||
from {{ ASPECTS_EVENT_SINK_DATABASE }}.most_recent_tags | ||
) select id, rownum, tag from data | ||
with | ||
data as ( | ||
select | ||
id, | ||
case when parent = 0 then id else cast(parent as int) end as sort_order_1, | ||
case when parent = 0 then 0 else 1 end as sort_order_2, | ||
concat(repeat('- ', countMatches(lineage, ',')), value) as tag, | ||
row_number() over (order by sort_order_1, sort_order_2, value) as rownum | ||
from {{ ASPECTS_EVENT_SINK_DATABASE }}.most_recent_tags | ||
) | ||
select id, rownum, tag | ||
from data |