File size: 5,307 Bytes
c4ac745
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
{
  "tables": {
    "geolocation": {
      "primary_key": "geolocation_zip_code_prefix",
      "columns": {
        "geolocation_zip_code_prefix": {
          "sdtype": "id"
        },
        "geolocation_state": {
          "sdtype": "categorical"
        },
        "geolocation_lat": {
          "sdtype": "numerical"
        },
        "geolocation_lng": {
          "sdtype": "numerical"
        }
      }
    },
    "customers": {
      "primary_key": "customer_id",
      "columns": {
        "customer_id": {
          "sdtype": "id"
        },
        "customer_zip_code_prefix": {
          "sdtype": "id"
        },
        "customer_state": {
          "sdtype": "categorical"
        }
      }
    },
    "products": {
      "primary_key": "product_id",
      "columns": {
        "product_id": {
          "sdtype": "id"
        },
        "product_category_name": {
          "sdtype": "categorical"
        },
        "product_name_lenght": {
          "sdtype": "numerical"
        },
        "product_description_lenght": {
          "sdtype": "numerical"
        },
        "product_photos_qty": {
          "sdtype": "numerical"
        },
        "product_weight_g": {
          "sdtype": "numerical"
        },
        "product_length_cm": {
          "sdtype": "numerical"
        },
        "product_height_cm": {
          "sdtype": "numerical"
        },
        "product_width_cm": {
          "sdtype": "numerical"
        }
      }
    },
    "sellers": {
      "primary_key": "seller_id",
      "columns": {
        "seller_id": {
          "sdtype": "id"
        },
        "seller_zip_code_prefix": {
          "sdtype": "id"
        },
        "seller_state": {
          "sdtype": "categorical"
        }
      }
    },
    "orders": {
      "primary_key": "order_id",
      "columns": {
        "order_id": {
          "sdtype": "id"
        },
        "customer_id": {
          "sdtype": "id"
        },
        "order_status": {
          "sdtype": "categorical"
        },
        "order_purchase_timestamp": {
          "sdtype": "numerical"
        },
        "order_approved_at": {
          "sdtype": "numerical"
        },
        "order_delivered_carrier_date": {
          "sdtype": "numerical"
        },
        "order_delivered_customer_date": {
          "sdtype": "numerical"
        },
        "order_estimated_delivery_date": {
          "sdtype": "numerical"
        }
      }
    },
    "order_items": {
      "columns": {
        "order_id": {
          "sdtype": "id"
        },
        "order_item_id": {
          "sdtype": "numerical"
        },
        "product_id": {
          "sdtype": "id"
        },
        "seller_id": {
          "sdtype": "id"
        },
        "shipping_limit_date": {
          "sdtype": "numerical"
        },
        "price": {
          "sdtype": "numerical"
        },
        "freight_value": {
          "sdtype": "numerical"
        }
      }
    },
    "order_payments": {
      "columns": {
        "order_id": {
          "sdtype": "id"
        },
        "payment_sequential": {
          "sdtype": "numerical"
        },
        "payment_type": {
          "sdtype": "categorical"
        },
        "payment_installments": {
          "sdtype": "numerical"
        },
        "payment_value": {
          "sdtype": "numerical"
        }
      }
    },
    "order_reviews": {
      "primary_key": "review_id",
      "columns": {
        "review_id": {
          "sdtype": "id"
        },
        "order_id": {
          "sdtype": "id"
        },
        "review_score": {
          "sdtype": "categorical"
        },
        "review_creation_date": {
          "sdtype": "numerical"
        },
        "review_answer_timestamp": {
          "sdtype": "numerical"
        }
      }
    }
  },
  "relationships": [
    {
      "parent_table_name": "customers",
      "child_table_name": "orders",
      "parent_primary_key": "customer_id",
      "child_foreign_key": "customer_id"
    },
    {
      "parent_table_name": "products",
      "child_table_name": "order_items",
      "parent_primary_key": "product_id",
      "child_foreign_key": "product_id"
    },
    {
      "parent_table_name": "sellers",
      "child_table_name": "order_items",
      "parent_primary_key": "seller_id",
      "child_foreign_key": "seller_id"
    },
    {
      "parent_table_name": "orders",
      "child_table_name": "order_reviews",
      "parent_primary_key": "order_id",
      "child_foreign_key": "order_id"
    },
    {
      "parent_table_name": "orders",
      "child_table_name": "order_payments",
      "parent_primary_key": "order_id",
      "child_foreign_key": "order_id"
    },
    {
      "parent_table_name": "orders",
      "child_table_name": "order_items",
      "parent_primary_key": "order_id",
      "child_foreign_key": "order_id"
    },
    {
      "parent_table_name": "geolocation",
      "child_table_name": "customers",
      "parent_primary_key": "geolocation_zip_code_prefix",
      "child_foreign_key": "customer_zip_code_prefix"
    },
    {
      "parent_table_name": "geolocation",
      "child_table_name": "sellers",
      "parent_primary_key": "geolocation_zip_code_prefix",
      "child_foreign_key": "seller_zip_code_prefix"
    }
  ],
  "METADATA_SPEC_VERSION": "MULTI_TABLE_V1"
}