microsoft / microsoft/Analysis-Services

Set-SemanticModelParameters doesn't work with numeric parameters

Open
#367 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.