A DAX library is deployed as a package in DAX Lib. A package is a ZIP file that includes a few files (TODO add package description).
You can follow these steps to add a new package to DAX Lib:
-
Clone the GitHub repository https://github.com/sql-bi/daxlib/.
-
Create a folder for your package in
/packages/
, for example by copying theDaxLib.Sample
package, and follow the naming conventions for package, library, and function names. -
Create the DAX functions in
functions.tmdl
a. The file
lib/functions.tmdl
contains the source code of the DAX functions in a TMDLcreateOrReplace
command. For example, intest.functions
the name is/packages/t/test.functions/lib/functions.tmdl
b. The
functions.tmdl
file contains the function definition using the TMDL syntax following thecreateOrReplace
statementc. Include mandatory annotations for each function of the library:
``` annotation DAXLIB_PackageId = <name of library> annotation DAXLIB_PackageVersion = <version of library> ```
-
Create the manifest in the
manifest.daxlib
filea. For example, in
test.functions
the name is/packages/t/test.functions/manifest.daxlib
b. The
manifest.daxlib
file contains the package properties in JSON format. See the DaxLib.Sample package for an example and refer to the JSON schema for the complete specification of available properties. -
Create a pull request to publish the library on daxlib.org
a. The pull request must be approved manually by DaxLib owners/maintainers.
b. When the pull request is approved, the package is immediately published.