List charts in a project

mDercq
Level 2
List charts in a project

Dear Dataikuers,

in a complex project, it is easy to generate charts to control or publish, and then forget about them.
How can I get a list of charts generated in a project ? (for garbage collection, for instance ...)

Best regards,

Mike


Operating system used: linux

0 Kudos
2 Replies
AlexT
Dataiker

Hi @mDercq ,

There is no public API endpoint to list charts. But all charts associated with any datasets can be found under DATADIR/config/PROJECTID/explore/dataset_name.json

So you can use python or bash to read parse the files to list the project dataset name and charts listed. 

for d in */explore/*.json ; do chart_name=`cat $d |jq .charts| jq '.[]'.def.name` ; [[ -z "$chart_name" ]] || echo $d":"$chart_name; done

 

Let me know that helps!

0 Kudos
mDercq
Level 2
Author

Hello AlexT,

Sorry for the late reaction, I did not see your answer earlier.
I will give it a try.

Thanks.

Mike

0 Kudos