Class: Google::Apis::BigqueryV2::QueryResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryResponse

Returns a new instance of QueryResponse.



8884
8885
8886
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8884

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#arrow_record_batchGoogle::Apis::BigqueryV2::ArrowRecordBatch

Arrow RecordBatch. This feature is not yet available. Corresponds to the JSON property arrowRecordBatch



8734
8735
8736
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8734

def arrow_record_batch
  @arrow_record_batch
end

#arrow_schemaGoogle::Apis::BigqueryV2::ArrowSchema

Arrow schema as specified in https://arrow.apache.org/docs/python/api/ datatypes.html and serialized to bytes using IPC: https://arrow.apache.org/ docs/format/Columnar.html#serialization-and-interprocess-communication-ipc See code samples on how this message can be deserialized. This feature is not yet available. Corresponds to the JSON property arrowSchema



8743
8744
8745
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8743

def arrow_schema
  @arrow_schema
end

#cache_hitBoolean Also known as: cache_hit?

Whether the query result was fetched from the query cache. Corresponds to the JSON property cacheHit

Returns:

  • (Boolean)


8748
8749
8750
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8748

def cache_hit
  @cache_hit
end

#creation_timeFixnum

Output only. Creation time of this query, in milliseconds since the epoch. This field will be present on all queries. Corresponds to the JSON property creationTime

Returns:

  • (Fixnum)


8755
8756
8757
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8755

def creation_time
  @creation_time
end

#dml_statsGoogle::Apis::BigqueryV2::DmlStatistics

Detailed statistics for DML statements Corresponds to the JSON property dmlStats



8760
8761
8762
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8760

def dml_stats
  @dml_stats
end

#end_timeFixnum

Output only. End time of this query, in milliseconds since the epoch. This field will be present whenever a query job is in the DONE state. Corresponds to the JSON property endTime

Returns:

  • (Fixnum)


8766
8767
8768
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8766

def end_time
  @end_time
end

#errorsArray<Google::Apis::BigqueryV2::ErrorProto>

Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see Error messages. Corresponds to the JSON property errors



8775
8776
8777
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8775

def errors
  @errors
end

#job_completeBoolean Also known as: job_complete?

Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. Corresponds to the JSON property jobComplete

Returns:

  • (Boolean)


8781
8782
8783
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8781

def job_complete
  @job_complete
end

#job_creation_reasonGoogle::Apis::BigqueryV2::JobCreationReason

Reason about why a Job was created from a jobs.query method when used with JOB_CREATION_OPTIONAL Job creation mode. For jobs.insert method calls it will always be REQUESTED. Corresponds to the JSON property jobCreationReason



8791
8792
8793
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8791

def job_creation_reason
  @job_creation_reason
end

#job_referenceGoogle::Apis::BigqueryV2::JobReference

A job reference is a fully qualified identifier for referring to a job. Corresponds to the JSON property jobReference



8796
8797
8798
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8796

def job_reference
  @job_reference
end

#kindString

The resource type. Corresponds to the JSON property kind

Returns:

  • (String)


8801
8802
8803
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8801

def kind
  @kind
end

#locationString

Output only. The geographic location of the query. For more information about BigQuery locations, see: https://cloud.google.com/bigquery/docs/locations Corresponds to the JSON property location

Returns:

  • (String)


8807
8808
8809
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8807

def location
  @location
end

#num_dml_affected_rowsFixnum

Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. Corresponds to the JSON property numDmlAffectedRows

Returns:

  • (Fixnum)


8813
8814
8815
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8813

def num_dml_affected_rows
  @num_dml_affected_rows
end

#page_row_countFixnum

Output only. The number of rows out of total_rows returned in this response. This feature is not yet available. Corresponds to the JSON property pageRowCount

Returns:

  • (Fixnum)


8819
8820
8821
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8819

def page_row_count
  @page_row_count
end

#page_tokenString

