Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
Is there any way to run the compute button using python API to refresh the data size of dataset?
Thanks in Advance
Hi @sj0071992
Try this code using dataikuapi.dss.dataset.DSSDataset.compute_metrics :
import dataiku
client = dataiku.api_client()
project = client.get_default_project() # Get a handle to the current default project
ds = project.get_dataset("your-dataset") # TODO: Change the dataset name
# Compute dataset metrics
ds.compute_metrics(
# Change the example metric identifiers below to a subset of the ones you actually want to run
metric_ids=['records:COUNT_RECORDS', 'basic:COUNT_COLUMNS']
)
# Run all the checks
ds.run_checks()
Hi @sj0071992
Try this code using dataikuapi.dss.dataset.DSSDataset.compute_metrics :
import dataiku
client = dataiku.api_client()
project = client.get_default_project() # Get a handle to the current default project
ds = project.get_dataset("your-dataset") # TODO: Change the dataset name
# Compute dataset metrics
ds.compute_metrics(
# Change the example metric identifiers below to a subset of the ones you actually want to run
metric_ids=['records:COUNT_RECORDS', 'basic:COUNT_COLUMNS']
)
# Run all the checks
ds.run_checks()