|
6 | 6 | VDAF = "histogram"
|
7 | 7 | PROCESS_TIMEOUT = 1200 # 20 mins
|
8 | 8 |
|
9 |
| -CONFIG_FILE_NAME = "config.json" # See example_config.json for the contents and structure of the job config file. |
| 9 | +CONFIG_FILE_NAME = "config.json" # See example_config.json for the contents and structure of the job config file. |
10 | 10 | LOG_FILE_NAME = f"{datetime.now()}-ads-incrementality-dap-collector.log"
|
11 | 11 |
|
12 | 12 | COLLECTOR_RESULTS_SCHEMA = [
|
13 |
| - bigquery.SchemaField("collection_start", "DATE", mode="REQUIRED", description="Start date of the collected time window, inclusive."), |
14 |
| - bigquery.SchemaField("collection_end", "DATE", mode="REQUIRED", description="End date of the collected time window, inclusive."), |
15 |
| - bigquery.SchemaField("country_codes", "JSON", mode="NULLABLE", description="List of 2-char country codes for the experiment"), |
16 |
| - bigquery.SchemaField("experiment_slug", "STRING", mode="REQUIRED", description="Slug indicating the experiment."), |
17 |
| - bigquery.SchemaField("experiment_branch", "STRING", mode="REQUIRED", description="The experiment branch this data is associated with."), |
18 |
| - bigquery.SchemaField("advertiser", "STRING", mode="REQUIRED", description="Advertiser associated with this experiment."), |
19 |
| - bigquery.SchemaField("metric", "STRING", mode="REQUIRED", description="Metric collected for this experiment."), |
| 13 | + bigquery.SchemaField( |
| 14 | + "collection_start", |
| 15 | + "DATE", |
| 16 | + mode="REQUIRED", |
| 17 | + description="Start date of the collected time window, inclusive.", |
| 18 | + ), |
| 19 | + bigquery.SchemaField( |
| 20 | + "collection_end", |
| 21 | + "DATE", |
| 22 | + mode="REQUIRED", |
| 23 | + description="End date of the collected time window, inclusive.", |
| 24 | + ), |
| 25 | + bigquery.SchemaField( |
| 26 | + "country_codes", |
| 27 | + "JSON", |
| 28 | + mode="NULLABLE", |
| 29 | + description="List of 2-char country codes for the experiment", |
| 30 | + ), |
| 31 | + bigquery.SchemaField( |
| 32 | + "experiment_slug", |
| 33 | + "STRING", |
| 34 | + mode="REQUIRED", |
| 35 | + description="Slug indicating the experiment.", |
| 36 | + ), |
| 37 | + bigquery.SchemaField( |
| 38 | + "experiment_branch", |
| 39 | + "STRING", |
| 40 | + mode="REQUIRED", |
| 41 | + description="The experiment branch this data is associated with.", |
| 42 | + ), |
| 43 | + bigquery.SchemaField( |
| 44 | + "advertiser", |
| 45 | + "STRING", |
| 46 | + mode="REQUIRED", |
| 47 | + description="Advertiser associated with this experiment.", |
| 48 | + ), |
| 49 | + bigquery.SchemaField( |
| 50 | + "metric", |
| 51 | + "STRING", |
| 52 | + mode="REQUIRED", |
| 53 | + description="Metric collected for this experiment.", |
| 54 | + ), |
20 | 55 | bigquery.SchemaField(
|
21 | 56 | name="value",
|
22 | 57 | field_type="RECORD",
|
23 | 58 | mode="REQUIRED",
|
24 | 59 | fields=[
|
25 | 60 | bigquery.SchemaField("count", "INT64", mode="NULLABLE"),
|
26 | 61 | bigquery.SchemaField("histogram", "JSON", mode="NULLABLE"),
|
27 |
| - ] |
| 62 | + ], |
| 63 | + ), |
| 64 | + bigquery.SchemaField( |
| 65 | + "created_at", |
| 66 | + "TIMESTAMP", |
| 67 | + mode="REQUIRED", |
| 68 | + description="Timestamp for when this row was written.", |
28 | 69 | ),
|
29 |
| - bigquery.SchemaField("created_at", "TIMESTAMP", mode="REQUIRED", description="Timestamp for when this row was written.") |
30 | 70 | ]
|
0 commit comments