Skip to content

Commit

Permalink
Add docs for columns
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Jan 3, 2024
1 parent c7310ae commit 9d7f97e
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 5 deletions.
40 changes: 40 additions & 0 deletions docs/markdown/snowplow_unified_common_cols.md
Original file line number Diff line number Diff line change
Expand Up @@ -1217,3 +1217,43 @@ Referrer URL, source of this deep-link.
{% docs col_event_index_in_session %}
A session index of the event.
{% enddocs %}

{% docs col_foreground_sec %}
Time in seconds spent on the current screen while the app was in foreground.
{% enddocs %}

{% docs col_background_sec %}
Time in seconds spent on the current screen while the app was in background
{% enddocs %}

{% docs col_last_item_index %}
Index of the last viewed item in the list on the screen
{% enddocs %}

{% docs col_items_count %}
Total number of items in the list on the screen
{% enddocs %}

{% docs col_min_x_offset %}
Minimum horizontal scroll offset on the scroll view in pixels
{% enddocs %}

{% docs col_max_x_offset %}
Maximum horizontal scroll offset on the scroll view in pixels
{% enddocs %}

{% docs col_min_y_offset %}
Minimum vertical scroll offset on the scroll view in pixels
{% enddocs %}

{% docs col_max_y_offset %}
Maximum vertical scroll offset on the scroll view in pixels
{% enddocs %}

{% docs col_content_width %}
Width of the scroll view in pixels
{% enddocs %}

{% docs col_content_height %}
Height of the scroll view in pixels
{% enddocs %}
21 changes: 20 additions & 1 deletion models/base/scratch/base_scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,16 @@ models:
- name: app_error__stack_trace
- name: app_error__thread_id
- name: app_error__thread_name
- name: screen_summary__foreground_sec
- name: screen_summary__background_sec
- name: screen_summary__last_item_index
- name: screen_summary__items_count
- name: screen_summary__min_x_offset
- name: screen_summary__min_y_offset
- name: screen_summary__max_x_offset
- name: screen_summary__max_y_offset
- name: screen_summary__content_width
- name: screen_summary__content_height
- name: snowplow_unified_events_this_run
description: '{{ doc("table_events_this_run") }}'
columns:
Expand Down Expand Up @@ -709,6 +719,16 @@ models:
- name: app_error__thread_name
- name: app_error___tstamp
- name: app_error___id
- name: screen_summary__foreground_sec
- name: screen_summary__background_sec
- name: screen_summary__last_item_index
- name: screen_summary__items_count
- name: screen_summary__min_x_offset
- name: screen_summary__min_y_offset
- name: screen_summary__max_x_offset
- name: screen_summary__max_y_offset
- name: screen_summary__content_width
- name: screen_summary__content_height
- name: deep_link__url
- name: deep_link__referrer
- name: deep_link___tstamp
Expand Down Expand Up @@ -756,4 +776,3 @@ models:
- name: device_identifier
- name: platform_name
- name: device_category
# TODO: add screen summary fields
29 changes: 27 additions & 2 deletions models/base/src_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -574,5 +574,30 @@ sources:
description: '{{ doc("col_url") }}'
- name: referrer
description: '{{ doc("col_referrer") }}'
# TODO: add screen summary table

- name: contexts_com_snowplowanalytics_mobile_screen_summary_1
description: '{{ doc("table_deep_link_context") }}'
columns:
- name: root_id
description: '{{ doc("col_root_id") }}'
- name: root_tstamp
description: '{{ doc("col_root_tstamp") }}'
- name: foreground_sec
description: '{{ doc("col_foreground_sec") }}'
- name: background_sec
description: '{{ doc("col_background_sec") }}'
- name: last_item_index
description: '{{ doc("col_last_item_index") }}'
- name: items_count
description: '{{ doc("col_items_count") }}'
- name: min_x_offset
description: '{{ doc("col_min_x_offset") }}'
- name: max_x_offset
description: '{{ doc("col_max_x_offset") }}'
- name: min_y_offset
description: '{{ doc("col_min_y_offset") }}'
- name: max_y_offset
description: '{{ doc("col_max_y_offset") }}'
- name: content_width
description: '{{ doc("col_content_width") }}'
- name: content_height
description: '{{ doc("col_content_height") }}'
1 change: 0 additions & 1 deletion models/views/scratch/snowplow_unified_pv_engaged_time.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ select
ev.view_id,
ev.session_identifier,
max(ev.derived_tstamp) as end_tstamp,
{# todo: coalesce from the screen_summary entity, foreground_sec property #}
({{ heartbeat_length }} * ({{ n_unique_pings }} - 1)) + {{ min_visit_length }} as engaged_time_in_s

from {{ ref('snowplow_unified_events_this_run') }} as ev
Expand Down
7 changes: 6 additions & 1 deletion models/views/views.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ models:
description: Percentage of page scrolled horizontally
- name: vertical_percentage_scrolled
description: Percentage of page scrolled vertically
# TODO: add list metrics
- name: last_list_item_index
description: '{{ doc("col_last_list_item_index") }}'
- name: list_items_count
description: '{{ doc("col_list_items_count") }}'
- name: list_items_percentage_scrolled
description: '{{ doc("col_list_items_percentage_scrolled") }}'
- name: doc_width
description: '{{ doc("col_doc_width") }}'
- name: doc_height
Expand Down

0 comments on commit 9d7f97e

Please sign in to comment.