As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

google.cloud.bigquery.job.QueryPlanEntry

class google.cloud.bigquery.job.QueryPlanEntry[source]

QueryPlanEntry represents a single stage of a query execution plan.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#ExplainQueryStage for the underlying API representation within query statistics.

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__()

Initialize self.

from_api_repr(resource)

Factory: construct instance from the JSON repr.

Attributes

completed_parallel_inputs

Number of parallel input segments completed.

compute_ms_avg

Milliseconds the average worker spent on CPU-bound processing.

compute_ms_max

Milliseconds the slowest worker spent on CPU-bound processing.

compute_ratio_avg

Ratio of time the average worker spent on CPU-bound processing, relative to the longest time spent by any worker in any stage of the overall plan.

compute_ratio_max

Ratio of time the slowest worker spent on CPU-bound processing, relative to the longest time spent by any worker in any stage of the overall plan.

end

Datetime when the stage ended.

entry_id

Unique ID for the stage within the plan.

input_stages

Entry IDs for stages that were inputs for this stage.

name

Human-readable name of the stage.

parallel_inputs

Number of parallel input segments within the stage.

read_ms_avg

Milliseconds the average worker spent reading input.

read_ms_max

Milliseconds the slowest worker spent reading input.

read_ratio_avg

Ratio of time the average worker spent reading input, relative to the longest time spent by any worker in any stage of the overall plan.

read_ratio_max

Ratio of time the slowest worker spent reading to be scheduled, relative to the longest time spent by any worker in any stage of the overall plan.

records_read

Number of records read by this stage.

records_written

Number of records written by this stage.

shuffle_output_bytes

Number of bytes written by this stage to intermediate shuffle.

shuffle_output_bytes_spilled

Number of bytes written by this stage to intermediate shuffle and spilled to disk.

start

Datetime when the stage started.

status

status of this stage.

steps

List of step operations performed by each worker in the stage.

wait_ms_avg

Milliseconds the average worker spent waiting to be scheduled.

wait_ms_max

Milliseconds the slowest worker spent waiting to be scheduled.

wait_ratio_avg

Ratio of time the average worker spent waiting to be scheduled, relative to the longest time spent by any worker in any stage of the overall plan.

wait_ratio_max

Ratio of time the slowest worker spent waiting to be scheduled, relative to the longest time spent by any worker in any stage of the overall plan.

write_ms_avg

Milliseconds the average worker spent writing output data.

write_ms_max

Milliseconds the slowest worker spent writing output data.

write_ratio_avg

Ratio of time the average worker spent writing output data, relative to the longest time spent by any worker in any stage of the overall plan.

write_ratio_max

Ratio of time the slowest worker spent writing output data, relative to the longest time spent by any worker in any stage of the overall plan.

property completed_parallel_inputs

Number of parallel input segments completed.

Type

Optional[int]

property compute_ms_avg

Milliseconds the average worker spent on CPU-bound processing.

Type

Optional[int]

property compute_ms_max

Milliseconds the slowest worker spent on CPU-bound processing.

Type

Optional[int]

property compute_ratio_avg

Ratio of time the average worker spent on CPU-bound processing, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property compute_ratio_max

Ratio of time the slowest worker spent on CPU-bound processing, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property end

Datetime when the stage ended.

Type

Optional[Datetime]

property entry_id

Unique ID for the stage within the plan.

Type

Optional[str]

classmethod from_api_repr(resource: dict)google.cloud.bigquery.job.query.QueryPlanEntry[source]

Factory: construct instance from the JSON repr.

Parameters

resource(Dict[str – object]): ExplainQueryStage representation returned from API.

Returns

Query plan entry parsed from resource.

Return type

google.cloud.bigquery.job.QueryPlanEntry

property input_stages

Entry IDs for stages that were inputs for this stage.

Type

List(int)

property name

Human-readable name of the stage.

Type

Optional[str]

property parallel_inputs

Number of parallel input segments within the stage.

Type

Optional[int]

property read_ms_avg

Milliseconds the average worker spent reading input.

Type

Optional[int]

property read_ms_max

Milliseconds the slowest worker spent reading input.

Type

Optional[int]

property read_ratio_avg

Ratio of time the average worker spent reading input, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property read_ratio_max

Ratio of time the slowest worker spent reading to be scheduled, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property records_read

Number of records read by this stage.

Type

Optional[int]

property records_written

Number of records written by this stage.

Type

Optional[int]

property shuffle_output_bytes

Number of bytes written by this stage to intermediate shuffle.

Type

Optional[int]

property shuffle_output_bytes_spilled

Number of bytes written by this stage to intermediate shuffle and spilled to disk.

Type

Optional[int]

property start

Datetime when the stage started.

Type

Optional[Datetime]

property status

status of this stage.

Type

Optional[str]

property steps

List of step operations performed by each worker in the stage.

Type

List(QueryPlanEntryStep)

property wait_ms_avg

Milliseconds the average worker spent waiting to be scheduled.

Type

Optional[int]

property wait_ms_max

Milliseconds the slowest worker spent waiting to be scheduled.

Type

Optional[int]

property wait_ratio_avg

Ratio of time the average worker spent waiting to be scheduled, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property wait_ratio_max

Ratio of time the slowest worker spent waiting to be scheduled, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property write_ms_avg

Milliseconds the average worker spent writing output data.

Type

Optional[int]

property write_ms_max

Milliseconds the slowest worker spent writing output data.

Type

Optional[int]

property write_ratio_avg

Ratio of time the average worker spent writing output data, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]

property write_ratio_max

Ratio of time the slowest worker spent writing output data, relative to the longest time spent by any worker in any stage of the overall plan.

Type

Optional[float]