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 6b792d1 commit bdf4058
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ select
from enrollments
inner join
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_user_pii as users
on enrollments.actor_id = users.external_user_id::String
on (enrollments.actor_id like 'mailto:%' and SUBSTRING(enrollments.actor_id, 8) = users.email)
or enrollments.actor_id = toString(users.external_user_id)
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ join
)
left outer join
{{ ASPECTS_EVENT_SINK_DATABASE }}.user_pii users
on full_responses.actor_id = users.external_user_id::String
on (full_responses.actor_id like 'mailto:%' and SUBSTRING(full_responses.actor_id, 8) = users.email)
or full_responses.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 @@ -121,7 +121,8 @@ join
)
left outer join
{{ ASPECTS_EVENT_SINK_DATABASE }}.user_pii users
on full_responses.actor_id = users.external_user_id::String
on (full_responses.actor_id like 'mailto:%' and SUBSTRING(full_responses.actor_id, 8) = users.email)
or full_responses.actor_id = toString(users.external_user_id)
join
coursewide_attempts
on full_responses.org = coursewide_attempts.org
Expand Down

0 comments on commit bdf4058

Please sign in to comment.