Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • This document describes the enhanced/derived Device and Extended User Profile schemas, design of how the profile data is captured and how it can be used across various systems.

Design Flow:

Schema Design for

...

User and Device Profile

Computation Table:

Device Profile -

25


Field

TypeProfile

Description

Source

Release
1device_idStringDeviceUnique id of device

From first source which inserts a record

1.11
2

total_ts

DoubleDevice

Total Time spent on device

Device profile updater data product

1.11
3

total_launches

LongDevice

Number app/portal launches from the device

Device profile updater data product

1.11
4

avg_ts

DoubleDevice

Average time spent on device

Device profile updater data product

1.11
5

first_access

TimestampDevice

Timestamp on which device was first accessed

Device profile updater data product

1.11
6

last_access

Timestamp

Device

Timestamp on which device was last accessed

Device profile updater data product

1.11
7

state

String

Device

State from which device is accessed

Device Register API

1.12
8

state_code

String

Device Device state code

Device Register API

1.14
9

state_code_custom

String

Device Device custom state code

Device Register API

1.14
10

state_custom

StringDevice

Device custom state name

Device Register API

1.14
11

city

String

Device

City from which device is accessed

Device Register API

1.12
12

country

String

Device

Country from which device is accessed

Device Register API

1.14
13

country_code

StringDevice

Device country code

Device Register API

1.14
14

district_custom

String

Device Device custom district name

Device Register API

1.14
15

device_spec

Map<String,String>Device

Device Specification

Device Register API

1.12
16

uaspec

Map<String,String>Device

Device user agent data

Device Register API

1.12
17

fcm_token

String

Device

FCM token for app devices

Device Register API

2.1.0
18

producer_id

StringDevice

Producer id for which device belongs to(App/Portal)

Device Register API

2.1.0
19

producer_ver

String

Device

Version of producer

Device profile updater data product

TBD
20

user_ids

List<String>Device

List of unique users accessed from the device

Device profile updater data product

TBD
21

user_count

Long

Device

Unique users accessed from the device

Device profile updater data product

TBD
22

last_updated_by

StringDevice

Source from which record was last updated

Source which is updating the record

TBD
23

sources

List<String>Device

List of sources from which record gets updated

From all the sources

24user_idStringUserUnique id for userFrom first source which inserts a record2.2.0
TBD


User Profile


FieldTypeDescriptionSourceRelease
1

user_type

String

User

Type of user(Anonymous/SelfSignedIn/ValidatedUser)

User_Org Cassandra via Samza job

2.2.0
26
2

user_role

String

User

Role of user(Student/Teacher)

AUDIT events via Samza job

2.2.0
27
3

sign_in_type

String

User

Type of sign-in(GoogleAuth/SingleSignIn)

User_Org Cassandra via Samza job

2.2.0
28
4user_stateString
User

State name of the User

User_Org Cassandra via Samza job

29
TBD
5user_districtString
User
District name of the UserUser_Org Cassandra via Samza jobTBD
30
6user_blockString
User
Block name of the UserUser_Org Cassandra via Samza job
31
TBD
7

first_access

Timestamp

User

Timestamp on which user was first seen

User Profile Updater data product

32
TBD
8

last_access

Timestamp

User

Timestamp on which user was last seen

User Profile Updater data product

TBD
33
9

last_device_accessed

String

User

Device id on which user was last seen

User Profile Updater data product

34
TBD
10

device_ids

List<String>

User

List of unique devices on which user was seen

User Profile Updater data product

TBD
35
11

last_updated_by

String

User

Source from which record was last updated

Source which is updating the record

TBD
36
12

sources

List<String>

User

List of sources from which record gets updated

From all the sources

37
TBD
13

last_content_played

String

User

Last content played by user

User Profile Updater data product

TBD
38
14

total_ts

Double

User

Total time spent by user

User Profile Updater data product

TBD


Questions:

  • Possibility of switch in user_role for APP users, Is it ok to have multiple values for user_role in the telemetry for same user_id?
  • Can we enhance the existing user table or create new one in analytics database.