Skip to content

Commit 7d78e0d

Browse files
committed
[sc-80919] new PAPI - dataset get full info
1 parent ef2ca0a commit 7d78e0d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

dataikuapi/dss/dataset.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ def get_last_metric_values(self, partition=''):
511511
return ComputedMetrics(self.client._perform_json(
512512
"GET", "/projects/%s/datasets/%s/metrics/last/%s" % (self.project_key, self.dataset_name, 'NP' if len(partition) == 0 else partition)))
513513

514-
515514
def get_metric_history(self, metric, partition=''):
516515
"""
517516
Get the history of the values of the metric on this dataset
@@ -523,6 +522,17 @@ def get_metric_history(self, metric, partition=''):
523522
"GET", "/projects/%s/datasets/%s/metrics/history/%s" % (self.project_key, self.dataset_name, 'NP' if len(partition) == 0 else partition),
524523
params={'metricLookup' : metric if isinstance(metric, str) or isinstance(metric, unicode) else json.dumps(metric)})
525524

525+
def get_full_info(self):
526+
"""
527+
Retrieve all the information about a dataset
528+
529+
Returns:
530+
a complex JSON object containing all the information on a dataset, such as params, schema, lastbuild infos, status, etc.
531+
"""
532+
return self.client._perform_json(
533+
"GET", "/projects/%s/datasets/%s/getFullInfo" % (self.project_key, self.dataset_name)
534+
)
535+
526536
########################################################
527537
# Misc
528538
########################################################
@@ -542,7 +552,7 @@ def move_to_zone(self, zone):
542552
:param object zone: a :class:`dataikuapi.dss.flow.DSSFlowZone` where to move the object
543553
"""
544554
if isinstance(zone, basestring):
545-
zone = self.project.get_flow().get_zone(zone)
555+
zone = self.project.get_flow().get_zone(zone)
546556
zone.add_item(self)
547557

548558
def share_to_zone(self, zone):

0 commit comments

Comments
 (0)