For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

◾Smartico DWH \ Transactional views, System

This page describes the transactional views that hold system events created by Smartico: bonuses given by Smartico, dynamic rewards, logins, custom actions and game sessions.

The name of a view is the name of the event with the "tr_" prefix. For example, the view tr_core_bonus_given holds the event core_bonus_given. Read the general rules of the DWH on the Smartico Data Warehouse (DWH) page first.

Rules for all transactional views

  • One row is one event. The primary key is event_id.

  • Every view is partitioned by event_time. Always filter on it, and do not apply a function to the column in the filter.

  • The views keep the events of the last 1080 days.

  • A view appears in your dataset after its first event. For example, tr_core_dynamic_bonus_issued appears after the first dynamic reward is issued.

  • Columns that hold the ID of an object (a bonus template, a formula, a casino game) join to the dimension tables named under each view.

  • Columns marked "ID of a value" hold a number, not a text. The text of each number is in a lookup view of your dataset, named under each view: see Text of value IDs. The numbers can differ between labels and between Smartico environments, so filter by the text through the lookup view, not by a fixed number.

  • Game session amounts are in the player's wallet currency. To get the amount in the label currency, divide it by user_to_label_cur_rate. The player's currency is core_wallet_currency in j_user.

  • A view can also have old columns that are no longer filled. They are not listed here.

Columns in every view:

Column
Type
Description

event_time

TIMESTAMP

Time of the event (UTC)

ingest_time

TIMESTAMP

Time when the event was stored in Smartico

label_id

INT64

Label ID

user_id

INT64

Smartico user ID. Joins to j_user_no_enums

event_id

INT64

ID of the event in Smartico. Use it to remove duplicates

user_to_label_cur_rate

NUMERIC

Rate from the player's currency to the label currency. Amount in the label currency = amount / user_to_label_cur_rate

The tables below list the other columns of each view.

Text of value IDs

The text of a column marked "ID of a value" is in a view of your dataset. Joins under each view names it for every such column:

  • For most columns, a view named lookup_ plus the name of the column. For example, the text of core_user_last_session_browser is in dwh_ext_xxx.lookup_core_user_last_session_browser.

A lookup_ view has two columns:

Column
Type
Description

id

INT64

The ID that the column holds

value

STRING

The text of the ID

  • It holds the values of your label and the values shared by all labels.

  • It is in your dataset when a transactional view of your dataset has the column.

  • A new value reaches the lookup view up to about an hour after it first appears. Use LEFT JOIN, so that the events of a new value stay in your totals; their text is empty until then.

  • For a column of type INT64[] (a list of IDs), use CROSS JOIN UNNEST on the column first, then join each ID.

Logins of the last 7 days per browser

Bonuses (by Smartico)

For the full details of each bonus (status, amounts, the campaign or mission that gave it), use j_bonuses.

dwh_ext_xxx.tr_core_bonus_given

Smartico gave a bonus to a player. One row per bonus.

Joins:

Column
Type
Description

core_smr_bonus_template_id

INT64

ID of the bonus template

core_smr_bonus_type_id

INT64

Type of the bonus. Same values as product_bonus_type_id in dm_bonus_template

Bonuses given by Smartico in the last 7 days, per bonus template

dwh_ext_xxx.tr_core_bonus_failed

Smartico tried to give a bonus to a player, and it failed. One row per failed bonus.

Joins:

Column
Type
Description

core_smr_bonus_template_id

INT64

ID of the bonus template

core_smr_bonus_type_id

INT64

Type of the bonus. Same values as product_bonus_type_id in dm_bonus_template

Dynamic rewards (by Smartico)

The value in core_dynamic_bonus_amount depends on the result type of the formula (formula_result_type_id in dm_j_formula):

  • bonus amount: the calculated amount of the bonus;

  • bonus template: the ID of the bonus template to give;

  • points, gems or diamonds: the number to add. It can be negative when the formula allows deductions.

dwh_ext_xxx.tr_core_dynamic_bonus_calculated

A dynamic reward was calculated for a player. One row per calculated reward.

Joins:

Column
Type
Description

core_dynamic_bonus_formula_id

INT64

ID of the formula

core_dynamic_bonus_amount

NUMERIC

Calculated value (see the meaning above)

dwh_ext_xxx.tr_core_dynamic_bonus_issued

Smartico started to give a calculated dynamic reward to a player. The event is sent before Smartico knows whether the reward was given. One row per attempt: a reward that is tried again can have several rows.

Joins:

Column
Type
Description

core_dynamic_bonus_formula_id

INT64

ID of the formula

core_dynamic_bonus_amount

NUMERIC

Calculated value (see the meaning above)

dwh_ext_xxx.tr_core_dynamic_bonus_issued_success

