microsoft / microsoft/Analysis-Services
Set-SemanticModelParameters doesn't work with numeric parameters
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 732
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
Hi Team!
I have an issue with the current implementation of Set-SemanticModelParameters function in fabricps-pbip (https://github.com/microsoft/Analysis-Services/tree/master/pbidevmode/fabricps-pbip). It works perfectly fine for text type parameters, but it adds an unnecessary quotation for numeric parameters as well and breaks the M queries in my partitions as it cannot implicitly convert numbers. I can only assume that it breaks for other type of parameters as well
Can you please update the logic to do this only for Type = "text" only?
$modelExpression.Expression = $modelExpression.Expression -replace """?(.*)""? meta", """$parameterValue"" meta"
Thanks!
Jozsef
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 in pbidevmode/fabricps-pbip at Set-SemanticModelParameters and inspect the shown expression replacement. Check how the parameter Type is handled, then verify that text parameters retain quoting while numeric parameters do not break the M queries in partitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100