Reading Tags of datasets in python

SuhasChinku
Level 2
Reading Tags of datasets in python

Hi all,

I am looking for a way to list all the dataset names based on the "Tags"  into a python code.

So that I can get the dataset names which can be used for further processing.  Thank you

Regards

Suhas

0 Kudos
1 Reply
sergeyd
Dataiker

Hi @SuhasChinku 

You should be able to do this via this code sample (replace the <> placeholders with proper value): 

import dataiku

client = dataiku.api_client()
project = client.get_project('<project_key>')

datasets = project.list_datasets()

for dataset in datasets:
    if ('<tag>' in dataset['tags']):
        print(dataset['name'])
0 Kudos