fct_checkin


Description

Each row represents a single gym visit by a customer. A visit is recorded at the gym the customer checked into (organization_unit_id). If a customer visits a gym other than their home gym, this is called a cross-club visit.

To identify cross-club visits: compare organization_unit_id (the visited gym) with customer_organization_unit_id (the customer’s home gym). If they differ, the visit is a cross-club visit.

Note: when a customer has privacy settings enabled, their customer_id is masked. If their data was removed due to the data retention period configured in the ERP system, both customer_id and customer_organization_unit_id may be NULL.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
checkin_id int8 19 null

The primary key of this table. System column calculated by the source System.

checkin_time timestamp 29,6 null

The local timestamp at which the checkin happened.

checkout_time timestamp 29,6 null

The local timestamp at which the customer left the gym again (if he left).

checkin_date_id int4 10 null
dim_date.date_id fct_checkin_checkin_date_id_fkey R

The date at which the checkin happened

checkout_date_id int4 10 null
dim_date.date_id fct_checkin_checkout_date_id_fkey R

The date at which the checkout happened (if it happened).

organization_unit_id int8 19 null
dim_organization_unit.organization_unit_id fct_checkin_organization_unit_id_fkey R

The gym (organization_unit) which the customer visited.

customer_organization_unit_id int8 19 null
dim_organization_unit.organization_unit_id fct_checkin_customer_organization_unit_id_fkey R

The gym (organization_unit) the customer originally signed up to (their home gym). Can be used to identify cross-club visits: when this differs from organization_unit_id, the check-in is a cross-club visit.

customer_id int8 19 null
dim_customer.customer_id fct_checkin_customer_id_fkey R

The person who visited. Set to NULL when privacy masking applies. Also NULL when customer data was removed due to data retention.

device_id int8 19 null
dim_device.device_id fct_checkin_device_id_fkey R

The machine registering the checkin. Null if person was directly checked-in through Website (without a device).

has_privacy_config bool 1 null

Indicates whether privacy configuration applies to this record. When TRUE, customer_id is masked to NULL. customer_organization_unit_id is not masked by this flag, but may still be NULL if customer data was removed due to data retention.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

Relationships