Datadir footprint#
- class dataikuapi.dss.data_directories_footprint.DSSDataDirectoriesFootprint(client)#
Handle to analyze the footprint of data directories
Warning
Do not create this class directly, use
dataikuapi.DSSClient.get_data_directories_footprint()- compute_global_only_footprint(wait=True)#
Compute the global data directories footprints, returning directories size in bytes. Global directories are instance-wide directories like code envs, plugins, libs.
- Parameters:
wait (bool) – a flag to wait for the computations to complete (defaults to True)
- Returns:
If wait is False, a
dataikuapi.dss.future.DSSFuturerepresenting the listing process. If wait is True, adataikuapi.dss.data_directories_footprint.Footprint
- compute_project_footprint(project_key, wait=True)#
Lists data directories footprints for the given project, returning directories size in bytes. Project directories are owned by a single project like managed datasets or managed folders, code studios, scenarios.
- Parameters:
project_key (string) – the project key
wait (bool) – a flag to wait for the computations to complete (defaults to True)
- Returns:
If wait is False, a
dataikuapi.dss.future.DSSFuturerepresenting the listing process. If wait is True, adataikuapi.dss.data_directories_footprint.Footprint
- compute_all_dss_footprint(wait=True)#
Lists all the DSS data directories footprints, returning directories size in bytes. This includes all the projects.
- Parameters:
wait (bool) – a flag to wait for the computations to complete (defaults to True)
- Returns:
If wait is False, a
dataikuapi.dss.future.DSSFuturerepresenting the listing process. If wait is True, adataikuapi.dss.data_directories_footprint.Footprint
- compute_unknown_footprint(show_summary_only=True, wait=True)#
Lists the unknown data directories footprints, returning directories size in bytes Unknown directories are any directory that does not belong to DSS
- Parameters:
show_summary_only (bool) – only show the aggregate per location found (defaults to False)
wait (bool) – a flag to wait for the computations to complete (defaults to True)
- Returns:
If wait is False, a
dataikuapi.dss.future.DSSFuturerepresenting the listing process. If wait is True, adataikuapi.dss.data_directories_footprint.Footprint
- class dataikuapi.dss.data_directories_footprint.Footprint(data)#
Helper class to access values of the data directories footprint
- property size#
Get the size of this footprint item in bytes
- property human_readable_size#
Get a printable size of this footprint item
- get_size(unit=None)#
Get the size of this footprint item
- Parameters:
unit – desired unit in which the size should be expressed. Can be ‘B’, ‘KB’, ‘MB’, ‘GB’. If not set, a unit is chosen automatically
- Returns:
if unit is specified, a number; else, a string.
- property nb_files#
Get the number of files in this footprint item
- property nb_folders#
Get the number of folders in this footprint item
- property nb_errors#
Get the number of errors in this footprint item.
Errors happen when a file or folder inside the footprint item is not accessible, for example in case of permission issues.
- property details#
Drill down into this data directories footprint
- Returns:
a dict of footprints
