microsoft / microsoft/Analysis-Services
BPA Rules - Suggested updates due to new functionality
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 732
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
In the attached file, I have added some suggestion s to the existing rules and added some rules. To summarize:
- I have edited IDs to have the same text as the Name. The reason for this is a suggested updated to the Semantic Link Labs, where I have in a project added logic to catch ignored rules from the annotations created from ignoring the rules with Tabular Editor. The simplest way was then to align the ID and name (and transform it to same format as the ID), as this is the way the annotation is noted. Then I can get an annotation and add a column in the lakehouse to flag it as an ignored rule.
- Added the rules that have been added in Semantic Link Labs. I have not been able to properly test the DirectLake-related content, as I currently do not have the enterprise license, but used similar logic as for DirectQuery
- Added two rules based on recent video with Chris Webb and Analytics Endevours related to preparing the model for copilot (and humans) creating business friendly and not technical names. Not using dim/fact prefix and not CamelCase, PascalCase, SnakeCase for visible columns
- Added some logic related to functions and calendar option. Not possible to add functions as scope (yet). I assume the challenge then is that you need a file for the most recent edition and one for older editions of TE.
- Modified descriptions where syntax is changed
In addition to the rule-IDs, and the added rules, the following is the modification to existing rules:
- "Provide format string for measures" and "Whole numbers should be formatted with thousand separators and no decimals": Added format string expressions. More likely more in use with DaxUDF and should not violate. The same when DataType is string for the measure. If it should have a violation, it would be best to have separate violation along with a fix script. Not sure what it should be for a text measure. A bit annoying if creating dynamic text/ conditional formatting. Did not add DataType=DateTime for a measue, but it could be removed and have a separate rule with a fix script similar to the column, if required
- "Provide format string for columns". Aligned with SLL. For regions where the American date format is not standard, I think it is better that it is not violating. And the it can easily be tailored by removing the ones that are not used for consistency.
- "Inactive relationships that are never activated": Added functions to the rules, as ti could be that it is only used in a function and not a measure
- "Removed unnecessary columns". Added a check to see if it is used as part of the Calendar Option as well and not violate if this is the case
- "Set IsAvailableInMdx to false on non-attribute / true on necessary columns. Added direct lake logic according to SLL, but not verified
- "Measures using time intelligence and model is using DirectQuery". Added WTD calculations, as these are possible with Calendar options
- "Split date and time": The script returns Yes/No in the annotation and fails, as it checks for a numeric value
When possible, add function as scope to most of the "DAX expression"-rules
The suggested updates to the Rules-file:
BPARules_MicrosoftInput.json
Will get back when to SLL when I have some input there as well in the SLL repository.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the attached BPARules_MicrosoftInput.json and locating the repository's existing BPA rules file. Compare the proposed IDs, new rules, scope changes, DirectLake logic, and modified descriptions with the current rules and related Semantic Link Labs behavior. Done means the accepted rule updates are incorporated consistently and the affected rules are validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100