gbrueckl / PowerBI.CICD

Template for Github/YAML actions to extract PBIX metadata (.bim) on push
MIT License
41 stars 8 forks source link

Error loading model #4

Open ShivaBP opened 1 year ago

ShivaBP commented 1 year ago

Hi @gbrueckl,

Thanks for the great work. I am trying to set it up on Azure devops and it goes well until the process for running tabular editor starts. Then I get error:

Error loading model: Either the database does not exist, or you have permissions to access it.

I am pretty sure the dataset exists as I see it get uploaded to power bi service, and I don't know what permissions it could be that I am missing.

gbrueckl commented 1 year ago

well, I am not doing something special here, just calling Tabular Editor to connect to the Power BI Service at some point the user/principal who is running the job does not have permissions (this not necessarily is your user!)

which credentials are you using?

ShivaBP commented 1 year ago

I am using a service principle that is set as admin on the workspace. Im not even sure if it is credential related.

But based on the error that I am getting it might be. I checked the description of the error which corresponds to this:

Not able to connect to the provided Analysis Services instance, database not found, database metadata corrupt or database not of a supported compatibility level

Screen Shot 2022-10-21 at 15 07 29
gbrueckl commented 1 year ago

technically, you can take the code from this Repo and just try it manually from your local machine https://github.com/gbrueckl/PowerBI.CICD/blob/main/src/InlineScripts/Extract-PBIXMetadata.ps1#L29 and https://github.com/gbrueckl/PowerBI.CICD/blob/main/src/InlineScripts/Extract-PBIXMetadata.ps1#L130-L145

ShivaBP commented 1 year ago

I tried the scripts locally and it fails at the exact same stage with the exact same error. however, I tried using tabular editor manually and it worked but it could be that I am using another version of tabular editor. But it shouldn't matter if it worked for you with this version so I'm not sure

gbrueckl commented 1 year ago

this is the version I am using: https://cdn.tabulareditor.com/files/te2/TabularEditor.Portable.zip if it also fails on your local machine it is very likely not related to my code. If Tabular Editor itself fails to connect with your parameters please verify again that your clientId and Secret are correct