forked from google/starthinker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
email_csv.json
executable file
·77 lines (77 loc) · 3.06 KB
/
email_csv.json
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
68
69
70
71
72
73
74
75
76
77
{
"setup":{
"license":"Licensed under the Apache License, Version 2.0",
"copyright":"Copyright 2020 Google LLC"
},
"tasks":[
{ "dataset":{
"auth":"service",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"Test_Email_CSV_", "default": "Manual"}},
"clear":true
}},
{ "email":{
"auth":"user",
"send":{
"from":{"field":{ "name":"from_email", "kind":"string", "description":"The email address to send from.","default":"" }},
"to":{"field":{ "name":"to_email", "kind":"string", "description":"The email address to send from.", "default":"" }},
"subject":{"field":{ "name":"subject", "kind":"string", "description":"The email subject.", "default":"Test Email CSV" }},
"text":"Attached is a CSV with test data in it...",
"html":"Attached is a CSV with test data in it...",
"attachment":{
"filename":"test_data.csv",
"single_cell":true,
"values":[
["Animal", "Age", "Weight_lbs"],
["dog", 7, 67.0],
["cat", 5, 1.5],
["bird", 12, 0.44],
["lizard", 22, 1.0],
["dinosaur", 1600, 273.97]
]
}
}
}},
{ "include":{
"script":"scripts/email_to_bigquery.json",
"parameters":{
"auth_read":"user",
"email_from":{"field":{ "name":"from_email", "kind":"string", "description":"The email address to send from.","default":"" }},
"email_to":{"field":{ "name":"to_email", "kind":"string", "description":"The email address to send from.", "default":"" }},
"subject":{"field":{ "name":"subject", "kind":"string", "description":"The email subject.", "default":"Test Email CSV" }},
"attachment":"test_data.csv",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"Test_Email_CSV_", "default": "Manual"}},
"table":"Email_Attachment",
"header":true,
"schema":[
{"name": "Animal", "type": "STRING"},
{"name": "Age", "type": "INTEGER"},
{"name": "Weight_lbs", "type": "FLOAT"}
]
}
}},
{ "test": {
"auth":"service",
"bigquery":{
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"Test_Email_CSV_", "default": "Manual"}},
"table":"Email_Attachment",
"schema":[
{"name": "Animal", "type": "STRING"},
{"name": "Age", "type": "INTEGER"},
{"name": "Weight_lbs", "type": "FLOAT"}
],
"values":[
["dog", 7, 67.0],
["cat", 5, 1.5],
["bird", 12, 0.44],
["lizard", 22, 1.0],
["dinosaur", 1600, 273.97]
]
}
}},
{ "dataset":{
"auth":"service",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"Test_Email_CSV_", "default": "Manual"}},
"delete":true
}}
]
}