Skip to content

Commit

Permalink
fix: parse external_id to string instead of actor_id to uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 31, 2024
1 parent 866f4c0 commit 6b792d1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
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.3"),
("DBT_BRANCH", "v3.33.4"),
("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 @@ -49,5 +49,6 @@ join
)
left outer join
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_user_pii users
on toUUID(pv.actor_id) = users.external_user_id
on (pv.actor_id like 'mailto:%' and SUBSTRING(pv.actor_id, 8) = users.email)
or pv.actor_id = toString(users.external_user_id)
where 1 = 1 {% include 'openedx-assets/queries/common_filters.sql' %}
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ join
)
left outer join
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_user_pii users
on toUUID(pe.actor_id) = users.external_user_id
on (pe.actor_id like 'mailto:%' and SUBSTRING(pe.actor_id, 8) = users.email)
or pe.actor_id = toString(users.external_user_id)
where 1 = 1 {% include 'openedx-assets/queries/common_filters.sql' %}
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ join
)
left outer join
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_user_pii users
on toUUID(ve.actor_id) = users.external_user_id
on (ve.actor_id like 'mailto:%' and SUBSTRING(ve.actor_id, 8) = users.email)
or ve.actor_id = toString(users.external_user_id)
where 1 = 1 {% include 'openedx-assets/queries/common_filters.sql' %}
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ select
from enriched_segments
left outer join
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_user_pii users
on toUUID(actor_id) = users.external_user_id
on (actor_id like 'mailto:%' and SUBSTRING(actor_id, 8) = users.email)
or actor_id = toString(users.external_user_id)
order by segment_start

0 comments on commit 6b792d1

Please sign in to comment.