schema-discovery
Skill10 starsChanged 32 days agoMITView on GitHub
Explore Power BI semantic model schemas using DAX INFO functions. Progressive metadata discovery strategy, scope estimation, and narrowing techniques for tables, columns, measures, and relationships.
9 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- microsoft/DataHub-App-for-Microsoft-Copilot-Agents-Cowork-and-Autopilotsword for word, first seen Nov 8, 2026
- Happy-Technologies-LLC/happy-platform-skillstheir own version, first seen Nov 1, 2026
- microsoft/ValueLens-for-Microsoft-Copilotword for word, first seen Oct 25, 2026
- microsoft/ConsumptionCentral-for-Microsoft-Copilotword for word, first seen Oct 25, 2026
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfinword for word, first seen Oct 17, 2026
- microsoft/frontiertour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabricword for word, first seen Oct 17, 2026
Used with
Projects with it also use rayfin-functions.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrayfin-functions
Use when writing Rayfin user-defined functions (UDFs), invoking functions from frontend code, or using functions CLI commands. Triggers: rayfin functions, udf.func, UserDataFunctions, RayfinContext, FabricContext, AppFunctionsSchema, functions init, dev functions apply, client.functions, invoke, func start, function_app.ts, types.ts, rayfin/functions/, FunctionClient, FunctionsSchema, fabric-user-data-functions, functionsBaseUrl, VITE_RAYFIN_FUNCTIONS_URL, bootstrap.ts, rayfinClient.ts
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 7
- microsoft/ConsumptionCentral-for-Microsoft-Copilot★ 33100% same
- microsoft/ValueLens-for-Microsoft-Copilot★ 23100% same
- microsoft/DataHub-App-for-Microsoft-Copilot-Agents-Cowork-and-Autopilots★ 10100% same
- microsoft/aitour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 2100% same
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 2100% same
- microsoft/aitour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabric★ 1100% same
- microsoft/frontiertour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabric★ 1100% same
Edited · 1
- microsoft/rayfin★ 64698% same
Wrote their own version · 1
- Happy-Technologies-LLC/happy-platform-skills★ 41same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- app/AGENTS.mdAGENTS.md
- app-designSkill
- app-validationSkill
- dax-authoringSkill
- fabric-cliSkill
- fabric-sdkSkill
- playwright-cliSkill
- query-designSkill
- visualsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Use fully-qualified 'Table'[Column] for column references
- Very specific: line 29
Use simple [Measure] for measure references
- Very specific: line 117
Use npx fabric-app-data query <alias> --query '<DAX>' to execute INFO queries against a semantic model.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Schema Discovery
Table of Contents
| Task | Reference | Notes |
| Must/Prefer/Avoid | SKILL.md: Must/Prefer/Avoid | Guardrails for schema discovery |
| Progressive Discovery Strategy | SKILL.md: Progressive Schema Discovery | Decision tree for on-demand metadata fetching |
| Recommended Discovery Order | SKILL.md: Recommended Discovery Order | Start with scope estimation → tables → columns → measures → relationships |
| Metadata Object → INFO Function Map | SKILL.md: Metadata Object → INFO Function Map | Tables, columns, measures, relationships, calc groups, calendars, UDFs, variations |
| Scope Estimation Queries | discovery-queries.md: Scope Estimation Queries | Probe table/column/measure/relationship counts before deep discovery |
| INFO Output Columns | discovery-queries.md: INFO Output Columns | INFO.VIEW.* (read access); INFO.* (may need elevated access) |
| Narrowing Results (Projection + Filtering) | discovery-queries.md: Narrowing Results | SELECTCOLUMNS + FILTER to reduce output volume |
| Advanced Metadata (Calc Groups, Calendars, UDFs) | discovery-queries.md: Advanced Metadata Queries | INFO.CALCULATIONGROUPS, INFO.CALENDARS, INFO.USERDEFINEDFUNCTIONS, INFO.VARIATIONS |
| Complete INFO Function Catalog | discovery-queries.md: Complete INFO Function Catalog | Dynamic query to enumerate all INFO functions in the engine |
Must / Prefer / Avoid
Must
- Use fully-qualified
'Table'[Column]for column references - Use simple
[Measure]for measure references
Prefer
- INFO.VIEW functions for initial metadata discovery (read access, lightweight)
- Progressive schema discovery over full schema dumps
- SELECTCOLUMNS + FILTER to narrow INFO results
Avoid
- Fetching full schema upfront — discover incrementally based on need
- Re-fetching metadata already discovered in this conversation
- Using GetSemanticModelSchema or GenerateQuery MCP tools (these are not available)
- Using
DiscoverArtifactsto find a semantic model — that MCP tool is not available; usenpx fabric-app-data search(see fabric-cli) instead
Progressive Schema Discovery
Discover metadata incrementally based on what the user actually needs.
Strategy (Decision Tree)
User asks a question
→ Do I know which tables are relevant?
→ NO: Run INFO.VIEW.TABLES() to get table inventory
→ YES: Do I know the columns/measures for those tables?
→ NO: Run filtered INFO.VIEW.COLUMNS() and INFO.VIEW.MEASURES() for those tables
→ YES: Do I need relationships?
→ YES: Run INFO.VIEW.RELATIONSHIPS() filtered to those tables
→ NO: Do I need advanced metadata?
→ Have elevated INFO functions already failed in this session?
→ YES: Skip — assume no permission for all elevated queries
→ NO: Try the relevant elevated query:
→ Calculation groups: INFO.CALCULATIONGROUPS() + INFO.CALCULATIONITEMS()
→ Calendars: INFO.CALENDARS()
→ User-defined functions: INFO.USERDEFINEDFUNCTIONS()
→ Variations: INFO.VARIATIONS()
→ If query fails with permission error: mark elevated access as unavailable
→ Use discovered schema to write DAX queries (see dax-authoring skill)Rules
- Start with scope estimation — Run the scope probe query first to understand model size
- Discover on demand — Only fetch tables/columns/measures relevant to the current user request
- Use INFO.VIEW functions first (read access) — tables, columns, measures, relationships
- Use INFO functions (may need elevated access) for: calculation groups, calculation items, variations, user-defined functions, calendars
- Handle permission failures gracefully — If an elevated INFO function fails but INFO.VIEW.* functions succeeded, assume the user lacks elevated permissions and skip all elevated discoveries entirely
- Always narrow results — Use SELECTCOLUMNS + FILTER to fetch only needed columns and rows
- Cache discovered schema mentally — Don't re-fetch what you've already discovered in this conversation
Recommended Discovery Order
- Scope estimation — Count tables, columns, measures, relationships
- Tables — Get table names, identify relevant ones
- Columns — Get columns for relevant tables only
- Measures — Get measures (prefer using these over raw aggregations)
- Relationships — Get relationships between relevant tables
- Advanced metadata (if needed) — Calculation groups, calendars, UDFs, variations
Scope Estimation Query
EVALUATE
ROW(
"TableCount", COUNTROWS(INFO.VIEW.TABLES()),
"ColumnCount", COUNTROWS(INFO.VIEW.COLUMNS()),
"MeasureCount", COUNTROWS(INFO.VIEW.MEASURES()),
"RelationshipCount", COUNTROWS(INFO.VIEW.RELATIONSHIPS())
)Metadata Object → INFO Function Map
| Metadata Object | Primary INFO Functions | Access Level |
| Tables | INFO.VIEW.TABLES() | Read |
| Columns | INFO.VIEW.COLUMNS() | Read |
| Measures | INFO.VIEW.MEASURES() | Read |
| Relationships | INFO.VIEW.RELATIONSHIPS() | Read |
| Model config | INFO.MODEL() | May need elevated |
| Calculation groups | INFO.CALCULATIONGROUPS(), INFO.CALCULATIONITEMS() | May need elevated |
| Calendars | INFO.CALENDARS(), INFO.CALENDARCOLUMNGROUPS(), INFO.CALENDARCOLUMNREFERENCES() | May need elevated |
| User-defined functions | INFO.USERDEFINEDFUNCTIONS() | May need elevated |
| Variations | INFO.VARIATIONS() | May need elevated |
For the full query catalog and output column details, see discovery-queries.md.
Running Discovery Queries
Use npx fabric-app-data query <alias> --query '<DAX>' to execute INFO queries against a semantic model. For full CLI options (profiles, file input, result limits), see the fabric-cli skill.
npx fabric-app-data query <alias> --query "EVALUATE INFO.VIEW.TABLES()"Troubleshooting
| Problem | Solution |
| INFO functions return permission errors | Fall back to INFO.VIEW functions; mark elevated access as unavailable for this session |
| Metadata output too large | Use scope estimation + narrowing patterns from discovery-queries.md |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

