Reading Tags of datasets in python
![SuhasChinku](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar14.png)
SuhasChinku
Registered Posts: 5 ✭✭✭✭
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
Tagged:
Answers
-
Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 365 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'])