tayganr / purviewcli

Microsoft Purview CLI
https://aka.ms/purviewcli
MIT License
48 stars 27 forks source link

'pv insight assetDistributionByDataSource' command is failing #9

Closed ankit-rathi closed 3 years ago

ankit-rathi commented 3 years ago

I am trying to get insights via azure purviewcli but getting this error while executing the commends to get insights:

Screen of Purview portal is also attached for your reference.

pv insight assetDistributionByDataSource

Traceback (most recent call last): File "/anaconda/envs/azureml_py36/bin/pv", line 8, in sys.exit(main()) File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/purviewcli/cli/cli.py", line 61, in main module = importlib.importmodule('purviewcli.client.' + command) File "/anaconda/envs/azureml_py36/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/purviewcli/client/_insight.py", line 1, in from .client import get_data ImportError: cannot import name 'get_data'

tmp
tayganr commented 3 years ago

Thanks @ankit-rathi. Looks like the endpoints Azure Purview previously used to render insights has changed. I have updated the package to work with what is currently being exposed, please upgrade to version 0.1.25. Notebook with example commands can be found here: https://github.com/tayganr/purviewcli/blob/master/samples/notebooks%20(basic)/insight.ipynb