Survey banner
Switching to Dataiku - a new area to help users who are transitioning from other tools and diving into Dataiku! CHECK IT OUT

Shared datasets in Flow Zone

Level 1
Shared datasets in Flow Zone

How to find shared dataset list from number of flow zone? the dataset present in default zone but used in other created zone.

0 Kudos
1 Reply

Hello @PoojaJogdand,

With the Dataiku Python API, you can use the DSSFlowZone.shared property to get a list of items which are shared to a zone.

Here is sample code to list datasets which are shared to a zone:

from collections import defaultdict
import dataiku
from dataikuapi.dss.dataset import DSSDataset

client = dataiku.api_client()
project = client.get_project(dataiku.default_project_key())
flow = project.get_flow()

shared_datasets = defaultdict(set)

for zone in flow.list_zones():
    for item in zone.shared:
        if type(item) is DSSDataset:
for shared_dataset in shared_datasets.items():

Screen Shot 2021-10-29 at 12.08.56.pngScreen Shot 2021-10-29 at 12.09.10.png

I hope this would help.