forked from viodotcom/analytics-engineer-assignment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (48 loc) · 2.73 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.DEFAULT_GOAL := run
00-create-tables-pre-load-file-2020-Jan:
@echo "Creating tables 'event_raw' and 'event_clean"
@sqlite3 db/assignment.db ".read sql/00-create-tables.sql"
01-ingest-file-2020-Jan: 00-create-tables-pre-load-file-2020-Jan
@echo "Ingesting Jan-2020 file into the 'event_raw' table"
@sqlite3 db/assignment.db ".read sql/01-ingest-file-2020-Jan.sql"
02-clean-data-2020-Jan: 01-ingest-file-2020-Jan
@echo "Cleaning raw data and loading Jan-2020 data into the 'event_clean' table"
@sqlite3 db/assignment.db ".read sql/02-clean-data.sql"
03-daily-sales-2020-Jan: 02-clean-data-2020-Jan
@echo "Loading the daily_sales table with Jan-2020 data"
@sqlite3 db/assignment.db ".read sql/03-daily-sales.sql"
04-daily-stats-2020-Jan: 03-daily-sales-2020-Jan
@echo "Loading the daily_stats table with Jan-2020 data"
@sqlite3 db/assignment.db ".read sql/04-daily-stats.sql"
05-daily-conversion-funnel-2020-Jan: 04-daily-stats-2020-Jan
@echo "Loading the daily_conversion_funnel table with Jan-2020 data"
@sqlite3 db/assignment.db ".read sql/05-daily-conversion-funnel.sql"
06-daily-ticket-size-2020-Jan: 05-daily-conversion-funnel-2020-Jan
@echo "Loading the daily_ticket_size table with Jan-2020 data"
@sqlite3 db/assignment.db ".read sql/06-daily-ticket-size.sql"
00-create-tables-pre-load-file-2020-Feb: 06-daily-ticket-size-2020-Jan
@echo "Creating tables 'event_raw' and 'event_clean"
@sqlite3 db/assignment.db ".read sql/00-create-tables.sql"
01-ingest-file-2020-Feb: 00-create-tables-pre-load-file-2020-Feb
@echo "Ingesting Feb-2020 file into the 'event_raw' table"
@sqlite3 db/assignment.db ".read sql/01-ingest-file-2020-Feb.sql"
02-clean-data-2020-Feb: 01-ingest-file-2020-Feb
@echo "Cleaning raw data and loading Feb-2020 data into the 'event_clean' table"
@sqlite3 db/assignment.db ".read sql/02-clean-data.sql"
03-daily-sales-2020-Feb: 02-clean-data-2020-Feb
@echo "Loading the daily_sales table with Feb-2020 data"
@sqlite3 db/assignment.db ".read sql/03-daily-sales.sql"
04-daily-stats-2020-Feb: 03-daily-sales-2020-Feb
@echo "Loading the daily_stats table with Feb-2020 data"
@sqlite3 db/assignment.db ".read sql/04-daily-stats.sql"
05-daily-conversion-funnel-2020-Feb: 04-daily-stats-2020-Feb
@echo "Loading the daily_conversion_funnel table with Feb-2020 data"
@sqlite3 db/assignment.db ".read sql/05-daily-conversion-funnel.sql"
06-daily-ticket-size-2020-Feb: 05-daily-conversion-funnel-2020-Feb
@echo "Loading the daily_ticket_size table with Feb-2020 data"
@sqlite3 db/assignment.db ".read sql/06-daily-ticket-size.sql"
99-last-task: 06-daily-ticket-size-2020-Feb
root-target: 99-last-task
@echo "Process completed. Well done!"
# TODO: Add all the necessary steps to complete the assignment
run: root-target