This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
census.json
executable file
·97 lines (97 loc) · 4.79 KB
/
census.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"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":"StarThinker_Test_Census_", "default": "Manual"}},
"clear":true
}},
{ "include":{
"script":"scripts/bigquery_census_normalize.json",
"parameters":{
"auth":"service",
"census_geography":"zip_codes",
"census_year":"2018",
"census_span":"5yr",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}},
"table":"Census_Percent"
}
}},
{ "bigquery": {
"auth":"service",
"from":{
"values":[
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 58755, 0.48, 0.25, 0.11, 779],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 99774, 0.01, 0.01, 0.41, 23605],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 69353, 0.12, 0.22, 0.02, 1786],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 59244, 0.32, 0.29, 0.34, 3708],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 49877, 0.05, 0.18, 0.05, 3270],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 36473, 0.22, 0.21, 0.06, 11518],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 45618, 0.05, 0.22, 0.07, 9655],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 85024, 0.27, 0.03, 0.09, 1],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 85032, 0.03, 0.03, 0.02, 325],
[1234, "Partner 1", 456, "Advertiser 1", 789, "Campaign 1", 94920, 0.15, 0.02, 0.97, 25186]
]
},
"to":{
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}},
"table":"Census_KPI_Percent"
},
"schema":[
{ "name": "Partner_Id", "type": "INTEGER", "mode": "NULLABLE" },
{ "name": "Partner", "type": "STRING", "mode": "NULLABLE" },
{ "name": "Advertiser_Id", "type": "INTEGER", "mode": "NULLABLE" },
{ "name": "Advertiser", "type": "STRING", "mode": "NULLABLE" },
{ "name": "Campaign_Id", "type": "INTEGER", "mode": "NULLABLE" },
{ "name": "Campaign", "type": "STRING", "mode": "NULLABLE" },
{ "name": "Zip_Code", "type": "STRING", "mode": "NULLABLE" },
{ "name": "Impression_Percent", "type": "FLOAT", "mode": "NULLABLE" },
{ "name": "Click_Percent", "type": "FLOAT", "mode": "NULLABLE" },
{ "name": "Conversion_Percent", "type": "FLOAT", "mode": "NULLABLE" },
{ "name": "Impressions", "type": "INTEGER", "mode": "NULLABLE" }
]
}},
{ "include":{
"script":"scripts/bigquery_function.json",
"function":"Pearson Significance Test",
"parameters":{
"auth":"service",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}}
}
}},
{ "include":{
"script":"scripts/bigquery_census_normalize.json",
"parameters":{
"auth":"service",
"census_geography":"zip_codes",
"census_year":"2018",
"census_span":"5yr",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}},
"type":"table"
}
}},
{ "include":{
"script":"scripts/bigquery_census_correlate.json",
"parameters":{
"auth":"service",
"join":"Zip_Code",
"pass":["Partner_Id", "Partner", "Advertiser_Id", "Advertiser", "Campaign_Id", "Campaign"],
"sum":["Impressions"],
"correlate":["Impression_Percent", "Click_Percent", "Conversion_Percent"],
"from_dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}},
"from_table":"Census_KPI_Percent",
"significance":"80",
"to_dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}},
"type":"table"
}
}},
{ "dataset":{
"auth":"service",
"dataset":{"field":{ "name":"test_run_id", "kind":"string", "description":"The dataset to use for the test.", "prefix":"StarThinker_Test_Census_", "default": "Manual"}},
"delete":true
}}
]
}