|
{
|
|
"tables": {
|
|
"brands": {
|
|
"columns": {
|
|
"brand_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"brand_name": {
|
|
"sdtype": "unknown",
|
|
"pii": true
|
|
}
|
|
},
|
|
"primary_key": "brand_id"
|
|
},
|
|
"categories": {
|
|
"columns": {
|
|
"category_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"category_name": {
|
|
"sdtype": "unknown",
|
|
"pii": true
|
|
}
|
|
},
|
|
"primary_key": "category_id"
|
|
},
|
|
"customers": {
|
|
"columns": {
|
|
"customer_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"first_name": {
|
|
"sdtype": "first_name",
|
|
"pii": true
|
|
},
|
|
"last_name": {
|
|
"sdtype": "last_name",
|
|
"pii": true
|
|
},
|
|
"phone": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"email": {
|
|
"sdtype": "email"
|
|
},
|
|
"street": {
|
|
"sdtype": "unknown",
|
|
"pii": true
|
|
},
|
|
"city": {
|
|
"sdtype": "city",
|
|
"pii": true
|
|
},
|
|
"state": {
|
|
"sdtype": "administrative_unit",
|
|
"pii": true
|
|
},
|
|
"zip_code": {
|
|
"sdtype": "postcode",
|
|
"pii": true
|
|
}
|
|
},
|
|
"primary_key": "customer_id"
|
|
},
|
|
"orders": {
|
|
"columns": {
|
|
"order_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"customer_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"order_status": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"order_date": {
|
|
"sdtype": "datetime",
|
|
"datetime_format": "%Y-%m-%d"
|
|
},
|
|
"required_date": {
|
|
"sdtype": "datetime",
|
|
"datetime_format": "%Y-%m-%d"
|
|
},
|
|
"shipped_date": {
|
|
"sdtype": "datetime",
|
|
"datetime_format": "%Y-%m-%d"
|
|
},
|
|
"store_id": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"staff_id": {
|
|
"sdtype": "id"
|
|
}
|
|
},
|
|
"primary_key": "order_id"
|
|
},
|
|
"order_items": {
|
|
"columns": {
|
|
"order_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"item_id": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"product_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"quantity": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"list_price": {
|
|
"sdtype": "numerical"
|
|
},
|
|
"discount": {
|
|
"sdtype": "numerical"
|
|
}
|
|
}
|
|
},
|
|
"products": {
|
|
"columns": {
|
|
"product_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"product_name": {
|
|
"sdtype": "unknown",
|
|
"pii": true
|
|
},
|
|
"brand_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"category_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"model_year": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"list_price": {
|
|
"sdtype": "numerical"
|
|
}
|
|
},
|
|
"primary_key": "product_id"
|
|
},
|
|
"staffs": {
|
|
"columns": {
|
|
"staff_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"first_name": {
|
|
"sdtype": "first_name",
|
|
"pii": true
|
|
},
|
|
"last_name": {
|
|
"sdtype": "last_name",
|
|
"pii": true
|
|
},
|
|
"email": {
|
|
"sdtype": "email"
|
|
},
|
|
"phone": {
|
|
"sdtype": "unknown",
|
|
"pii": true
|
|
},
|
|
"active": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"store_id": {
|
|
"sdtype": "numerical"
|
|
},
|
|
"manager_id": {
|
|
"sdtype": "numerical"
|
|
}
|
|
},
|
|
"primary_key": "staff_id"
|
|
},
|
|
"stocks": {
|
|
"columns": {
|
|
"store_id": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"product_id": {
|
|
"sdtype": "id"
|
|
},
|
|
"quantity": {
|
|
"sdtype": "numerical"
|
|
}
|
|
}
|
|
},
|
|
"stores": {
|
|
"columns": {
|
|
"store_id": {
|
|
"sdtype": "numerical"
|
|
},
|
|
"store_name": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"phone": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"email": {
|
|
"sdtype": "email",
|
|
"pii": true
|
|
},
|
|
"street": {
|
|
"sdtype": "categorical"
|
|
},
|
|
"city": {
|
|
"sdtype": "city",
|
|
"pii": true
|
|
},
|
|
"state": {
|
|
"sdtype": "administrative_unit",
|
|
"pii": true
|
|
},
|
|
"zip_code": {
|
|
"sdtype": "postcode",
|
|
"pii": true
|
|
}
|
|
},
|
|
"primary_key": "email"
|
|
}
|
|
},
|
|
"relationships": [
|
|
{
|
|
"parent_table_name": "brands",
|
|
"child_table_name": "products",
|
|
"parent_primary_key": "brand_id",
|
|
"child_foreign_key": "brand_id"
|
|
},
|
|
{
|
|
"parent_table_name": "categories",
|
|
"child_table_name": "products",
|
|
"parent_primary_key": "category_id",
|
|
"child_foreign_key": "category_id"
|
|
},
|
|
{
|
|
"parent_table_name": "customers",
|
|
"child_table_name": "orders",
|
|
"parent_primary_key": "customer_id",
|
|
"child_foreign_key": "customer_id"
|
|
},
|
|
{
|
|
"parent_table_name": "orders",
|
|
"child_table_name": "order_items",
|
|
"parent_primary_key": "order_id",
|
|
"child_foreign_key": "order_id"
|
|
},
|
|
{
|
|
"parent_table_name": "products",
|
|
"child_table_name": "order_items",
|
|
"parent_primary_key": "product_id",
|
|
"child_foreign_key": "product_id"
|
|
},
|
|
{
|
|
"parent_table_name": "products",
|
|
"child_table_name": "stocks",
|
|
"parent_primary_key": "product_id",
|
|
"child_foreign_key": "product_id"
|
|
},
|
|
{
|
|
"parent_table_name": "staffs",
|
|
"child_table_name": "orders",
|
|
"parent_primary_key": "staff_id",
|
|
"child_foreign_key": "staff_id"
|
|
}
|
|
],
|
|
"METADATA_SPEC_VERSION": "MULTI_TABLE_V1"
|
|
} |