Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy new Power BI tmdl model #326

Open
rednax1994 opened this issue Feb 27, 2024 · 8 comments
Open

Deploy new Power BI tmdl model #326

rednax1994 opened this issue Feb 27, 2024 · 8 comments

Comments

@rednax1994
Copy link

I've converted my Power BI model to the new tmdl using Power BI Desktop. When trying to deploy this using pbi-tools I'm getting a compatibilityViolationException. In my model i'm using the field parameters and on this one the deploy seems to be breaking.
Below is the error message:
Microsoft.AnalysisServices.Tabular.CompatibilityViolationException: The usage of [model 'Model'].[table '.Self-Service Dimensions (IB - Data)'].[related column details] is not supported at AnalysisServices mode.
at Microsoft.AnalysisServices.Tabular.Database.SerializeToJsonObject(JsonObject result, SerializeOptions options)
at Microsoft.AnalysisServices.Tabular.Database.SerializeToNewJsonObject(SerializeOptions options)
at Microsoft.AnalysisServices.Tabular.JsonSerializer.SerializeDatabase(Database database, SerializeOptions options)
at PbiTools.Serialization.TabularModelSerializer.DeserializeTmdl() in X:\pbi-tools\BRANCHES\rc.8\src\PBI-Tools\Serialization\TabularModelSerializer.cs:line 565
at PbiTools.Serialization.TabularModelSerializer.TryDeserialize(JObject& database) in X:\pbi-tools\BRANCHES\rc.8\src\PBI-Tools\Serialization\TabularModelSerializer.cs:line 493
at PbiTools.Serialization.PowerBIPartSerializerExtensions.DeserializeSafe[T](IPowerBIPartSerializer`1 serializer, Boolean isOptional) in X:\pbi-tools\BRANCHES\rc.8\src\PBI-Tools\Serialization\IPowerBIPartSerializer.cs:line 41

I'm not sure what i need to do to make sure that this is not a problem anymore.

@mthierba
Copy link
Contributor

Sounds like the database.compatibilityLevel isn't set (or not to the right level). Could you check?

@rednax1994
Copy link
Author

rednax1994 commented Feb 27, 2024

Hi Mathias,
The compatibilityLevel is set for 1567 as set by Power BI desktop itself.
image

@mthierba
Copy link
Contributor

If the issue is related to field params, it's likely that the problem is related to CompatibilityMode (not Level). Are you using an outdated version of pbi-tools? The latest versions should be setting the mode correctly. I distinctly remember fixing that.

@rednax1994
Copy link
Author

The compatibilityMode gets removed on save by Power BI. Therefor I would need to write a script to include it on every pipeline run. That is ok. but if you say it should be inherently set by pbi-tools then maybe something else goes wrong. I'm using ghcr.io/pbi-tools/pbi-tools-core:latest

@mthierba
Copy link
Contributor

That's useful to know. It should work without any further external intervention. Will raise it with the team internally. You have a workaround for now, though.

@rednax1994
Copy link
Author

It's interesting, when you add the compatibilityMode: powerBI I still get an error which i'm not understanding at this point:
System.AggregateException: One or more errors occurred. (Cannot convert value '' to required type 'String'. Check path 'name', line 2, position 14.)
---> Microsoft.AnalysisServices.JsonSerializationException: Cannot convert value '' to required type 'String'. Check path 'name', line 2, position 14.
at Microsoft.AnalysisServices.Tabular.Json.JsonPropertyHelper.ConvertJsonValueToString(JToken rawJsonValue)
at Microsoft.AnalysisServices.Tabular.Database.ReadPropertyFromJson(JProperty jsonProp, DeserializeOptions options, CompatibilityMode mode)
at Microsoft.AnalysisServices.Tabular.Database.DeserializeFromJsonObject(JObject jsonObj, DeserializeOptions options, CompatibilityMode mode)
at Microsoft.AnalysisServices.Tabular.JsonSerializer.DeserializeDatabase(String json, DeserializeOptions options, CompatibilityMode mode)
at PbiTools.Deployments.DeploymentManager.DeployDatasetAsync(PbiDeploymentManifest manifest, String label, String environment) in X:\pbi-tools\BRANCHES\rc.8\src\PBI-Tools\Deployments\DeploymentManager.Dataset.cs:line 128
at PbiTools.Deployments.DeploymentManager.DeployAsync(String profileName, String environment) in X:\pbi-tools\BRANCHES\rc.8\src\PBI-Tools\Deployments\DeploymentManager.cs:line 91
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at PbiTools.Cli.CmdLineActions.Deploy(String folder, String label, String environment, String basePath, Boolean whatIf) in X:\pbi-tools\BRANCHES\rc.8\src\PBI-Tools\Cli\Deploy.cs:line 41
--- End of stack trace from previous location ---

@mthierba
Copy link
Contributor

Assign a name to both, the Database and the Model, object. That should fix this problem and is a known issue.

@rednax1994
Copy link
Author

Awesome, thank you very much for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants