forked from GoogleCloudPlatform/professional-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsales_sample_bigquery.json
104 lines (104 loc) · 2.84 KB
/
sales_sample_bigquery.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
98
99
100
101
102
103
104
{
"total_number_of_rows":100000000,
"number_of_rows_per_batch":10000,
"sinks":[
{
"type": "BIGQUERY",
"table_id":"sbx-13455.bigdata_sample.data-generator-test1",
"write_disposition":"WRITE_TRUNCATE"
}
],
"lookup_fields":[
{
"lookup_name":"product_id_price",
"source_field_name":"product_id",
"mapping":{
"product1":15,
"product2":30,
"product3":70,
"product4":13,
"product5":120
}
}
],
"fields":[
{
"name":"id",
"type": "STRING",
"generation": {
"type" : "UUID"
}
},
{
"name":"date",
"type": "DATETIME",
"generation": {
"type" : "RANDOM_BETWEEN",
"min":"2018-01-01T00:00:00Z",
"max":"2023-01-01T00:00:00Z",
"output_format":"%Y-%m-%d %H:%M:%S"
}
},
{
"name":"name",
"type": "STRING",
"generation": {
"type" : "RANDOM_BETWEEN",
"subtype":"ascii_uppercase",
"length": 10
}
},
{
"name":"phone_number",
"type": "STRING",
"generation": {
"type" : "RANDOM_FROM_REGEX",
"expression":"\\d{4}-\\d{4}-\\d{4}-[0-9]{4}"
}
},
{
"name":"product_id",
"type": "STRING",
"generation": {
"type" : "RANDOM_FROM_LIST",
"values":["product1","product2","product3","product4","product5"],
"weights":[20,60,10,3,7]
}
},
{
"name":"country",
"type": "STRING",
"generation": {
"type" : "RANDOM_FROM_LIST",
"values":["Argentina","Brazil","Chile","France","Spain","Portugal","USA","Mexico","Nigeria","Japan","Canada","Senegal","Australia","Bangladesh","Turkey","Iran","Germany"]
}
},
{
"name":"amount",
"type": "INT",
"generation": {
"type" : "RANDOM_BETWEEN",
"min":5,
"max":100
}
},
{
"name":"price",
"type": "FLOAT",
"generation": {
"type" : "LOOKUP_VALUE",
"lookup_name":"product_id_price"
}
},
{
"name":"customer_satisfaction",
"type": "FLOAT",
"generation": {
"type" : "RANDOM_BETWEEN",
"min":51.5,
"max":100,
"num_decimals":2
}
}
]
}