Adding Metadata to an Azure Analysis Services Database

Jonas Scheerders 0 Reputation points
2025-01-13T12:24:17.8+00:00

How can metadata be added to a database or cube in Azure Analysis Services? Specifics include adding information such as descriptions, data officer contacts, and data stewards. What steps or methods are available to achieve this?

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
467 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,745 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 27,596 Reputation points
    2025-01-13T18:18:13.18+00:00

    AAS supports adding extended properties to models, tables, columns, measures, and other objects. Extended properties are custom metadata that can hold information such as descriptions, contacts, and more.

    PowerShell provides a way to automate the addition of extended properties.

    # Connect to Azure Analysis Services
    
    $server = "your-azure-analysis-service-server-name"
    
    $database = "your-database-name"
    
    $connectionString = "Data Source=$server"
    
    # Import the necessary module
    
    Import-Module SqlServer
    
    # Set metadata for a model object
    
    $model = Get-AnalysisServicesObject -Server $server -Database $database
    
    Set-AnalysisServicesObjectExtendedProperty -Object $model -Name "Description" -Value "This is a description of the cube."
    
    

    You can use Tabular Model Scripting Language (TMSL) or XMLA scripts to add annotations to tables, columns, and measures.This is useful for larger deployments or for repeated tasks.

    After you prepate your script, you can deploy it using SSMS or directly through PowerShell/SQL scripts.

    {
        "type": "Table",
        "name": "Sales",
        "extendedProperties": [
            {
                "name": "Description",
                "value": "This table contains sales data."
            }
        ]
    }
    

    If your end goal is to visualize the metadata or document it, you can also create a Power BI report that connects to the Azure Analysis Services model and pulls metadata through DAX or data models.

    You can use DAX measures or Power Query to create a table displaying metadata descriptions, contact details, etc., which can be consumed by business users.

    Links to help you :

    https://docs.microsoft.com/en-us/sql/analysis-services/extended-properties-tabular-model?view=asallproducts-allversions

    https://docs.microsoft.com/en-us/powershell/azure/analysis-services/

    https://docs.microsoft.com/en-us/sql/analysis-services/xmla-commands?view=asallproducts-allversions

    https://docs.microsoft.com/en-us/sql/analysis-services/tmsl-tabular-model-script?view=asallproducts-allversions


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.