gooddata_pandas.data_access.compute_and_extract

gooddata_pandas.data_access.compute_and_extract(sdk: GoodDataSdk, workspace_id: str, columns: Dict[str, Union[Attribute, Metric, ObjId, str]], index_by: Optional[Union[Attribute, ObjId, str, Dict[str, Union[Attribute, ObjId, str]]]] = None, filter_by: Optional[Union[Filter, list[gooddata_sdk.compute.model.base.Filter]]] = None) tuple[dict, dict]

Convenience function that computes and extracts data from the execution response.

Args:

sdk (GoodDataSdk): The GoodData SDK instance. workspace_id (str): The workspace ID. columns (ColumnsDef): The columns definition. index_by (Optional[IndexDef]): The index definition, if any. filter_by (Optional[Union[Filter, list[Filter]]]): A filter or a list of filters, if any.

Returns:

tuple: A tuple containing the following dictionaries: - dict: A dictionary with data for each column in columns. - dict: A dictionary with data for constructing index(es) for each index in index_by.

Note: For convenience it is possible to pass just single index. in that case the index dict will contain exactly one key of ‘0’ (just get first value from dict when consuming the result).