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

Error When Running labs.run_model_bpa Command #181

Closed
AndreaTodaro opened this issue Oct 2, 2024 · 8 comments
Closed

Error When Running labs.run_model_bpa Command #181

AndreaTodaro opened this issue Oct 2, 2024 · 8 comments
Labels
question Further information is requested

Comments

@AndreaTodaro
Copy link

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 AndreaTodaro added the bug Something isn't working label Oct 2, 2024
@m-kovalsky
Copy link
Collaborator

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 m-kovalsky added question Further information is requested and removed bug Something isn't working labels Oct 8, 2024
@fernandocalero
Copy link

fernandocalero commented Nov 25, 2024

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

@m-kovalsky
Copy link
Collaborator

@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.

@fernandocalero
Copy link

@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.

@m-kovalsky
Copy link
Collaborator

Is this tenant setting disabled?

Image

@fernandocalero
Copy link

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
Copy link

@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")

@m-kovalsky
Copy link
Collaborator

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

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

No branches or pull requests

3 participants