-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.js
More file actions
25 lines (14 loc) · 710 Bytes
/
run.js
File metadata and controls
25 lines (14 loc) · 710 Bytes
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
function runAssertions() {
SpreadsheetApp.enableBigQueryExecution();
const resultForUnique = checkUnique();
Logger.log('Unique Assertions have been executed.')
const resultForNotNull = checkNotNull();
Logger.log('NotNull Assertions have been executed.')
// Check if either array has results
if (resultForUnique.length > 0 || resultForNotNull.length > 0) {
Logger.log('Assertions in dataset tables show errors. Sending email notification.');
sendEmailNotification(resultForUnique, resultForNotNull);
} else {
Logger.log('Assertions in dataset tables do not show any errors. No action required.');
}
}