-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
38 lines (33 loc) · 939 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const settings = {
database: "tada-analytics",
snowplowSchema: "atomic",
heartBeatSeconds: 10,
minimumVisitLengthSeconds: 30,
outputSchema: "snowplow_package",
tags: ["snowplow"]
}
const page_view_events = require("./includes/page_view_events");
const page_view_derived = require("./includes/page_view_derived");
const page_views = require("./includes/page_views");
const sessions = require("./includes/sessions");
const users = require("./includes/users");
module.exports = (params) => {
const {
defaultConfig,
snowplowSchema
} = params;
// Declare the source snowplow tables.
declare({
...defaultConfig,
schema: snowplowSchema,
name: "events"
});
// Publish and return datasets.
return {
page_view_events: page_view_events(params),
page_view_derived: page_view_derived(params),
page_views: page_views(params),
sessions: sessions(params),
users: users(params),
}
}