microsoft / semantic-link-labs

Early access to new features for Microsoft Fabric's Semantic Link.
MIT License
178 stars 37 forks source link

Automatic conversion of field names to 'business friendly' field names #165

Closed aventius-software closed 1 month ago

aventius-software commented 2 months ago

Is your feature request related to a problem? Please describe. I've got a semantic model with loads of fields, all named as they are in the source tables, so maybe Pascal case or snake case, I currently have to rename them all manually to more business friendly names in the semantic model - which is a real pain.

Describe the solution you'd like In the old days of SSAS multidimensional cube projects in Visual Studio years ago it would do this for you... When creating a model from a data source it recognised word separation in the original data source field name (i.e. snake case or Pascal case named columns). It then auto converted them to nice 'business friendly' for you in your cube project without you needing to do anything! So for example, original column names like 'ThisIsAField' or 'this_is_a_field' would be translated into 'This Is A Field'. Would be great if there was something that would do this in Fabric.

Describe alternatives you've considered Currently just manually doing this, not aware of alternatives, unless there's some way of scripting the change...

Additional context N/A

m-kovalsky commented 2 months ago

You can use the TOMWrapper to loop through your model objects (tables, columns, measures etc) and use RegEx to convert and rename snake/pascal case to friendly case.


From: Rocket Porg @.> Sent: Monday, September 23, 2024 11:01:39 AM To: microsoft/semantic-link-labs @.> Cc: Subscribed @.***> Subject: [microsoft/semantic-link-labs] Automatic conversion of field names to 'business friendly' field names (Issue #165)

Is your feature request related to a problem? Please describe. I've got a semantic model with loads of fields, all named as they are in the source tables, so maybe Pascal case or snake case, I currently have to rename them all manually to more business friendly names in the semantic model - which is a real pain.

Describe the solution you'd like In the old days of SSAS multidimensional cube projects in Visual Studio years ago it would do this for you... When creating a model from a data source it recognised word separation in the original data source field name (i.e. snake case or Pascal case named columns). It then auto converted them to nice 'business friendly' for you in your cube project without you needing to do anything! So for example, original column names like 'ThisIsAField' or 'this_is_a_field' would be translated into 'This Is A Field'. Would be great if there was something that would do this in Fabric.

Describe alternatives you've considered Currently just manually doing this, not aware of alternatives, unless there's some way of scripting the change...

Additional context N/A

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/semantic-link-labs/issues/165, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHBQBNWJIX3AVOJYPHDQZULZX7KHHAVCNFSM6AAAAABOVTEIOKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DCOJZHEYTKNY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

m-kovalsky commented 1 month ago

See this function in 0.8.1.

aventius-software commented 1 month ago

Nice, this way I can build it into a process within Fabric instead of having to use an 'external' tool. Thanks 🫡