1.64.1 (latest) 1.64.0 1.63.1 1.62.0 1.61.1 1.60.0 1.59.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.1 1.51.1 1.50.0 1.49.1 1.48.1 1.47.0 1.46.1 1.45.0 1.44.2 1.43.1 1.42.0 1.41.0 1.40.0 1.39.0 1.38.1 Reference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::QueryJob::Stage.

Represents a stage in the execution plan for the query.

## Inherits

- Object

## Example

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new

sql = "SELECT word FROM `bigquery-public-data.samples.shakespeare`"
job = bigquery.query_job sql

job.wait_until_done!

stages = job.query_plan
stages.each do |stage|
  puts stage.name
  stage.steps.each do |step|
    puts step.kind
    puts step.substeps.inspect
  end
end
```

## Methods

### #compute_ratio_avg

    def compute_ratio_avg() -> Float

Relative amount of time the
average shard spent on CPU-bound tasks.
**Returns**

- (Float) --- the current value of compute_ratio_avg

### #compute_ratio_max

    def compute_ratio_max() -> Float

Relative amount of time the
slowest shard spent on CPU-bound tasks.
**Returns**

- (Float) --- the current value of compute_ratio_max

### #id

    def id() -> Integer

Unique ID for the stage within the query
plan.
**Returns**

- (Integer) --- the current value of id

### #name

    def name() -> String

Human-readable name for the stage.
**Returns**

- (String) --- the current value of name

### #read_ratio_avg

    def read_ratio_avg() -> Float

Relative amount of time the
average shard spent reading input.
**Returns**

- (Float) --- the current value of read_ratio_avg

### #read_ratio_max

    def read_ratio_max() -> Float

Relative amount of time the
slowest shard spent reading input.
**Returns**

- (Float) --- the current value of read_ratio_max

### #records_read

    def records_read() -> Integer

Number of records read into the
stage.
**Returns**

- (Integer) --- the current value of records_read

### #records_written

    def records_written() -> Integer

Number of records written by
the stage.
**Returns**

- (Integer) --- the current value of records_written

### #status

    def status()

Returns the value of attribute status.

### #steps

    def steps() -> Array<Step>

List of operations within the stage
in dependency order (approximately chronological).
**Returns**

- (Array\<[Step](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-QueryJob-Step)\>) --- the current value of steps

### #wait_ratio_avg

    def wait_ratio_avg() -> Float

Relative amount of time the
average shard spent waiting to be scheduled.
**Returns**

- (Float) --- the current value of wait_ratio_avg

### #wait_ratio_max

    def wait_ratio_max() -> Float

Relative amount of time the
slowest shard spent waiting to be scheduled.
**Returns**

- (Float) --- the current value of wait_ratio_max

### #write_ratio_avg

    def write_ratio_avg() -> Float

Relative amount of time the
average shard spent on writing output.
**Returns**

- (Float) --- the current value of write_ratio_avg

### #write_ratio_max

    def write_ratio_max() -> Float

Relative amount of time the
slowest shard spent on writing output.
**Returns**

- (Float) --- the current value of write_ratio_max