Skip to content

Commit 5814b36

Browse files
committed
Added mobile_analytics schema description for Live dataset
1 parent b858da5 commit 5814b36

File tree

7 files changed

+90
-4
lines changed

7 files changed

+90
-4
lines changed

src/config/databases/bindle/tables/mobile_analytics_events.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
{
3333
"name": "device_type",
34-
"description": "Model of a a user’s smartphone and the version of the OS, for example iPhone 7,12.1.0.",
34+
"description": "Model of a user’s smartphone and the version of the OS, for example iPhone 7,12.1.0.",
3535
"type": "text"
3636
},
3737
{

src/config/databases/live/edges.json

+16
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,21 @@
2626
"target": "trials",
2727
"targetKey": "product_id",
2828
"relation": "hasMany"
29+
},
30+
{
31+
"source": "users",
32+
"sourceKey": "id",
33+
"target": "users",
34+
"targetKey": "referrer_id",
35+
"relation": "hasMany",
36+
"sourcePosition": "right",
37+
"targetPosition": "right"
38+
},
39+
{
40+
"source": "users",
41+
"sourceKey": "id",
42+
"target": "mobile_analytics.events",
43+
"targetKey": "user_id",
44+
"relation": "hasMany"
2945
}
3046
]
+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"DEFAULT": "#91C4F2",
3-
"public": "#91C4F2"
4-
}
3+
"public": "#91C4F2",
4+
"mobile_analytics": "#FFD791"
5+
}

src/config/databases/live/tablePositions.json

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"mobile_analytics.events": {
3+
"x": 784,
4+
"y": -128
5+
},
26
"public.products": {
37
"x": 0,
48
"y": 96

src/config/databases/live/tables.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import productsTable from "./tables/products.json";
44
import purchasesTable from "./tables/purchases.json";
55
import trialsTable from "./tables/trials.json";
66
import usersTable from "./tables/users.json";
7+
import mobileAnalyticsEventsTable from "./tables/mobile_analytics_events.json";
78

89
const tables: TableConfig[] = [
910
productsTable,
1011
purchasesTable,
1112
trialsTable,
12-
usersTable
13+
usersTable,
14+
mobileAnalyticsEventsTable
1315
];
1416

1517
export default tables;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"schema": "mobile_analytics",
3+
"name": "events",
4+
"description": "This analytics table contains all events tracked in the Meditation iOS app.",
5+
"columns": [
6+
{
7+
"name": "id",
8+
"description": "Unique identifier of an event.",
9+
"type": "bigint",
10+
"key": true
11+
},
12+
{
13+
"name": "category",
14+
"description": "Category parameter of an event, for example onboarding.",
15+
"type": "text"
16+
},
17+
{
18+
"name": "action",
19+
"description": "Action parameter of an event, for example screenview.",
20+
"type": "text"
21+
},
22+
{
23+
"name": "name",
24+
"description": "Name parameter of an event, for example bindle-content.",
25+
"type": "text"
26+
},
27+
{
28+
"name": "screen_resolution",
29+
"description": "Resolution of a user’s smartphone, for example 375x812.",
30+
"type": "text"
31+
},
32+
{
33+
"name": "device_type",
34+
"description": "Model of a user’s smartphone and the version of the OS, for example iPhone 15 Pro,17.0",
35+
"type": "text"
36+
},
37+
{
38+
"name": "user_id",
39+
"description": "ID of a user in the users table.",
40+
"type": "integer"
41+
},
42+
{
43+
"name": "country",
44+
"description": "Country derived from user’s IP address.",
45+
"type": "text"
46+
},
47+
{
48+
"name": "custom_parameters",
49+
"description": "All custom parameters of an even in a key-value format.",
50+
"type": "JSON"
51+
},
52+
{
53+
"name": "created_at",
54+
"description": "Timestamp of an event.",
55+
"type": "datetime"
56+
}
57+
]
58+
}

src/config/databases/live/tables/users.json

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"description": "Unique identifier of a user.",
1010
"type": "bigint"
1111
},
12+
{
13+
"name": "referrer_id",
14+
"description": "id of another user who invited this user.",
15+
"type": "bigint"
16+
},
1217
{
1318
"name": "first_name",
1419
"description": "User's first name.",

0 commit comments

Comments
 (0)