m-kovalsky / fabric_cat_tools

Supercharge your Microsoft Fabric development with the fabric_cat_tools library
MIT License
100 stars 14 forks source link

Ability to set a Column.Description #22

Closed rgsiiiya closed 1 month ago

rgsiiiya commented 1 month ago

Is your feature request related to a problem? Please describe. When setting of a large quantity of symantec models, often times the Column.Description does not exist from the source. To provide a rich user experience, it is essential to provide them human readable descriptions. But, manually setting thousands of descriptions across hundreds of tables is not a reasonable expectation. So, we really want to script reading the symantec descriptoin from a file and setting it in the symantec model!

Describe the solution you'd like Similar to the Extended_property functions, need a similar fn() like: set_column_description(...)

Describe alternatives you've considered I tried using set_extended_property(... name='description') The function executes, but the native Description is not set, which is likely expected as it is not actually an 'extended' property but a core property.

Additional context none

rgsiiiya commented 1 month ago

well, turns out that you can just set the Column.Description directly, that seems to work.

tom.model.Tables['email'].Columns['to'].Description = 'zzz 2nd descritpion...'

I'll close this.

m-kovalsky commented 1 month ago

Extended properties is a completely different setting than the description. The 'connect_semantic_model' context manager gives you full access to TOM so you can set any property you want using regular TOM (as you discovered). I only added functions for properties and actions which are more complicated and perhaps involve additional libraries to complete. These functions simplify these activities (i.e. set_summarize_by). The code in your last comment is just regular TOM code which works just fine. Setting the description is a simple property so I did not add a function for it.