数据仓库与商业智能
学习 SaaS 公司如何将运营数据导入数据仓库,并使用 ETL/ELT、星型模型和聚合构建 BI 仪表板。
数据仓库与商业智能 是 CoddyKit 上的免费 SaaS Architecture & Startup Engineering 课时。 这是第 4 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 SaaS Architecture & Startup Engineering 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 SaaS Architecture & Startup Engineering 课程共包含 4 节课。
本课时的部分内容尚未翻译,以英文显示。
OLTP vs OLAP
Your live app database is OLTP (transaction processing): fast small reads and writes. Analytics needs OLAP: large scans over historical data.
Running heavy analytics on the production database harms app performance, so we separate them.
The Data Warehouse
A data warehouse (Snowflake, BigQuery, Redshift) stores large volumes of historical data optimized for analytical queries.
It is the single source of truth for reporting across the whole SaaS business.
ETL vs ELT
Two patterns move data into the warehouse:
- ETL — Extract, Transform, then Load (transform before storing)
- ELT — Extract, Load, then Transform (load raw, transform inside the warehouse)
Modern cloud warehouses favor ELT because they have cheap, powerful compute.
Extracting Data
Extraction pulls data from sources: the app database, event streams, and third-party APIs. It can be a full reload or an incremental pull of only changed rows.
Incremental extraction scales far better as data grows.
The Star Schema
Warehouses model data as a star schema: a central fact table (measurable events) surrounded by dimension tables (descriptive context like date, user, product).
Facts and Dimensions
A fact row records a measurable event with numeric measures and foreign keys to dimensions.
-- fact_sales
-- sale_id, date_key, product_key, customer_key, amount
SELECT SUM(amount)
FROM fact_sales
JOIN dim_date USING (date_key)
WHERE dim_date.year = 2026;Aggregation and Roll-Ups
BI queries aggregate facts: sum revenue by month, count signups by plan, average usage by region.
Pre-computed roll-up tables or materialized views speed up frequently used aggregations.
SELECT plan, COUNT(*) AS signups
FROM fact_signups
GROUP BY plan;Business Intelligence Dashboards
BI tools (Looker, Metabase, Tableau) sit on top of the warehouse and let non-engineers explore data through charts and dashboards.
This democratizes data access across the company.
Tenant Isolation in Analytics
In multi-tenant SaaS, analytics must respect tenant boundaries. Internal dashboards may span all tenants, but customer-facing analytics must filter strictly by tenant ID.
A leak here exposes one customer's business data to another.
Data Freshness vs Cost
Warehouses can update in batches (hourly, nightly) or near real-time via streaming. More freshness costs more compute.
Match the refresh rate to the decision: executive reports rarely need second-by-second data.
Data Quality and Governance
Bad data leads to bad decisions. Apply data quality checks (no nulls in keys, totals reconcile) and governance (access control, documentation) so the warehouse stays trustworthy.
Trust in the numbers is the whole point of BI.
Quick Check
Test your data warehousing knowledge.
Recap
You learned data warehousing and BI:
- OLTP vs OLAP and why to separate them
- ETL vs ELT pipelines with incremental extraction
- Star schemas (facts and dimensions), aggregation, and BI dashboards
- Tenant isolation, freshness/cost trade-offs, and data quality
常见问题解答
「数据仓库与商业智能」课时是免费的吗?
是的 — 「数据仓库与商业智能」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 SaaS Architecture & Startup Engineering 课程的其余内容,请升级到 CoddyKit PRO。 SaaS Architecture & Startup Engineering 课程共包含 4 节课。
「数据仓库与商业智能」这节课中我会学到什么?
学习 SaaS 公司如何将运营数据导入数据仓库,并使用 ETL/ELT、星型模型和聚合构建 BI 仪表板。 你通过在浏览器中直接运行的动手代码来练习 SaaS Architecture & Startup Engineering,全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 SaaS Architecture & Startup Engineering 需要有经验吗?
无需任何先前经验。CoddyKit 上的 SaaS Architecture & Startup Engineering 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 4 节课,共 4 节。
「数据仓库与商业智能」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 SaaS Architecture & Startup Engineering 课中编写并运行代码吗?
能。每节 SaaS Architecture & Startup Engineering 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- 用于分析的数据流水线
- 集成人工智能与机器学习服务
- 功能开关与 A/B 测试
- 数据仓库与商业智能