microsoft / semantic-link-labs

Early access to new features for Microsoft Fabric's Semantic Link.
MIT License
178 stars 37 forks source link

Vertipaq Analyzer export to zip #246

Closed danmeissner closed 1 week ago

danmeissner commented 2 weeks ago

Exporting to zip when running the .vertipaq_analyzer(dataset, workspace, export) method is throwing the following error. Exporting to table works fine. This is repeatable across tenants, workspaces.


--------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[22], line 1
----> 1 labs.vertipaq_analyzer(dataset = dataset_name, workspace = workspace_name, export = 'zip')

File /nfs4/pyenv-d5950a54-a991-4136-b5b5-beb174d95096/lib/python3.11/site-packages/sempy/_utils/_log.py:310, in mds_log.<locals>.get_wrapper.<locals>.log_decorator_wrapper(*args, **kwargs)
    307     raise
    309 try:
--> 310     result = func(*args, **kwargs)
    312     # The invocation for get_message_dict moves after the function
    313     # so it can access the state after the method call
    314     message.update(extractor.get_completion_message_dict(result, arg_dict))

File /nfs4/pyenv-d5950a54-a991-4136-b5b5-beb174d95096/lib/python3.11/site-packages/sempy_labs/_vertipaq.py:610, in vertipaq_analyzer(dataset, workspace, export, read_stats_from_data, **kwargs)
    608 for fileName, df in dataFrames.items():
    609     filePath = os.path.join(subFolderPath, f"{fileName}{ext}")
--> 610     df.to_csv(filePath, index=False)
    612 # Create a zip file and add CSV files to it
    613 with zipfile.ZipFile(zipFilePath, "w") as zipf:

AttributeError: 'Styler' object has no attribute 'to_csv'

Image

danmeissner commented 2 weeks ago

Is there a library that I am not installing or missing?

m-kovalsky commented 1 week ago

Fixed in 0.8.5.