Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

List charts in a project

mDercq
Level 1
Level 1
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
1 Reply
AlexT
Dataiker
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