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

Extended information about Lakekehouse - Not admin of Fabric capacity #292

Open
MASFelixPBI opened this issue Nov 19, 2024 · 7 comments
Open
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@MASFelixPBI
Copy link

Running Semantic link labs to get extended information for lakehouse tables I get an error that The 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Id is not a valid capacity Id.

I assume that this is because I'm not admin on the specific capacity since on the workspace I see the message below

Image

Please see the error codes below:

Error codes:

ValueError Traceback (most recent call last)
Cell In[19], line 4
1 lh = 'TBUS_LH_Enterprise_PRD'
2 ws = 'TB US Restaurant Insights'
----> 4 labs.lakehouse.get_lakehouse_tables(lakehouse= None, workspace=None, extended=True)

File /nfs4/pyenv-cd640a2e-c54f-41bc-a55e-4752aaec1075/lib/python3.10/site-packages/sempy/_utils/_log.py:348, in mds_log..get_wrapper..log_decorator_wrapper(*args, **kwargs)
345 start_time = time.perf_counter()
347 try:
--> 348 result = func(*args, **kwargs)
350 # The invocation for get_message_dict moves after the function
351 # so it can access the state after the method call
352 message.update(extractor.get_completion_message_dict(result, arg_dict))

File /nfs4/pyenv-cd640a2e-c54f-41bc-a55e-4752aaec1075/lib/python3.10/site-packages/sempy_labs/lakehouse/_get_lakehouse_tables.py:120, in get_lakehouse_tables(lakehouse, workspace, extended, count_rows, export)
117 df = pd.concat(dfs, ignore_index=True)
119 if extended:
--> 120 sku_value = get_sku_size(workspace)
121 guardrail = get_directlake_guardrails_for_sku(sku_value)
122 spark = SparkSession.builder.getOrCreate()

File /nfs4/pyenv-cd640a2e-c54f-41bc-a55e-4752aaec1075/lib/python3.10/site-packages/sempy_labs/directlake/_guardrails.py:60, in get_sku_size(workspace)
57 dfC_filt = dfC[dfC["Id"] == capacity_id]
59 if len(dfC_filt) == 0:
---> 60 raise ValueError(
61 f"{icons.red_dot} The '{capacity_id}' Id is not a valid capacity Id."
62 )
64 return dfC_filt["Sku"].iloc[0]

ValueError: 🔴 The 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Id is not a valid capacity Id.

@MASFelixPBI MASFelixPBI added the question Further information is requested label Nov 19, 2024
@m-kovalsky
Copy link
Collaborator

I don’t think you have to be an admin of the capacity. I think you just need access to the capacity.

Do you see it in this?

import sempy.fabric as fabric
fabric.list_capacities()

@MASFelixPBI
Copy link
Author

MASFelixPBI commented Nov 19, 2024

With this code I can only see my trial capacity and PPU capacity.

@m-kovalsky
Copy link
Collaborator

So you don’t have proper access to see the capacity details).

@MASFelixPBI
Copy link
Author

Maybe not checking everything correctly but how can I get the lakehouse information about table size row count withtout the extended capabilities?

@m-kovalsky
Copy link
Collaborator

Let me see if I can modify the function to still show extended details even if you have limited capacity access.

@m-kovalsky m-kovalsky self-assigned this Nov 19, 2024
@m-kovalsky m-kovalsky added the enhancement New feature or request label Nov 19, 2024
@MASFelixPBI
Copy link
Author

Thank you, that would be a nice addition, even if we can't compare with the current capacity, if we are able to get the information about the tables would be a good piece of data.

@m-kovalsky
Copy link
Collaborator

Yeah, so the plan is to show the capacity stats if possible, if not just show None for those columns and populate the rest of the extended stats.

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

No branches or pull requests

2 participants