QueryResult#
- class polars_cloud.QueryResult(result: QueryInfo, status: QueryStatus, query: DirectQuery | None = None)
The result of a Polars Cloud query.
Note
This object should not be instantiated directly by the user.
Attributes:
headThe first n rows of the result.
n_rows_totalTotal rows that are outputted by the result.
total_stagesGet total planned stages of physical plan.
failed_stagesTotal failed stages.
finished_stagesTotal executed stages.
locationLocation where the result is written.
file_typeThe file type where the result is written to.
Methods:
await_profileAwait the query profile if direct mode is enabled.
await_profile_asyncAwait the query profile asynchronously if direct mode is enabled.
stage_statisticsReturn the statistics of a specific stage.
lazyConvert the
QueryResultinto aLazyFrame.- property head: DataFrame | None
The first n rows of the result.
- property total_stages: int
Get total planned stages of physical plan.
- property failed_stages: int
Total failed stages.
- property finished_stages: int
Total executed stages.
This can be more than total stages, as failed stages can be rescheduled.
- property file_type: FileType
The file type where the result is written to.
- await_profile() QueryProfile
Await the query profile if direct mode is enabled.
- async await_profile_async() QueryProfile
Await the query profile asynchronously if direct mode is enabled.
- stage_statistics( ) StageStatistics | None | list[StageStatistics]
Return the statistics of a specific stage.
- Parameters:
- stage_number
if None this will give a list of stages.
- lazy() LazyFrame
Convert the
QueryResultinto aLazyFrame.