Statistics worksheets#
For usage information and examples, see Statistics worksheets
- class dataikuapi.dss.statistics.DSSStatisticsWorksheet(client, project_key, dataset_name, worksheet_id)#
A handle to interact with a worksheet.
Important
Do not create this class directly, instead use
dataikuapi.dss.dataset.DSSDataset.get_statistics_worksheet()
- delete()#
Deletes the worksheet.
- get_settings()#
Gets the worksheet settings.
- Returns:
a handle for the worksheet settings
- Return type:
- run_worksheet(wait=True)#
Computes the result of the whole worksheet.
When wait is True, the method waits for the computation to complete and returns the corresponding result, otherwise it returns immediately a handle for a
DSSFuture
result.- Parameters:
wait (bool) – a flag to wait for the computation to complete (defaults to True)
- Returns:
the corresponding card result or a handle for the future result
- Return type:
- run_card(card, wait=True)#
Computes the result of a card in the context of the worksheet.
When wait is True, the method waits for the computation to complete and returns the corresponding result, otherwise it returns immediately a handle for a
DSSFuture
result.Note
The card does not need to belong to the worksheet.
- Parameters:
card (
DSSStatisticsCardSettings
or dict obtained fromDSSStatisticsCardSettings.get_raw()
) – the card to computewait (bool) – a flag to wait for the computations to complete (defaults to True)
- Returns:
the corresponding card result or a handle for the future result
- Return type:
- run_computation(computation, wait=True)#
Runs a computation in the context of the worksheet.
When wait is True, the method waits for the computation to complete and returns the corresponding result, otherwise it returns immediately a handle for a
DSSFuture
result.- Parameters:
computation (
DSSStatisticsComputationSettings
or dict obtained fromDSSStatisticsComputationSettings.get_raw()
) – the computation to performwait (bool) – a flag to wait for the computations to complete (defaults to True)
- Returns:
the corresponding computation result or a handle for the future result
- Returns:
- class dataikuapi.dss.statistics.DSSStatisticsWorksheetSettings(client, project_key, dataset_name, worksheet_id, worksheet_definition)#
A handle to interact with the worksheet settings.
Important
Do not create this class directly, instead use
DSSStatisticsWorksheet.get_settings()
- add_card(card)#
Adds a new card to the worksheet.
- Parameters:
card (
DSSStatisticsCardSettings
or dict obtained fromDSSStatisticsCardSettings.get_raw()
) – the card to add
- list_cards()#
Lists the cards for the worksheet.
- Returns:
a list of card handles
- Return type:
list of
DSSStatisticsCardSettings
- get_raw()#
Gets a reference to the raw representation of the worksheet settings.
- Returns:
the worksheet settings
- Return type:
dict
- set_sampling_settings(selection)#
Sets the worksheet sampling settings.
- Parameters:
selection (
DSSDatasetSelectionBuilder
or dict obtained fromget_raw_sampling_settings()
) – the sampling settings
- get_raw_sampling_settings()#
Gets a reference to the raw representation of the worksheet sampling settings.
- Returns:
the sampling settings
- Return type:
dict
- save()#
Saves the settings of the worksheet.
- class dataikuapi.dss.statistics.DSSStatisticsCardSettings(client, card_definition)#
A handle to interact with the card settings.
- get_raw()#
Gets a reference to the raw representation of the card settings.
- Returns:
the card settings
- Return type:
dict
- compile()#
Gets the computation used to compute the card result.
- Returns:
the computation settings
- Return type:
- class dataikuapi.dss.statistics.DSSStatisticsCardResult(card_result)#
A handle to interact with the computed result of a
DSSStatisticsCardSettings
.- get_raw()#
Gets a reference to the raw representation of the card result.
- Returns:
the card result
- Return type:
dict
- class dataikuapi.dss.statistics.DSSStatisticsComputationSettings(computation_definition)#
A handle to interact with the computation settings.
- get_raw()#
Gets a reference to the raw representation of the computation settings.
- Returns:
the computation settings
- Return type:
dict
- class dataikuapi.dss.statistics.DSSStatisticsComputationResult(computation_result)#
A handle to interact with the computed result of a
DSSStatisticsComputationSettings
.- get_raw()#
Gets a reference to the raw representation of the computation result.
- Returns:
the computation result
- Return type:
dict