Forum Discussion
SEMPY - Remame Column Semantic Model
- 1 year ago
Seems like smepy.update_column cannot change the column name. Not sure if there any other function which can perform this task, But here are a couple of suggestions
1. with TMSL, you can run this script either from tabular editor or SSMS to update mutiple column names programitically
{ "operations": [ { "operationType": "update", "object": { "database": "YourDatasetName", "table": "YourTableName", "column": "OldColumnName" }, "property": "name", "value": "NewColumnName" } ] }2. first get the definition (bim file) of your semantic model - sempy_labs.get_semantic_model_from_bim
and then update it with this function sempy_labs.update_semantic_model_from_bimhttps://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
Did I answer your question? Mark my post as a solution! If I helped you, click on the Thumbs Up to give Kudos.
Proud to be a Super User!
Seems like smepy.update_column cannot change the column name. Not sure if there any other function which can perform this task, But here are a couple of suggestions
1. with TMSL, you can run this script either from tabular editor or SSMS to update mutiple column names programitically
{
"operations": [
{
"operationType": "update",
"object": {
"database": "YourDatasetName",
"table": "YourTableName",
"column": "OldColumnName"
},
"property": "name",
"value": "NewColumnName"
}
]
}
2. first get the definition (bim file) of your semantic model - sempy_labs.get_semantic_model_from_bim
and then update it with this function sempy_labs.update_semantic_model_from_bim
https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Hi,
Thanks for the tip. I'll try that direction and let you know how it goes.
Kris.