semantic-link-labs icon indicating copy to clipboard operation
semantic-link-labs copied to clipboard

Error When Running labs.run_model_bpa Command

Open AndreaTodaro opened this issue 1 year ago • 1 comments

Issue Report: Error When Running labs.run_model_bpa Command

Command Executed:

labs.run_model_bpa(dataset='AAA', workspace='BBB', language='fr-FR', export='table')

Error Message:

AmoException: The 'Database' with 'Name' = 'AAA' doesn't exist in the collection.

Description: When attempting to execute the labs.run_model_bpa command with the specified parameters, we encounter an AmoException indicating that the database named 'AAA' does not exist. This error occurs even though the account executing the command is an admin of the workspace 'BBB' that contains the semantic model.

Context:

  • The dataset 'AAA' exist in the specified workspace.
  • The user account running the command is an workspace admin, which typically should have access to all resources in the workspace. - Notably, if we take control of the model, the command executes successfully.

Possible Causes:

  1. Database Ownership: The model might require ownership permissions.
error

AndreaTodaro avatar Oct 02 '24 09:10 AndreaTodaro

Yes, you need to be an admin of the semantic model in order to properly connect to the model and run the various subprocesses. I presume you are also interested in #171.

m-kovalsky avatar Oct 02 '24 09:10 m-kovalsky

I experienced the same issue with one semantic model in a premium capacity Workspace. The curious thing is that the code ran successfully on another semantic model in the same Workspace. Both semantic models were configured by someone else and I didn't take over the settings of either of them. The only evident difference between them is the size: SM1 ran successfully: 85.18 MB SM2 with same error as above: 1.49 GB. F

fernandocalero avatar Nov 25 '24 02:11 fernandocalero

@fernandocalero what is your permission level for the workspace? Do the semantic models have any roles/rls/ols?

I also found that I don’t need to be the model owner to run bpa.

m-kovalsky avatar Nov 25 '24 05:11 m-kovalsky

@m-kovalsky Hi Michael, I'm a Global Admin and I'm not assigned a specific role in the Workspace. The semantic model doesn't have Roles nor RLS or OLS.

fernandocalero avatar Nov 25 '24 11:11 fernandocalero

Is this tenant setting disabled?

Image

m-kovalsky avatar Nov 28 '24 18:11 m-kovalsky

I just started in this position and they are not sharing too much information and are not really interested in semantic link labs, yet. I don't have access to the tenant settings. I'll have to ask. I might have been included in a security group to have access to the Workspace. Sorry I can't answer right now but I'll try and follow up here. Thank you.

fernandocalero avatar Nov 29 '24 12:11 fernandocalero

@m-kovalsky , Hi Michael, I have good news. I was running the following code to assign the semantic model id and workspace id to variables before running the Vertipaq Analyzer and BPA functions: ds = fabric.resolve_dataset_id(dataset_name="MY_SEMANTIC_MODEL_NAME", workspace="WORKSPACE_NAME") ws = fabric.resolve_workspace_id("WORKSPACE_NAME")

Then I was passing the variables to the functions as follows: labs.vertipaq_analyzer(dataset=ds, workspace=ws)

And there's when I got the error. Now I changed the variable for the actual semantic model name and it worked! labs.vertipaq_analyzer(dataset="MY_SEMANTIC_MODEL_NAME")

fernandocalero avatar Dec 05 '24 10:12 fernandocalero

The 'dataset' parameter in the function takes the semantic model name, not the Id. Please read the documentation.

m-kovalsky avatar Dec 05 '24 10:12 m-kovalsky