Bài học 1Thiết kế mô hình chiều cho analytics: ánh xạ facts và dimensionsKhám phá mô hình hóa chiều cho analytics. Bạn sẽ ánh xạ quy trình kinh doanh sang bảng fact, định nghĩa dimension và grain, xử lý quan hệ many-to-many và thiết kế schema hỗ trợ BI tự phục vụ và truy vấn hiệu suất.
Identifying business processes and factsChoosing the grain of fact tablesDesigning conformed dimensionsHandling many-to-many relationshipsStar vs snowflake schema trade-offsBài học 2fact_user_activity: trường schema (event_id, user_id, course_id, event_type, timestamp, duration, device, session_id, ingestion_metadata)Mô hình hóa bảng fact_user_activity cho analytics hành vi. Chúng tôi định nghĩa mỗi trường, chọn grain sự kiện, capture phiên và thiết bị, lưu metadata thu thập và hỗ trợ funnel, engagement, báo cáo retention.
Defining the event-level grainModeling event_type and taxonomiesSession and device attributionUsing ingestion_metadata fieldsSupporting funnels and retentionBài học 3Metrics dẫn xuất và tổng hợp: người dùng hoạt động hàng ngày (DAU), người dùng hoạt động theo khóa học, tỷ lệ hoàn thành khóa học theo quốc gia, doanh thu theo khóa học và cohortHọc xây dựng metrics dẫn xuất và tổng hợp từ bảng fact. Chúng tôi tính DAU, hoạt động theo khóa học, tỷ lệ hoàn thành, doanh thu cohort, nhấn mạnh định nghĩa tái tạo và mẫu materialization hiệu quả.
Defining DAU and MAU consistentlyActive users per course metricsCompletion rate by segment and countryRevenue by course and cohortMaterializing aggregates in warehousesBài học 4Xử lý slowly changing dimensions (SCD Type 1/2) và time-travel/versioningHọc quản lý slowly changing dimensions và time-travel. Chúng tôi so sánh SCD Type 1 và Type 2, thiết kế khoảng ngày hiệu lực, lưu metadata phiên bản và sử dụng tính năng warehouse để truy vấn trạng thái dimension lịch sử.
When to use SCD Type 1 vs Type 2Effective dates and current flagsImplementing SCD in SQL and dbtUsing warehouse time-travel featuresTesting historical dimension correctnessBài học 5Độ tươi dữ liệu và chiến lược windowing cho KPI gần thời gian thựcThiết kế chiến lược độ tươi cho KPI gần thời gian thực. Chúng tôi bao gồm ngân sách độ trễ, watermarking, windowing cho metrics streaming, xử lý dữ liệu đến muộn và giám sát độ tươi để giữ dashboard đáng tin cậy.
Defining freshness and latency targetsWatermarks and late data handlingTumbling, sliding, and session windowsNear-real-time KPI computationMonitoring and alerting on freshnessBài học 6Các bước làm sạch dữ liệu: phân tích, ép kiểu, chuẩn hóa dấu thời gian, loại bỏ trùng lặp, làm giàuHọc làm sạch dữ liệu raw có hệ thống trước mô hình hóa. Chúng tôi bao gồm phân tích trường semi-structured, ép kiểu dữ liệu, chuẩn hóa dấu thời gian qua múi giờ, loại bỏ trùng lặp và làm giàu dataset với dữ liệu tham chiếu.
Parsing JSON, CSV, and nested fieldsType coercion and schema validationTimezone normalization and standardsRecord deduplication strategiesReference data joins for enrichmentBài học 7dim_course: trường schema (course_id, title, author_id, category, price, published_date)Thiết kế dimension dim_course hỗ trợ analytics khóa học. Chúng tôi định nghĩa mỗi trường, thảo luận khóa thay thế, xử lý thay đổi giá và danh mục, mô hình hóa ngày xuất bản để báo cáo lịch sử và catalog chính xác.
Business meaning of each dim_course fieldNatural keys vs surrogate course_idHandling course price and category changesModeling published and unpublished statesIndexing dim_course for BI queriesBài học 8dim_user: trường schema (user_id, email_hash, signup_date, country, subscription_status, cohort)Thiết kế dimension dim_user cho analytics và phân khúc người dùng. Chúng tôi định nghĩa mỗi trường, hash dữ liệu nhạy cảm, theo dõi đăng ký và cohort, mô hình hóa trạng thái đăng ký hỗ trợ báo cáo tăng trưởng, retention, kiếm tiền.
User identifiers and surrogate keysEmail hashing and privacy controlsModeling signup_date and cohortsSubscription_status lifecycleCountry and localization attributesBài học 9Mẫu biến đổi: ELT vs ETL, biến đổi tăng dần, biến đổi batch vs streamHiểu mẫu biến đổi cốt lõi và khi nào áp dụng. Chúng tôi so sánh ETL và ELT, thiết kế pipeline tăng dần và đối chiếu biến đổi batch vs streaming, tập trung chi phí, độ trễ, khả năng quan sát và tradeoff vận hành.
Comparing ETL and ELT architecturesDesigning incremental transformationsBatch processing pros and consStreaming and micro-batch patternsChoosing patterns by SLA and costBài học 10Công cụ biến đổi: dbt, Spark/Databricks, Beam/Flink, framework biến đổi dựa trên SQLKhảo sát công cụ biến đổi chính và cách chọn. Chúng tôi so sánh dbt, Spark, Databricks, Beam, Flink và framework SQL, tập trung khả năng mở rộng, orchestration, kiểm tra và tích hợp với modern data stack.
dbt for SQL-centric transformationsSpark and Databricks for big dataBeam and Flink for streaming jobsSQL-based transformation frameworksTool selection criteria and trade-offsBài học 11fact_payments: trường schema (payment_id, user_id, course_id, amount, currency, payment_method, status, timestamp, invoice_id)Mô hình hóa bảng fact_payments cho analytics doanh thu. Chúng tôi định nghĩa mỗi trường, thảo luận thu thập bất biến, xử lý tiền tệ, trạng thái thanh toán, hoàn tiền và liên kết thanh toán với người dùng, khóa học, hóa đơn cho báo cáo downstream.
Grain and primary key of fact_paymentsModeling payment status and lifecycleHandling multi-currency amountsLinking payments to users and coursesCapturing refunds and chargebacks