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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

M scripting conventions (suggestions)

Dear all,

 

I was wondering if anyone had any thoughts about M scripting conventions that works for them. I am just trying to work out a systematic way forward for myself.

 

I am thinking.

 

variables (ie. lists and scalar values) = camelCase (with lowercase first letter)

User defined functions = CamelCase (with uppercase first letter)

Names of Tables and other objects imported from databases = same name as they appear in the database

Fields in tables = First word uppercase and all words lowercase afterward

Names of Queries involved in intermediate processing (do not appear in the report) = lowercase_with_underscore_separator

Names of Queries that appear in the report view = Every First Letter Of Words In Uppercase 

 

I should add

Constants = ALL_UPPERCASE_WITH_UNDERSCORE

 

3 REPLIES 3
hugoberry
Responsive Resident
Responsive Resident

Because it is hard to collaborate on the Power Query scripts, there is little need agree on code name conventions. In my experience I'm trying to adhere to the rules that you mention in your post, but I think that a more authoritative input from @MSFT would be more desirable. Something in the lines of what Fsharp has would be good: http://fsharp.org/specs/component-design-guidelines/

v-sihou-msft
Employee
Employee

@Anonymous

 

I still can't understand your requirement. Can you share your expected result with sample data?

 

Regards,

Anonymous
Not applicable

Hi no requirements,

 

I was just wondering if people have any conventions that they use in how they label variables, names of tables, names of queries nad so forth

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.