A token used for paging results. A non-empty token indicates that additional results are available. To see additional results, query the jobs. getQueryResults method. For more information, see Paging through table data. Corresponds to the JSON property pageToken

Returns:

  • (String)


8828
8829
8830
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8828

def page_token
  @page_token
end

#query_idString

Auto-generated ID for the query. Corresponds to the JSON property queryId

Returns:

  • (String)


8833
8834
8835
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8833

def query_id
  @query_id
end

#rowsArray<Google::Apis::BigqueryV2::TableRow>

An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Corresponds to the JSON property rows



8840
8841
8842
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8840

def rows
  @rows
end

#schemaGoogle::Apis::BigqueryV2::TableSchema

Schema of a table Corresponds to the JSON property schema



8845
8846
8847
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8845

def schema
  @schema
end

#session_infoGoogle::Apis::BigqueryV2::SessionInfo

[Preview] Information related to sessions. Corresponds to the JSON property sessionInfo



8850
8851
8852
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8850

def session_info
  @session_info
end

#start_timeFixnum

Output only. Start time of this query, in milliseconds since the epoch. This field will be present when the query job transitions from the PENDING state to either RUNNING or DONE. Corresponds to the JSON property startTime

Returns:

  • (Fixnum)


8857
8858
8859
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8857

def start_time
  @start_time
end

#total_bytes_billedFixnum

Output only. If the project is configured to use on-demand pricing, then this field contains the total bytes billed for the job. If the project is configured to use flat-rate pricing, then you are not billed for bytes and this field is informational only. Corresponds to the JSON property totalBytesBilled

Returns:

  • (Fixnum)


8865
8866
8867
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8865

def total_bytes_billed
  @total_bytes_billed
end

#total_bytes_processedFixnum

The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. Corresponds to the JSON property totalBytesProcessed

Returns:

  • (Fixnum)


8871
8872
8873
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8871

def total_bytes_processed
  @total_bytes_processed
end

#total_rowsFixnum

The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Corresponds to the JSON property totalRows

Returns:

  • (Fixnum)


8877
8878
8879
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8877

def total_rows
  @total_rows
end

#total_slot_msFixnum

Output only. Number of slot ms the user is actually billed for. Corresponds to the JSON property totalSlotMs

Returns:

  • (Fixnum)


8882
8883
8884
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8882

def total_slot_ms
  @total_slot_ms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8889

def update!(**args)
  @arrow_record_batch = args[:arrow_record_batch] if args.key?(:arrow_record_batch)
  @arrow_schema = args[:arrow_schema] if args.key?(:arrow_schema)
  @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @dml_stats = args[:dml_stats] if args.key?(:dml_stats)
  @end_time = args[:end_time] if args.key?(:end_time)
  @errors = args[:errors] if args.key?(:errors)
  @job_complete = args[:job_complete] if args.key?(:job_complete)
  @job_creation_reason = args[:job_creation_reason] if args.key?(:job_creation_reason)
  @job_reference = args[:job_reference] if args.key?(:job_reference)
  @kind = args[:kind] if args.key?(:kind)
  @location = args[:location] if args.key?(:location)
  @num_dml_affected_rows = args[:num_dml_affected_rows] if args.key?(:num_dml_affected_rows)
  @page_row_count = args[:page_row_count] if args.key?(:page_row_count)
  @page_token = args[:page_token] if args.key?(:page_token)
  @query_id = args[:query_id] if args.key?(:query_id)
  @rows = args[:rows] if args.key?(:rows)
  @schema = args[:schema] if args.key?(:schema)
  @session_info = args[:session_info] if args.key?(:session_info)
  @start_time = args[:start_time] if args.key?(:start_time)
  @total_bytes_billed = args[:total_bytes_billed] if args.key?(:total_bytes_billed)
  @total_bytes_processed = args[:total_bytes_processed] if args.key?(:total_bytes_processed)
  @total_rows = args[:total_rows] if args.key?(:total_rows)
  @total_slot_ms = args[:total_slot_ms] if args.key?(:total_slot_ms)
end