Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
olegkazanskyi
Helper II
Helper II

TMSL Alter Column Description

I am a noob in TMSL and I need your help.


I am trying to add a description to the column in Power BI Services with a command:

 

{
"alter ": {
"object": {
"database": "dataset_test",
"table": "005_SHIP_TO_LOCATIONS",
"column":"CREATION_DATE"
},
"column": {
"name": "CREATION_DATE",
"description":"This is the new description"
}
}
}

 

 

The error I get is:

Unrecognized command: alter . Check path '['alter ']', line 2, position 13.

Could you help me to make it work?

 

This is Power BI Premium and I TMSL works for table name modification, but I can't figure out how to change the column description.

1 REPLY 1
d_gosbell
Super User
Super User

The ALTER command only works with the objects listed in the documentation listed here https://docs.microsoft.com/en-us/analysis-services/tmsl/alter-command-tmsl?view=asallproducts-allver... 

(Database, DataSource, Table, Partition and Role)

 

If you want to alter the description on a column you would actually have to specify the entire columns collection and all the properties for all the columns.

 

For this reason I would not use TMSL to alter a column description. I would either use something like Tabular Editor or if you want to script this you could use PowerShell or C# with the TOM library (which is part of the AMO download here https://docs.microsoft.com/en-us/analysis-services/client-libraries?view=asallproducts-allversions ) and a version of this is usually on your machine if you have the SQL client tools installed.

 

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors