-
Notifications
You must be signed in to change notification settings - Fork 6
/
dq_repdb_migration_test_BOTH.sh
executable file
·65 lines (41 loc) · 3.39 KB
/
dq_repdb_migration_test_BOTH.sh
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
#!/usr/bin/env bash
QUERY1="select count(org_id) from dimension_org"
QUERY2="select count(org_id) from dimension_org_members"
QUERY3="select count(CONCAT(organization_id, \"-\", team_id)) from dimension_team"
QUERY4="select count(CONCAT(user_id, \"-\", team_id)) from dimension_teammembers"
QUERY5="select count(user_id) from dimension_user"
QUERY6="select count(on_id) from fact_user_on_call"
QUERY7="select count(policy_id) from dimension_escalation_policies"
QUERY8="select count(CONCAT(vo_id, \"-\", vo_object)) from dimension_external_salesforce_ids"
printf "\n\n========================================\n Table: dimension_org \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY1"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY1"
printf "\n\n========================================\n TABLE= dimension_org_members\n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY2"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY2"
printf "\n\n========================================\n TABLE= dimension_team \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY3"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY3"
printf "\n\n\n\n\n========================================\n TABLE= dimension_teammembers \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY4"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY4"
printf "\n\n\n\n========================================\n TABLE= dimension_user \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY5"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY5"
printf "\n\n\n========================================\n TABLE= fact_user_on_call \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY6"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY6"
printf "\n\n========================================\n TABLE= dimension_escalation_policies \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY7"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY7"
printf "\n\n========================================\n TABLE= dimension_external_salesforce_ids \n\n *** Legacy DB ***:\n"
mysql -h repdb2.pr.den02.victorops.net -D vo_reports_data_warehouse -u reports -v -e "$QUERY8"
printf "\n\n *** AWS DB ***\n"
mysql -h reporting.cluster-caafzfourwgg.us-west-2.rds.amazonaws.com -D vo_reports_data_warehouse -u reports -v -e "$QUERY8"