OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add microsoft/semantic-link-labs --skill tom-operations
Guide for working with the TOM (Tabular Object Model) wrapper. Use this when modifying semantic models programmatically.
npx skills add microsoft/semantic-link-labs --skill tom-operations
This skill covers working with the TOM wrapper in Semantic Link Labs for programmatic semantic model management.
Use this skill when you need to:
The TOM wrapper provides a Pythonic interface to the Tabular Object Model (TOM), which is the object model for Analysis Services semantic models.
| File | Purpose |
|---|---|
src/sempy_labs/tom/__init__.py | Module exports |
src/sempy_labs/tom/_model.py | TOMWrapper class implementation |
with statement - changes are saved on exitservice_principal_authentication context| Method | Returns |
|---|---|
all_columns() | All columns in all tables |
all_calculated_columns() | All calculated columns |
all_calculated_tables() | All calculated tables |
all_calculation_groups() | All calculation groups |
all_measures() | All measures |
all_partitions() | All partitions |
all_hierarchies() | All hierarchies |
all_levels() | All hierarchy levels |
all_calculation_items() | All calculation items |
all_functions() | All user-defined functions |
The TOMWrapper class includes many helper methods for common operations:
The TOMWrapper also supports Azure Analysis Services:
with statement)readonly=True when only reading metadataall_measures(), etc.) for efficient traversal| Resource | URL |
|---|---|
| TOM Reference | Microsoft Docs |
| Sample Notebook | Tabular Object Model.ipynb |
| API Documentation | ReadTheDocs |