1. 資料倉儲架構
Sources (OLTP + Events)
-> ELT/CDC Pipeline
-> Staging Layer
-> Data Models (dbt)
-> Data Warehouse (ClickHouse/BigQuery)
-> BI Dashboards (Metabase/Superset)
2. POD 的星型模式
-- Fact table
fact_orders(
order_id,
date_key,
shop_key,
product_key,
channel_key,
supplier_key,
gross_revenue_cents,
shipping_cents,
tax_cents,
discount_cents,
quantity,
status
)
-- Dimensions
dim_date(date_key, day, week, month, quarter, year)
dim_shop(shop_key, shop_id, segment, country)
dim_product(product_key, product_id, category, style, tags)
dim_channel(channel_key, channel_name)
dim_supplier(supplier_key, supplier_name, region)
3. 核心儀表板
| 儀表板 | 關鍵關鍵績效指標 |
|---|---|
| 銷售 | GMV、AOV、轉換、CAC、ROAS |
| 設計師 | 頂級設計、版稅收入、重複率 |
| 生產 | 交貨時間、缺陷率、SLA 違規 |
| 頻道 | Shopify/Etsy/Amazon/TikTok 收入 |
| 趨勢/利基 | 熱門標籤、成長速度、競爭 |
4. 銷售漏斗分析
Impression -> Product View -> Add to Cart -> Checkout Start -> Payment Success
SELECT
date,
SUM(impressions) AS impressions,
SUM(product_views) AS views,
SUM(add_to_cart) AS atc,
SUM(checkout_start) AS checkout,
SUM(purchases) AS purchases,
ROUND(SUM(purchases)::numeric / NULLIF(SUM(product_views),0), 4) AS view_to_buy
FROM mart_funnel_daily
GROUP BY date
ORDER BY date DESC;
5. 生產指標
- 根據供應商的 P50/P95 生產時間
- 按產品類型劃分的缺陷率
- 退貨原因分佈
- 按地區劃分的準時交貨率
6. 趨勢和利基分析
interface TrendInsight {
tag: string;
weekGrowthPct: number;
monthGrowthPct: number;
competitionScore: number;
opportunityScore: number;
}
function opportunity(trend: number, competition: number) {
return 0.7 * trend - 0.3 * competition;
}
7. 資料品質與治理
| 規則 | 例如 |
|---|---|
| 新鮮度 | 實際訂單遲到時間不超過 30 分鐘 |
| 獨特性 | order_id 在 mart 表中是唯一的 |
| 完整性 | channel_key 不為空 |
| 一致性 | 毛額 >= 稅金 + 運費 |
八、總結
星型模式 適用於營運和財務儀表板
銷售+產量+趨勢 POD 的 3 個核心儀表板集群
漏斗分析 幫助逐步優化轉化
數據品質檢查 必須透過管道實現自動化