How to find un-used shared-in datasets of a project with python API ?

Haoran
Haoran Registered Posts: 8 ✭✭✭

Thanks for your time at the beginning.

I have a project and I want to know which datasets are shared-in from other projects (black icons) with Python API.

However, those shared-in datasets could be seperated into 2 group:
① unused: just showing in in the zone for checking
② used: being used through recipe for analyzing

image.png

I have already find the way to recognize those used shared-in datasets through previous Q&A:

client = dataiku.api_client()
project = client.get_default_project()
flow = project.get_flow()
shared_used_datasets = [dataset for dataset in flow.get_graph().get_source_datasets() if '.' in dataset.dataset_name]

However, how could I find those unused datasets? Do you have any ideas?

Thanks!

Operating system used: win11

Setup Info
    Tags
      Help me…