Skip to content

Commit

Permalink
docs: update docs for 04939b5
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril committed Jan 29, 2024
1 parent 487b760 commit b8b276b
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion catalog.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.7.0", "generated_at": "2024-01-12T21:21:42.744492Z", "invocation_id": "a795bd6c-4581-43fe-b9ab-e6fb93378742", "env": {}}, "nodes": {}, "sources": {}, "errors": null}
{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.7.0", "generated_at": "2024-01-29T17:33:05.561716Z", "invocation_id": "23109c69-1db3-40c3-b53f-036608b155d3", "env": {}}, "nodes": {}, "sources": {}, "errors": null}
22 changes: 11 additions & 11 deletions compiled/aspects/models/base/xapi_events_all_parsed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@

SELECT
event_id as event_id,
JSON_VALUE(event_str, '$.verb.id') as verb_id,
JSON_VALUE(event::String, '$.verb.id') as verb_id,
COALESCE(
NULLIF(JSON_VALUE(event_str, '$.actor.account.name'), ''),
NULLIF(JSON_VALUE(event_str, '$.actor.mbox'), ''),
JSON_VALUE(event_str, '$.actor.mbox_sha1sum')
NULLIF(JSON_VALUE(event::String, '$.actor.account.name'), ''),
NULLIF(JSON_VALUE(event::String, '$.actor.mbox'), ''),
JSON_VALUE(event::String, '$.actor.mbox_sha1sum')
) as actor_id,
JSON_VALUE(event_str, '$.object.id') as object_id,
JSON_VALUE(event::String, '$.object.id') as object_id,
-- If the contextActivities parent is a course, use that. It can be a "course"
-- type, or a "cmi.interaction" type for multiple question problem submissions.
-- Otherwise use the object id for the course id.
multiIf(
-- If the contextActivities parent is a course, use that
JSON_VALUE(
event_str,
event::String,
'$.context.contextActivities.parent[0].definition.type'
) = 'http://adlnet.gov/expapi/activities/course',
JSON_VALUE(event_str, '$.context.contextActivities.parent[0].id'),
JSON_VALUE(event::String, '$.context.contextActivities.parent[0].id'),
-- Else if the contextActivities parent is a GroupActivity, it's a multi
-- question problem and we use the grouping id
JSON_VALUE(
event_str,
event::String,
'$.context.contextActivities.parent[0].objectType'
) in ('Activity', 'GroupActivity'),
JSON_VALUE(event_str, '$.context.contextActivities.grouping[0].id'),
JSON_VALUE(event::String, '$.context.contextActivities.grouping[0].id'),
-- Otherwise use the object id
JSON_VALUE(event_str, '$.object.id')
JSON_VALUE(event::String, '$.object.id')
) as course_id,
coalesce(get_org_from_course_url(course_id), '') as org,
emission_time as emission_time,
event_str as event_str
event::String as event
FROM `xapi`.`xapi_events_all`
2 changes: 1 addition & 1 deletion compiled/aspects/models/completion/completion_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
org,
verb_id,
JSON_VALUE(event_str, '$.result.extensions."https://w3id.org/xapi/cmi5/result/extensions/progress"') AS progress_percent
JSON_VALUE(event, '$.result.extensions."https://w3id.org/xapi/cmi5/result/extensions/progress"') AS progress_percent
FROM `xapi`.`xapi_events_all_parsed`
WHERE verb_id = 'http://adlnet.gov/expapi/verbs/progressed'
2 changes: 1 addition & 1 deletion compiled/aspects/models/enrollment/enrollment_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
org,
verb_id,
JSON_VALUE(event_str, '$.object.definition.extensions."https://w3id.org/xapi/acrossx/extensions/type"') AS enrollment_mode
JSON_VALUE(event, '$.object.definition.extensions."https://w3id.org/xapi/acrossx/extensions/type"') AS enrollment_mode
FROM `xapi`.`xapi_events_all_parsed`
WHERE verb_id IN (
'http://adlnet.gov/expapi/verbs/registered',
Expand Down
2 changes: 1 addition & 1 deletion compiled/aspects/models/forum/forum_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ SELECT
actor_id,
verb_id
FROM `xapi`.`xapi_events_all_parsed`
WHERE JSON_VALUE(event_str, '$.object.definition.type') = 'http://id.tincanapi.com/activitytype/discussion'
WHERE JSON_VALUE(event, '$.object.definition.type') = 'http://id.tincanapi.com/activitytype/discussion'
2 changes: 1 addition & 1 deletion compiled/aspects/models/grading/grading_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
org,
verb_id,
JSONExtractFloat(event_str, 'result', 'score', 'scaled') AS scaled_score
JSONExtractFloat(event, 'result', 'score', 'scaled') AS scaled_score
FROM `xapi`.`xapi_events_all_parsed`
WHERE verb_id IN ('http://id.tincanapi.com/verb/earned', 'https://w3id.org/xapi/acrossx/verbs/evaluated')
6 changes: 3 additions & 3 deletions compiled/aspects/models/navigation/navigation_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
org,
verb_id,
JSONExtractString(event_str, 'object', 'definition', 'type') AS object_type,
JSONExtractString(event, 'object', 'definition', 'type') AS object_type,
-- clicking a link and selecting a module outline have no starting-position field
if (
object_type in (
Expand All @@ -17,12 +17,12 @@ SELECT
),
0,
JSONExtractInt(
event_str,
event,
'context', 'extensions', 'http://id.tincanapi.com/extension/starting-position'
)
) AS starting_position,
JSONExtractString(
event_str,
event,
'context', 'extensions', 'http://id.tincanapi.com/extension/ending-point'
) AS ending_point
FROM
Expand Down
10 changes: 5 additions & 5 deletions compiled/aspects/models/problems/problem_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
org,
verb_id,
JSON_VALUE(event_str, '$.result.response') as responses,
JSON_VALUE(event_str, '$.result.score.scaled') as scaled_score,
JSON_VALUE(event, '$.result.response') as responses,
JSON_VALUE(event, '$.result.score.scaled') as scaled_score,
if(
verb_id = 'https://w3id.org/xapi/acrossx/verbs/evaluated',
cast(JSON_VALUE(event_str, '$.result.success') as Bool),
cast(JSON_VALUE(event, '$.result.success') as Bool),
false
) as success,
JSON_VALUE(event_str, '$.object.definition.interactionType') as interaction_type,
JSON_VALUE(event, '$.object.definition.interactionType') as interaction_type,
if(
verb_id = 'https://w3id.org/xapi/acrossx/verbs/evaluated',
cast(JSON_VALUE(event_str, '$.object.definition.extensions."http://id.tincanapi.com/extension/attempt-id"') as Int16),
cast(JSON_VALUE(event, '$.object.definition.extensions."http://id.tincanapi.com/extension/attempt-id"') as Int16),
0
) as attempts
FROM
Expand Down
2 changes: 1 addition & 1 deletion compiled/aspects/models/video/video_playback_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
org,
verb_id,
ceil(CAST(coalesce(nullIf(JSON_VALUE(event_str, '$.result.extensions."https://w3id.org/xapi/video/extensions/time"'), ''), nullIf(JSON_VALUE(event_str, '$.result.extensions."https://w3id.org/xapi/video/extensions/time-from"'), ''), '0.0'), 'Decimal32(2)')) AS video_position
ceil(CAST(coalesce(nullIf(JSON_VALUE(event, '$.result.extensions."https://w3id.org/xapi/video/extensions/time"'), ''), nullIf(JSON_VALUE(event, '$.result.extensions."https://w3id.org/xapi/video/extensions/time-from"'), ''), '0.0'), 'Decimal32(2)')) AS video_position
FROM `xapi`.`xapi_events_all_parsed`
WHERE (verb_id IN ('http://adlnet.gov/expapi/verbs/completed', 'http://adlnet.gov/expapi/verbs/initialized', 'http://adlnet.gov/expapi/verbs/terminated', 'https://w3id.org/xapi/video/verbs/paused', 'https://w3id.org/xapi/video/verbs/played', 'https://w3id.org/xapi/video/verbs/seeked')) AND (object_id LIKE '%video+block%')
4 changes: 2 additions & 2 deletions compiled/aspects/models/video/video_transcript_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ SELECT
splitByString('/', course_id)[-1] AS course_key,
splitByString('/xblock/', object_id)[2] as video_id,
actor_id,
JSONExtractBool(event_str, 'result','extensions','https://w3id.org/xapi/video/extensions/cc-enabled') as cc_enabled
JSONExtractBool(event, 'result','extensions','https://w3id.org/xapi/video/extensions/cc-enabled') as cc_enabled
FROM `xapi`.`xapi_events_all_parsed`
WHERE
verb_id IN ('http://adlnet.gov/expapi/verbs/interacted')
AND JSONHas(event_str, 'result', 'extensions', 'https://w3id.org/xapi/video/extensions/cc-enabled')
AND JSONHas(event, 'result', 'extensions', 'https://w3id.org/xapi/video/extensions/cc-enabled')
Binary file modified graph.gpickle
Binary file not shown.
2 changes: 1 addition & 1 deletion graph_summary.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"_invocation_id": "a795bd6c-4581-43fe-b9ab-e6fb93378742", "linked": {"0": {"name": "source.aspects.xapi.xapi_events_all", "type": "source", "succ": [4]}, "1": {"name": "source.aspects.event_sink.course_block_names", "type": "source", "succ": [3, 7, 22]}, "2": {"name": "source.aspects.event_sink.course_names", "type": "source", "succ": [3, 6, 7, 18, 22]}, "3": {"name": "model.aspects.dim_course_blocks", "type": "model", "succ": [9, 12, 13, 15, 20]}, "4": {"name": "model.aspects.xapi_events_all_parsed", "type": "model", "succ": [5, 8, 11, 10, 14, 19, 21, 23]}, "5": {"name": "model.aspects.forum_events", "type": "model", "succ": [6]}, "6": {"name": "model.aspects.fact_forum_interactions", "type": "model"}, "7": {"name": "model.aspects.fact_grades", "type": "model", "succ": [26]}, "8": {"name": "model.aspects.grading_events", "type": "model", "succ": [7]}, "9": {"name": "model.aspects.fact_video_plays", "type": "model"}, "10": {"name": "model.aspects.video_playback_events", "type": "model", "succ": [9]}, "11": {"name": "model.aspects.video_transcript_events", "type": "model", "succ": [12]}, "12": {"name": "model.aspects.fact_transcript_usage", "type": "model"}, "13": {"name": "model.aspects.fact_problem_responses", "type": "model", "succ": [17]}, "14": {"name": "model.aspects.problem_events", "type": "model", "succ": [13, 15]}, "15": {"name": "model.aspects.int_problem_hints", "type": "model", "succ": [16]}, "16": {"name": "model.aspects.fact_learner_problem_summary", "type": "model", "succ": [24, 27, 28]}, "17": {"name": "model.aspects.int_problem_results", "type": "model", "succ": [16, 25]}, "18": {"name": "model.aspects.fact_enrollments", "type": "model", "succ": [29]}, "19": {"name": "model.aspects.enrollment_events", "type": "model", "succ": [18]}, "20": {"name": "model.aspects.fact_navigation", "type": "model"}, "21": {"name": "model.aspects.navigation_events", "type": "model", "succ": [20]}, "22": {"name": "model.aspects.fact_completions", "type": "model"}, "23": {"name": "model.aspects.completion_events", "type": "model", "succ": [22]}, "24": {"name": "test.aspects.learner_problem_summary_uniqueness", "type": "test"}, "25": {"name": "test.aspects.problem_results_uniqueness", "type": "test"}, "26": {"name": "test.aspects.accepted_values_fact_grades_grade_type__course__subsection__problem.712bd50c2f", "type": "test"}, "27": {"name": "test.aspects.not_null_fact_learner_problem_summary_success.76b52cb2da", "type": "test"}, "28": {"name": "test.aspects.not_null_fact_learner_problem_summary_attempts.817beed32b", "type": "test"}, "29": {"name": "test.aspects.accepted_values_fact_enrollments_enrollment_status__registered__unregistered.f8d10203f4", "type": "test"}}}
{"_invocation_id": "23109c69-1db3-40c3-b53f-036608b155d3", "linked": {"0": {"name": "source.aspects.xapi.xapi_events_all", "type": "source", "succ": [4]}, "1": {"name": "source.aspects.event_sink.course_block_names", "type": "source", "succ": [6, 10, 14]}, "2": {"name": "source.aspects.event_sink.course_names", "type": "source", "succ": [5, 6, 10, 11, 14]}, "3": {"name": "model.aspects.enrollment_events", "type": "model", "succ": [5]}, "4": {"name": "model.aspects.xapi_events_all_parsed", "type": "model", "succ": [3, 7, 9, 12, 13, 16, 21, 23]}, "5": {"name": "model.aspects.fact_enrollments", "type": "model", "succ": [26]}, "6": {"name": "model.aspects.dim_course_blocks", "type": "model", "succ": [8, 15, 18, 20, 22]}, "7": {"name": "model.aspects.navigation_events", "type": "model", "succ": [8]}, "8": {"name": "model.aspects.fact_navigation", "type": "model"}, "9": {"name": "model.aspects.completion_events", "type": "model", "succ": [10]}, "10": {"name": "model.aspects.fact_completions", "type": "model"}, "11": {"name": "model.aspects.fact_forum_interactions", "type": "model"}, "12": {"name": "model.aspects.forum_events", "type": "model", "succ": [11]}, "13": {"name": "model.aspects.grading_events", "type": "model", "succ": [14]}, "14": {"name": "model.aspects.fact_grades", "type": "model", "succ": [27]}, "15": {"name": "model.aspects.int_problem_hints", "type": "model", "succ": [19]}, "16": {"name": "model.aspects.problem_events", "type": "model", "succ": [15, 18]}, "17": {"name": "model.aspects.int_problem_results", "type": "model", "succ": [19, 24]}, "18": {"name": "model.aspects.fact_problem_responses", "type": "model", "succ": [17]}, "19": {"name": "model.aspects.fact_learner_problem_summary", "type": "model", "succ": [25, 28, 29]}, "20": {"name": "model.aspects.fact_video_plays", "type": "model"}, "21": {"name": "model.aspects.video_playback_events", "type": "model", "succ": [20]}, "22": {"name": "model.aspects.fact_transcript_usage", "type": "model"}, "23": {"name": "model.aspects.video_transcript_events", "type": "model", "succ": [22]}, "24": {"name": "test.aspects.problem_results_uniqueness", "type": "test"}, "25": {"name": "test.aspects.learner_problem_summary_uniqueness", "type": "test"}, "26": {"name": "test.aspects.accepted_values_fact_enrollments_enrollment_status__registered__unregistered.f8d10203f4", "type": "test"}, "27": {"name": "test.aspects.accepted_values_fact_grades_grade_type__course__subsection__problem.712bd50c2f", "type": "test"}, "28": {"name": "test.aspects.not_null_fact_learner_problem_summary_success.76b52cb2da", "type": "test"}, "29": {"name": "test.aspects.not_null_fact_learner_problem_summary_attempts.817beed32b", "type": "test"}}}
2 changes: 1 addition & 1 deletion manifest.json

Large diffs are not rendered by default.

Binary file modified partial_parse.msgpack
Binary file not shown.
2 changes: 1 addition & 1 deletion run_results.json

Large diffs are not rendered by default.

0 comments on commit b8b276b

Please sign in to comment.