Skip to content

Commit

Permalink
feat: update dbt and use new param view
Browse files Browse the repository at this point in the history
  • Loading branch information
saraburns1 committed Nov 14, 2024
1 parent 29892f0 commit 4f466ea
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 44 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ jobs:
k8s:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: setup python
Expand All @@ -177,20 +191,6 @@ jobs:
kustomize build $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version 1.22.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: true
- name: Tutor build openedx
run: tutor images build openedx aspects aspects-superset
- name: Create k8s Kind Cluster
Expand Down
2 changes: 1 addition & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
# For now we are pulling this from github, which should allow maximum
# flexibility for forking, running branches, specific versions, etc.
("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"),
("DBT_BRANCH", "v3.33.5"),
("DBT_BRANCH", "v3.33.7"),
("DBT_SSH_KEY", ""),
("DBT_STATE_DIR", "/app/aspects-dbt/state"),
("DBT_PROFILES_DIR", "/app/aspects/dbt/"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ always_filter_main_dttm: false
cache_timeout: null
columns:
- advanced_data_type: null
column_name: course_name
column_name: rewatched_time
description: null
expression: ''
expression: null
extra:
warning_markdown: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: Course Name
type: Decimal(38, 2)
verbose_name: Rewatched Time
- advanced_data_type: null
column_name: video_duration
column_name: watched_time
description: null
expression: null
extra:
Expand All @@ -26,10 +26,23 @@ columns:
is_active: true
is_dttm: false
python_date_format: null
type: Int64
verbose_name: Video Duration
type: Decimal(38, 2)
verbose_name: Watched Time
- advanced_data_type: null
column_name: rewatched_time
column_name: course_name
description: null
expression: ''
extra:
warning_markdown: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: Course Name
- advanced_data_type: null
column_name: video_count
description: null
expression: null
extra:
Expand All @@ -39,10 +52,10 @@ columns:
is_active: true
is_dttm: false
python_date_format: null
type: Int64
verbose_name: Rewatched Time
type: Int32
verbose_name: Video Count
- advanced_data_type: null
column_name: watched_time
column_name: video_duration
description: null
expression: null
extra:
Expand All @@ -53,7 +66,7 @@ columns:
is_dttm: false
python_date_format: null
type: Int64
verbose_name: Watched Time
verbose_name: Video Duration
- advanced_data_type: null
column_name: actor_id
description: null
Expand Down Expand Up @@ -106,18 +119,6 @@ columns:
python_date_format: null
type: String
verbose_name: Org
- advanced_data_type: null
column_name: video_count
description: null
expression: null
extra: {}
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: Int32
verbose_name: Video Count
database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6
default_endpoint: null
description: null
Expand All @@ -129,7 +130,7 @@ metrics:
- currency: null
d3format: null
description: null
expression: (sum(rewatched_time)/count(actor_id))/sum(video_duration)
expression: if(sum(video_duration) > 0,(sum(rewatched_time)/count(actor_id))/sum(video_duration),0)
extra:
warning_markdown: ''
metric_name: rewatched_percent
Expand All @@ -139,7 +140,7 @@ metrics:
- currency: null
d3format: null
description: null
expression: (sum(watched_time)/count(actor_id))/sum(video_duration)
expression: if(sum(watched_time)>0,(sum(watched_time)/count(actor_id))/sum(video_duration),0)
extra:
warning_markdown: ''
metric_name: watched_percent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ select
video_duration,
watched_time,
rewatched_time
from {{ ASPECTS_XAPI_DATABASE }}.watched_video_duration
left join {{ ASPECTS_EVENT_SINK_DATABASE }}.course_names as names
using org, course_key
from
{{ DBT_PROFILE_TARGET_DATABASE }}.watched_video_duration(
{% raw -%}
org_filter ={{ filter_values("org") }},
course_name_filter ={{ filter_values("course_name") }}
{%- endraw %}
) as a
left join
{{ ASPECTS_EVENT_SINK_DATABASE }}.course_names as names
on a.org = names.org
and a.course_key = names.course_key
where 1 = 1 {% include 'openedx-assets/queries/common_filters.sql' %}

0 comments on commit 4f466ea

Please sign in to comment.