dbt-model-index
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedbt Model Index
dbt模型索引
When to Use
适用场景
- Before writing any BigQuery SQL against production data
- When the task has not already explicitly stated which models/tables to query
- When resolving a vague or ambiguous data question into the right BigQuery tables
- 在针对生产数据编写任何BigQuery SQL之前
- 当任务未明确指定要查询的模型/表时
- 当需要将模糊或歧义的数据问题转化为正确的BigQuery表时
How to Set Up This Skill
如何设置该技能
This skill is a curated index of your dbt models. Each entry describes a model (a BigQuery table), what it contains, and what types of questions it is best suited to answer.
To customize this index for your project:
- Organize models into logical domain sections (e.g., Users, Activity, Revenue, Events)
- For each model, include: the table name, a 1–2 sentence description of its grain and content, and "Useful for:" bullets covering common query patterns
- Note key join keys, standard filters, and partition fields where relevant
本技能是你的dbt模型的精选索引。每个条目描述一个模型(即BigQuery表),包含其内容以及最适合解答的问题类型。
要为你的项目自定义此索引:
- 将模型组织到逻辑领域板块中(例如:用户、活动、收入、事件)
- 每个模型需包含:表名、1–2句话描述其粒度和内容,以及“适用场景:”项目列表,涵盖常见查询模式
- 相关的关键连接键、标准过滤器和分区字段也要注明
[Domain: e.g., Users & Identity]
[领域:例如,用户与身份]
your_model_name
your_model_nameyour_model_name
your_model_nameBrief description of what this model contains. One row per [entity]. Include what makes this model's grain unique and the most important fields.
Useful for:
- [Type of question this model answers, e.g., user counts, cohort sizes]
- [Another use case, e.g., filtering to a specific user segment]
- [Common join pattern, e.g., joining to other tables as the canonical user dimension]
该模型内容的简要描述。每行对应一个[实体]。需说明该模型粒度的独特之处以及最重要的字段。
适用场景:
- [该模型可解答的问题类型,例如:用户数量、群组规模]
- [另一个使用场景,例如:筛选特定用户群体]
- [常见连接模式,例如:作为标准用户维度与其他表连接]
another_model_name
another_model_nameanother_model_name
another_model_nameDescription of this model and its grain.
Useful for: [Brief use case description]
该模型及其粒度的描述。
适用场景: [简要描述使用场景]
[Domain: e.g., Activity & Engagement]
[领域:例如,活动与参与度]
your_activity_model
your_activity_modelyour_activity_model
your_activity_modelDescription of the activity signal (e.g., what counts as "active"), the grain, and the time dimension.
Useful for:
- [Use case 1, e.g., daily/weekly active user metrics]
- [Use case 2, e.g., retention analysis]
活动信号的描述(例如:什么算作“活跃”)、粒度以及时间维度。
适用场景:
- [使用场景1,例如:每日/每周活跃用户指标]
- [使用场景2,例如:留存分析]
your_engagement_model
your_engagement_modelyour_engagement_model
your_engagement_modelDescription.
Useful for:
- [Use case 1]
- [Use case 2]
描述。
适用场景:
- [使用场景1]
- [使用场景2]
[Domain: e.g., Revenue & Subscriptions]
[领域:例如,收入与订阅]
your_revenue_model
your_revenue_modelyour_revenue_model
your_revenue_modelDescription of the revenue grain (e.g., one row per customer per day, or one row per subscription event).
Useful for:
- [Use case 1, e.g., MRR/ARR reporting]
- [Use case 2, e.g., churn analysis]
收入粒度的描述(例如:每行对应每个客户每天,或每行对应一个订阅事件)。
适用场景:
- [使用场景1,例如:MRR/ARR报告]
- [使用场景2,例如:流失分析]
your_subscription_model
your_subscription_modelyour_subscription_model
your_subscription_modelDescription.
Useful for:
- [Use case 1]
- [Use case 2]
描述。
适用场景:
- [使用场景1]
- [使用场景2]
[Domain: e.g., Events & Telemetry]
[领域:例如,事件与遥测]
your_events_model
your_events_modelyour_events_model
your_events_modelDescription of the event source, enrichment applied, and key fields available.
Useful for:
- [Use case 1, e.g., raw event-level analysis]
- [Use case 2, e.g., building domain-specific funnels]
事件来源、所应用的增强处理以及可用的关键字段的描述。
适用场景:
- [使用场景1,例如:原始事件级分析]
- [使用场景2,例如:构建特定领域的转化漏斗]
Important Notes
重要说明
- Standard filters: Document any filters that should always be applied in user-facing queries (e.g., excluding test accounts, soft-deleted records, internal users, or flagged/fraudulent users). Example:
where not is_internal_user - Production data: Specify your default project/dataset path. Example:
your-gcp-project.prod.<model_name> - Cost control: For large partitioned tables, always filter on the partition field and constrain the date range to avoid full-table scans
- Model grain: Always note the grain (one row per what?) for each model to avoid accidental fan-outs in joins
- Plan/tier types: If your product has subscription tiers or plan types, document the valid values here so queries filter correctly
- Sensitive datasets: If any models live in a separate dataset, call that out explicitly so queries use the right fully-qualified table reference
- 标准过滤器: 记录所有在面向用户的查询中应始终应用的过滤器(例如:排除测试账户、软删除记录、内部用户或标记为欺诈的用户)。示例:
where not is_internal_user - 生产数据: 指定默认的项目/数据集路径。示例:
your-gcp-project.prod.<model_name> - 成本控制: 对于大型分区表,始终按分区字段过滤并限制日期范围,以避免全表扫描
- 模型粒度: 始终注明每个模型的粒度(每行对应什么?),以避免连接时意外出现数据膨胀
- 计划/层级类型: 如果你的产品有订阅层级或计划类型,请在此记录有效值,以便查询能正确过滤
- 敏感数据集: 如果任何模型位于单独的数据集中,请明确指出,以便查询使用正确的全限定表引用