Skip to content

Commit 7181129

Browse files
committed
Separated naming convention adding link to SQLBI naming conventions for function and parameter names
1 parent 070a7b0 commit 7181129

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

_mydocs/contribute/index.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,7 @@ You can follow these steps to add a new package to DAX Lib:
1515

1616
1. **Clone** the GitHub repository [https://github.com/sql-bi/daxlib/](https://github.com/sql-bi/daxlib/).
1717

18-
2. **Create a folder** for your package in `/packages/`, for example by copying the `DaxLib.Sample` package.
19-
20-
a. Name the folder after your package using lowercase names (e.g., `test.functions`), while the package should have a pascal naming convention (e.g., `Test.Functions`).
21-
22-
b. The package and library name is the prefix of all the function names. For example, to functions `Sum` and `Multiply` in the `Test.Functions` library package should be named `Test.Functions.Sum` and `Test.Functions.Multiply`.
23-
24-
c. The package and library name must have a hierarchical nomenclature, where the first name is the published/author identifier and the second (and following) names identify the library scope. For example, `Contoso.Conversion` is a library of conversion functions made by Contoso, whereas `Northwind.Math.Geometry` is a set of geometrical mathematical functions made by Northwind.
25-
26-
d. Do not use `Dax.` in the name of the library (Dax as a single word is a reserved keyword in a function name).
27-
28-
e. `DaxLib.` as a prefix is a reserved word for public open-source libraries of common use that are reviewed and approved by DaxLib maintainers. Do not create pull request for new `DaxLib.` libraries.
29-
30-
f. The first level in the folder structure is a single letter corresponding to the first letter of the package name (for example, a package `test.functions` will be in `/packages/t/test.functions/` folder). This is a technique used to reduce the number of elements in a single folder.
31-
32-
g. All the names of folders and files must be lowercase; the name of the package (with uppercase letters if necessary) is defined in the metadata (`manifest.daxlib` file) of the package.
18+
2. **Create a folder** for your package in `/packages/`, for example by copying the `DaxLib.Sample` package, and follow the [naming conventions](naming-conventions.md) for package, library, and function names.
3319

3420
3. **Create the DAX functions** in `functions.tmdl`
3521

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
layout: page
3+
title: Naming conventions
4+
published: true
5+
date: 2025-09-20
6+
modified: 2025-09-20
7+
order: /002
8+
next_reading: true
9+
---
10+
11+
When creating a new package for DAX Lib, it is important to follow specific naming conventions to ensure consistency and clarity across the platform. Below are the key guidelines to adhere to when naming your package and its components:
12+
1. **Package Folder Name**: The folder name for your package should be in lowercase letters and use dots to separate different levels of hierarchy. For example, if your package is named `Test.Functions`, the folder should be named `test.functions`.
13+
2. **Package and Library Name**: The name of the package and library should follow PascalCase naming conventions, where each word starts with an uppercase letter and there are no spaces or underscores. For example, `Test.Functions` is a valid package name. Exceptions are allowed for well-known acronyms (e.g., `XML`, `JSON`, `SVG`) which can be in uppercase.
14+
3. **Hierarchical Nomenclature**: The package and library name must have a hierarchical
15+
nomenclature, where the first name is the published/author identifier and the second (and following) names identify the library scope. For example, `Contoso.Conversion` is a library of conversion functions made by Contoso, whereas `Northwind.Math.Geometry` is a set of geometrical mathematical functions made by Northwind.
16+
4. **Function Naming**: All functions within the package should be prefixed with the package name to avoid naming conflicts. For example, if your package is named `Test.Functions`, a function named `Sum` should be named `Test.Functions.Sum`. Function names should also follow PascalCase conventions and the [DAX naming conventions for user-defined functions](https://docs.sqlbi.com/dax-style/dax-naming-conventions#user-defined-functions).
17+
5. **Reserved Keywords**: Do not use `Dax.` in the name of the library (Dax as a single word is a reserved keyword in a function name). `DaxLib.` as a prefix is a reserved word for public open-source libraries of common use that are reviewed and approved by DaxLib maintainers. Do not create pull request for new `DaxLib.` libraries.
18+
6. **Folder Structure**: The first level in the folder structure should be a single letter corresponding to the first letter of the package name (for example, a package `test.functions` will be in `/packages/t/test.functions/` folder). This is a technique used to reduce the number of elements in a single folder.
19+
7. **Lowercase for Folders and Files**: All names of folders and files must be in lowercase; the name of the package (with uppercase letters if necessary) is defined in the metadata (`manifest.daxlib` file) of the package.
20+
21+
By following these naming conventions, you help maintain a well-organized and easily navigable repository of DAX libraries, making it easier for users to find and utilize the functions they need.

0 commit comments

Comments
 (0)