How to clear metrics for a dataset from Python

JIshikawa
JIshikawa Dataiku DSS Core Designer, Registered Posts: 16
edited July 16 in Using Dataiku

Hi,

I know there is an option for this in the UI but I need to clear all metrics for datasets programmatically. The reason is that in my current set up, metrics are being computed every time a dataset has been rebuild.

So with every new build, the metrics of each run are getting stored but I am only interested in the latest version.

I have tried the following but the metrics were not cleared.

import dataiku
import json

client=dataiku.api_client()
project = client.get_default_project() 
dataset=project.get_dataset("test_dataset")

# clear metrics
dataset.get_settings().get_raw()["metrics"] = []

Operating system used: Mac

Tagged:

Answers

Setup Info
    Tags
      Help me…