for_exec_def
for_exec_def(exec_def: ExecutionDefinition, label_overrides: Optional[LabelOverrides], result_size_dimensions_limits: ResultSizeDimensions, result_size_bytes_limit: Optional[int], page_size: int, on_execution_submitted: Optional[Callable[[Execution], None]], optimized: bool, default=False, grand_totals_position: Literal['pinnedBottom', 'pinnedTop', 'bottom', 'top']) -> tuple[pandas.DataFrame, DataFrameMetadata]
Creates a data frame using an execution definition.
Each dimension may be sliced by multiple labels. The factory will create MultiIndex for the dataframe's row index and the columns.
When the factory’s use_arrow is True the result is fetched via the Arrow IPC
binary endpoint in one shot. In this mode result_size_dimensions_limits,
result_size_bytes_limit, page_size, and optimized are ignored.
Example of label_overrides structure:
.. code-block:: python
{
"labels": {
"local_attribute_id": {
"title": "My new attribute label"
,...
},
"metrics": {
"local_metric_id": {
"title": "My new metric label"
},...
}
}</p>
Parameters
| name | type | description |
|---|---|---|
| exec_def | ExecutionDefinition | Execution definition. |
| label_overrides | Optional[LabelOverrides] | Label overrides for metrics and attributes. |
| result_size_dimensions_limits | ResultSizeDimensions | A tuple containing maximum size of result dimensions. Ignored when use_arrow=True. |
| result_size_bytes_limit | Optional[int] | Maximum size of result in bytes. Ignored when use_arrow=True. |
| page_size | int | Number of records per page. Ignored when use_arrow=True. |
| on_execution_submitted | Optional[Callable[[Execution], None]] | Callback to call when the execution was submitted to the backend. |
| optimized | bool, default=False | Use memory optimized accumulator. Ignored when use_arrow=True. |
| grand_totals_position | Literal['pinnedBottom', 'pinnedTop', 'bottom', 'top'] | Position where grand totals should be placed. "pinnedBottom" and "bottom" append totals, "pinnedTop" and "top" prepend totals. Defaults to "bottom". |
Returns
| type | description |
|---|---|
| tuple[pandas.DataFrame, DataFrameMetadata] | Tuple[pandas.DataFrame, DataFrameMetadata]: Tuple holding DataFrame and DataFrame metadata. |