mcpField
T
te-docs

te-docs

github.com/data-goblin数据与数据库1.1k56 次安装今天更新
代码仓库

关于 te-docs

te-docs 是用于检索 Tabular Editor 文档并理解其配置文件的技能。它指导使用 `pbi-search` 搜索 Power BI、Fabric、DAX 等来源,并说明 TE3 偏好设置和 TMUO 配置。

主要功能

  1. 01跨多个文档来源搜索
  2. 02获取完整页面和章节
  3. 03按来源筛选搜索结果
  4. 04说明 TE3 配置文件
  5. 05使用附带脚本验证配置

适用场景

  1. 01查找 Tabular Editor 功能说明
  2. 02查询 DAX 函数和示例
  3. 03检查 TMUO 部署设置
  4. 04验证 TE3 偏好设置文件

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/data-goblin/power-bi-agentic-development --skill te-docs

安装后在 Claude Code 中输入/te-docs确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

bin/
README.md
references/
doc-structure.md
url-redirects.md
schema/
layouts-schema.json
preferences-schema.json
README.md
recentfiles-schema.json
recentservers-schema.json
tmuo-schema.json
uipreferences-schema.json
scripts/
validate_config.py
validate_tmuo.py

详细介绍

Tabular Editor 文档与配置

有关搜索 Tabular Editor 文档以及了解 TE3 配置文件(.tmuo、Preferences.json 等)的指南。

准备工作

在使用文档搜索前,请确认已安装 pbi-search:

pbi-search --version

如果找不到该命令,请告知用户,并提供两个选项:

  1. 安装 pbi-search(推荐):请参阅 bin/README.md,了解通过 cargo install 或从 GitHub Releases 安装的说明,地址为 data-goblin/pbi-search
  2. 不使用 CLI 进行搜索:使用 WebFetch 直接从以下来源获取文档:
    • Microsoft Learn:https://learn.microsoft.com/
    • Tabular Editor 文档:https://docs.tabulareditor.com/
    • DAX 参考:https://dax.guide/<function>/
    • SQLBI 文章:https://www.sqlbi.com/articles/
    • Data Goblins:https://data-goblins.com/

强烈建议使用 CLI;它会同时搜索所有来源,并返回整洁的 Markdown。备用方式需要手动构造 URL 并多次获取内容。

文档搜索

使用 pbi-search CLI——这是搜索 Tabular Editor 文档及相关 Power BI/DAX 资源的首选方式。它会同时搜索 Tabular Editor 文档、DAX.guide、SQLBI、Microsoft Learn(Power BI + Fabric)、TE 博客和 Data Goblins,并返回整洁的 Markdown。

安装后,填充本地清单缓存(仅需一次):

pbi-search sync        # ~13s
搜索
# Search all sources
pbi-search search "creating measures"

# Search only Tabular Editor docs
pbi-search search "BPA rules" --source te-docs

# Search TE blog + TE docs
pbi-search search "incremental refresh" --source te-docs --source te-blog

# JSON output for structured use in agents
pbi-search search "workspace mode" --source te-docs --json

# Include content excerpts
pbi-search search "calculated columns" --source te-docs --excerpts
获取完整文档
# Tabular Editor doc by bare path (from search results)
pbi-search fetch features/Best-Practice-Analyzer

# Any supported URL
pbi-search fetch https://docs.tabulareditor.com/features/workspace-mode
pbi-search fetch https://dax.guide/calculate/

# Extract a specific section
pbi-search fetch features/Best-Practice-Analyzer --section "Creating rules"

# Truncate for context budget
pbi-search fetch features/creating-measures --max-chars 3000 --json
Agent 搜索工作流
  1. pbi-search search "<topic>" --source te-docs --json — 查找相关文档
  2. 使用结果中的 path 或 url:pbi-search fetch <path>
  3. 没有结果?扩大搜索范围:pbi-search search "<topic>"(所有来源)
  4. DAX 问题:始终添加 --source dax-guide
可用来源
ID内容
te-docsTabular Editor 文档(功能、操作指南、知识库、参考资料)
dax-guide约 480 个 DAX 函数参考页面
te-blogTabular Editor 博客
ms-learnMicrosoft Learn — Power BI + Fabric(实时,无需同步)
sqlbi约 370 篇 SQLBI 技术文章
data-goblinsData Goblins Power BI 帖子
提升搜索质量(可选)

默认同步会构建快速的标题索引。对于概念类查询(“从列中移除筛选器”),请运行一次并包含描述:

pbi-search sync --descriptions   # fetches meta descriptions; ~30s extra

配置文件(.tmuo)

TMUO 文件用于在 Tabular Editor 3 中存储开发者和模型专属的偏好设置。

重要事项
  • TMUO 文件包含用户专属设置——切勿提交到版本控制
  • 凭据使用 Windows 用户密钥加密——无法在用户之间共享
  • 在所有项目的 .gitignore 中添加 *.tmuo
  • 文件命名:<ModelFileName>.<WindowsUserName>.tmuo
结构
{
  "UseWorkspace": true,
  "WorkspaceConnection": "localhost",
  "WorkspaceDatabase": "MyModel_Workspace_JohnDoe",
  "Deployment": {
    "TargetConnectionString": "powerbi://api.powerbi.com/v1.0/myorg/Workspace",
    "TargetDatabase": "MyModel",
    "DeployPartitions": false,
    "DeployModelRoles": true
  },
  "DataSourceOverrides": {
    "SQL Server": {
      "ConnectionString": "Data Source=localhost;Initial Catalog=DevDB"
    }
  }
}
节
节用途
UseWorkspace启用工作区数据库模式
WorkspaceConnection工作区数据库的服务器
WorkspaceDatabase工作区数据库名称(每位开发者/模型唯一)
Deployment目标服务器、数据库和部署选项
DataSourceOverrides覆盖工作区的连接
TableImportSettings“导入表”功能的设置
部署选项
字段类型说明
TargetConnectionStringstring目标服务器连接
TargetDatabasestring目标数据库名称
DeployPartitionsbool部署分区定义
DeployModelRolesbool部署安全角色
DeployModelRoleMembersbool部署角色成员
DeploySharedExpressionsbool部署共享 M 表达式

应用偏好设置

TE3 在 %LocalAppData%\TabularEditor3\ 中存储应用级偏好设置:

文件用途
Preferences.json应用设置(代理、更新、遥测)
UiPreferences.jsonUI 状态(窗口位置、面板大小)
Layouts.json已保存的布局配置

参考资料

  • references/doc-structure.md —— 详细的文档结构
  • references/url-redirects.md —— 用于修复失效链接的旧 URL 到新 URL 映射
  • schema/ —— tmuo、preferences、layouts、UI preferences 的 JSON 架构
  • scripts/validate_config.py —— 验证 TE3 配置文件
  • scripts/validate_tmuo.py —— 验证 TMUO 文件

外部资源

评论

支持 Markdown