The platform accepted a dynamic reward that Smartico gave. One row per accepted reward. Only rewards whose formula gives a bonus amount or a bonus template have this event; points, gems and diamonds do not.

The view has only the columns that every view has. It also has the column core_dynamic_bonus_formula_id, which is always empty.

dwh_ext_xxx.tr_core_dynamic_bonus_issued_failed

A dynamic reward was not given: a cap stopped it, or the platform rejected it. One row per failed reward. Only rewards whose formula gives a bonus amount or a bonus template have this event; points, gems and diamonds do not.

The view has only the columns that every view has. It also has the column core_dynamic_bonus_formula_id, which is always empty.

Core System & User Actions (by Smartico)

dwh_ext_xxx.tr_login

A player logged in. One row per login. When Smartico counts a login is explained on the Events and actions page.

Joins:

Column
Type
Description

core_user_last_device_type

INT64

Type of the device. ID of a value; text in lookup_core_user_last_device_type

core_user_last_session_browser

INT64

Browser. ID of a value; text in lookup_core_user_last_session_browser

core_user_last_session_os_name

INT64

Operating system. ID of a value; text in lookup_core_user_last_session_os_name

core_last_login_entry

INT64

Where the player logged in, as your site reports it with _smartico.setLoginEntry. ID of a value (your own values; text in lookup_core_last_login_entry). Empty when your site does not report it

dwh_ext_xxx.tr_client_action

A custom action that your site sent with _smartico.action. One row per action.

Joins:

Column
Type
Description

client_action

INT64

Name of the action. ID of a value (text in lookup_client_action); the names are your own

dwh_ext_xxx.tr_gs_game_session_changed

A player switched to another casino game during a game session. The amounts and counts cover the game the player left, and only the play within the inactivity timeout (5 minutes by default) before the switch. Read more on the Game Sessions page. One row per switch.

Joins:

  • gs_game_old_id, gs_game_new_id → dm_casino_game_name (smr_game_id). Cast the column to INT64 for the join

Column
Type
Description

gs_game_old_id

NUMERIC

ID of the game the player left

gs_game_new_id

NUMERIC

ID of the game the player started

gs_session_start_date

TIMESTAMP

Start of the counted play

gs_session_end_date

TIMESTAMP

End of the counted play

gs_session_length_seconds

NUMERIC

Length of the counted play, in seconds

gs_event_delay_seconds

NUMERIC

Time between the last bet on the game the player left and the first bet on the new game, in seconds

gs_bets_count

NUMERIC

Number of bets

gs_total_bet_amount

NUMERIC

Total bet amount (real and bonus money)

gs_avg_bet_amount

NUMERIC

Average bet amount

gs_max_bet_amount

NUMERIC

Highest bet amount

gs_wins_count

NUMERIC

Number of wins

gs_total_win_amount

NUMERIC

Total win amount (real and bonus money)

gs_avg_win_amount

NUMERIC

Average win amount

gs_max_win_amount

NUMERIC

Highest win amount

dwh_ext_xxx.tr_gs_game_session_ended

A game session ended: the player made no bets for the inactivity timeout (5 minutes by default). The amounts and counts cover the whole session, across all games. Read more on the Game Sessions page. One row per session.

Joins:

Column
Type
Description

gs_all_game_ids

INT64[]

IDs of all games played in the session

gs_session_start_date

TIMESTAMP

Start of the session

gs_session_end_date

TIMESTAMP

End of the session

gs_session_length_seconds

NUMERIC

Length of the session, in seconds

gs_event_delay_seconds

NUMERIC

Time between the last bet and the event, in seconds

gs_bets_count

NUMERIC

Number of bets

gs_total_bet_amount

NUMERIC

Total bet amount (real and bonus money)

gs_avg_bet_amount

NUMERIC

Average bet amount

gs_max_bet_amount

NUMERIC

Highest bet amount

gs_wins_count

NUMERIC

Number of wins

gs_total_win_amount

NUMERIC

Total win amount (real and bonus money)

gs_avg_win_amount

NUMERIC

Average win amount

gs_max_win_amount

NUMERIC

Highest win amount

gs_total_ggr

NUMERIC

GGR of the session: total bet amount minus total win amount

gs_total_ggr_real

NUMERIC

GGR of the session in real money, without bonus money and with rollbacks taken into account. Empty when your platform does not send real and bonus amounts separately

gs_bets_rollback_count

NUMERIC

Number of rolled-back bets

gs_wins_rollback_count

NUMERIC

Number of rolled-back wins

gs_total_rollback_bet_amount

NUMERIC

Total amount of rolled-back bets

gs_total_rollback_win_amount

NUMERIC

Total amount of rolled-back wins

Game sessions of the previous day: count, average length and total GGR in the label currency

Last updated

Was this helpful?