Class: Google::Apis::BigqueryV2::JobStatistics2

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

Overview

Statistics for a query job.

Defined Under Namespace

Classes: ReservationUsage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JobStatistics2

Returns a new instance of JobStatistics2.



6686
6687
6688
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6686

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

Instance Attribute Details

#bi_engine_statisticsGoogle::Apis::BigqueryV2::BiEngineStatistics

Statistics for a BI Engine specific query. Populated as part of JobStatistics2 Corresponds to the JSON property biEngineStatistics



6329
6330
6331
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6329

def bi_engine_statistics
  @bi_engine_statistics
end

#billing_tierFixnum

Output only. Billing tier for the job. This is a BigQuery-specific concept which is not related to the Google Cloud notion of "free tier". The value here is a measure of the query's resource consumption relative to the amount of data scanned. For on-demand queries, the limit is 100, and all queries within this limit are billed at the standard on-demand rates. On-demand queries that exceed this limit will fail with a billingTierLimitExceeded error. Corresponds to the JSON property billingTier

Returns:

  • (Fixnum)


6339
6340
6341
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6339

def billing_tier
  @billing_tier
end

#cache_hitBoolean Also known as: cache_hit?

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

Returns:

  • (Boolean)


6344
6345
6346
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6344

def cache_hit
  @cache_hit
end

#dcl_target_datasetGoogle::Apis::BigqueryV2::DatasetReference

Identifier for a dataset. Corresponds to the JSON property dclTargetDataset



6350
6351
6352
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6350

def dcl_target_dataset
  @dcl_target_dataset
end

#dcl_target_tableGoogle::Apis::BigqueryV2::TableReference

Output only. Referenced table for DCL statement. Corresponds to the JSON property dclTargetTable



6355
6356
6357
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6355

def dcl_target_table
  @dcl_target_table
end

#dcl_target_viewGoogle::Apis::BigqueryV2::TableReference

Output only. Referenced view for DCL statement. Corresponds to the JSON property dclTargetView



6360
6361
6362
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6360

def dcl_target_view
  @dcl_target_view
end

#ddl_affected_row_access_policy_countFixnum

Output only. The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries. Corresponds to the JSON property ddlAffectedRowAccessPolicyCount

Returns:

  • (Fixnum)


6366
6367
6368
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6366

def ddl_affected_row_access_policy_count
  @ddl_affected_row_access_policy_count
end

#ddl_destination_tableGoogle::Apis::BigqueryV2::TableReference

Output only. The table after rename. Present only for ALTER TABLE RENAME TO query. Corresponds to the JSON property ddlDestinationTable



6372
6373
6374
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6372

def ddl_destination_table
  @ddl_destination_table
end

#ddl_operation_performedString

Output only. The DDL operation performed, possibly dependent on the pre- existence of the DDL target. Corresponds to the JSON property ddlOperationPerformed

Returns:

  • (String)


6378
6379
6380
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6378

def ddl_operation_performed
  @ddl_operation_performed
end

#ddl_target_datasetGoogle::Apis::BigqueryV2::DatasetReference

Identifier for a dataset. Corresponds to the JSON property ddlTargetDataset



6383
6384
6385
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6383

def ddl_target_dataset
  @ddl_target_dataset
end

#ddl_target_routineGoogle::Apis::BigqueryV2::RoutineReference

Id path of a routine. Corresponds to the JSON property ddlTargetRoutine



6388
6389
6390
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6388

def ddl_target_routine
  @ddl_target_routine
end

#ddl_target_row_access_policyGoogle::Apis::BigqueryV2::RowAccessPolicyReference

Id path of a row access policy. Corresponds to the JSON property ddlTargetRowAccessPolicy



6393
6394
6395
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6393

def ddl_target_row_access_policy
  @ddl_target_row_access_policy
end

#ddl_target_tableGoogle::Apis::BigqueryV2::TableReference

Output only. The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. Corresponds to the JSON property ddlTargetTable



6399
6400
6401
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6399

def ddl_target_table
  @ddl_target_table
end

#dml_statsGoogle::Apis::BigqueryV2::DmlStatistics

Detailed statistics for DML statements Corresponds to the JSON property dmlStats



6404
6405
6406
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6404

def dml_stats
  @dml_stats
end

#estimated_bytes_processedFixnum

Output only. The original estimate of bytes processed for the job. Corresponds to the JSON property estimatedBytesProcessed

Returns:

  • (Fixnum)


6409
6410
6411
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6409

def estimated_bytes_processed
  @estimated_bytes_processed
end

#export_data_statisticsGoogle::Apis::BigqueryV2::ExportDataStatistics

Statistics for the EXPORT DATA statement as part of Query Job. EXTRACT JOB statistics are populated in JobStatistics4. Corresponds to the JSON property exportDataStatistics



6415
6416
6417
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6415

def export_data_statistics
  @export_data_statistics
end

#external_service_costsArray<Google::Apis::BigqueryV2::ExternalServiceCost>

Output only. Job cost breakdown as bigquery internal cost and external service costs. Corresponds to the JSON property externalServiceCosts



6421
6422
6423
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6421

def external_service_costs
  @external_service_costs
end

#gen_ai_statsGoogle::Apis::BigqueryV2::GenAiStats

GenAi stats for the query job. Corresponds to the JSON property genAiStats



6426
6427
6428
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6426

def gen_ai_stats
  @gen_ai_stats
end

#incremental_result_statsGoogle::Apis::BigqueryV2::IncrementalResultStats

Statistics related to Incremental Query Results. Populated as part of JobStatistics2. This feature is not yet available. Corresponds to the JSON property incrementalResultStats



6432
6433
6434
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6432

def incremental_result_stats
  @incremental_result_stats
end

#load_query_statisticsGoogle::Apis::BigqueryV2::LoadQueryStatistics

Statistics for a LOAD query. Corresponds to the JSON property loadQueryStatistics



6437
6438
6439
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6437

def load_query_statistics
  @load_query_statistics
end

#materialized_view_statisticsGoogle::Apis::BigqueryV2::MaterializedViewStatistics

Statistics of materialized views considered in a query job. Corresponds to the JSON property materializedViewStatistics



6442
6443
6444
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6442

def materialized_view_statistics
  @materialized_view_statistics
end

#metadata_cache_statisticsGoogle::Apis::BigqueryV2::MetadataCacheStatistics

Statistics for metadata caching in queried tables. Corresponds to the JSON property metadataCacheStatistics



6447
6448
6449
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6447

def 
  @metadata_cache_statistics
end

#ml_statisticsGoogle::Apis::BigqueryV2::MlStatistics

Job statistics specific to a BigQuery ML training job. Corresponds to the JSON property mlStatistics



6452
6453
6454
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6452

def ml_statistics
  @ml_statistics
end

#model_trainingGoogle::Apis::BigqueryV2::BigQueryModelTraining

Deprecated. Corresponds to the JSON property modelTraining



6457
6458
6459
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6457

def model_training
  @model_training
end

#model_training_current_iterationFixnum

Deprecated. Corresponds to the JSON property modelTrainingCurrentIteration

Returns:

  • (Fixnum)


6462
6463
6464
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6462

def model_training_current_iteration
  @model_training_current_iteration
end

#model_training_expected_total_iterationFixnum

Deprecated. Corresponds to the JSON property modelTrainingExpectedTotalIteration

Returns:

  • (Fixnum)


6467
6468
6469
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6467

def model_training_expected_total_iteration
  @model_training_expected_total_iteration
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)


6473
6474
6475
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6473

def num_dml_affected_rows
  @num_dml_affected_rows
end

#performance_insightsGoogle::Apis::BigqueryV2::PerformanceInsights

Performance insights for the job. Corresponds to the JSON property performanceInsights



6478
6479
6480
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6478

def performance_insights
  @performance_insights
end

#query_infoGoogle::Apis::BigqueryV2::QueryInfo

Query optimization information for a QUERY job. Corresponds to the JSON property queryInfo



6483
6484
6485
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6483

def query_info
  @query_info
end

#query_planArray<Google::Apis::BigqueryV2::ExplainQueryStage>

Output only. Describes execution plan for the query. Corresponds to the JSON property queryPlan



6488
6489
6490
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6488

def query_plan
  @query_plan
end

#referenced_property_graphsArray<Google::Apis::BigqueryV2::PropertyGraphReference>

Output only. Referenced property graphs for the job. Queries that reference more than 50 property graphs will not have a complete list. Corresponds to the JSON property referencedPropertyGraphs



6494
6495
6496
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6494

def referenced_property_graphs
  @referenced_property_graphs
end

#referenced_routinesArray<Google::Apis::BigqueryV2::RoutineReference>

Output only. Referenced routines for the job. Corresponds to the JSON property referencedRoutines



6499
6500
6501
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6499

def referenced_routines
  @referenced_routines
end

#referenced_tablesArray<Google::Apis::BigqueryV2::TableReference>

Output only. Referenced tables for the job. Corresponds to the JSON property referencedTables



6504
6505
6506
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6504

def referenced_tables
  @referenced_tables
end

#reservation_usageArray<Google::Apis::BigqueryV2::JobStatistics2::ReservationUsage>

Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated. Corresponds to the JSON property reservationUsage



6510
6511
6512
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6510

def reservation_usage
  @reservation_usage
end

#schemaGoogle::Apis::BigqueryV2::TableSchema

Schema of a table Corresponds to the JSON property schema



6515
6516
6517
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6515

def schema
  @schema
end

#search_statisticsGoogle::Apis::BigqueryV2::SearchStatistics

Statistics for a search query. Populated as part of JobStatistics2. Corresponds to the JSON property searchStatistics



6520
6521
6522
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6520

def search_statistics
  @search_statistics
end

#spark_statisticsGoogle::Apis::BigqueryV2::SparkStatistics

Statistics for a BigSpark query. Populated as part of JobStatistics2 Corresponds to the JSON property sparkStatistics



6525
6526
6527
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6525

def spark_statistics
  @spark_statistics
end

#statement_typeString

Output only. The type of query statement, if valid. Possible values: * SELECT : SELECT statement. * ASSERT: ASSERT statement. * INSERT: INSERT statement. * UPDATE: UPDATE statement. * DELETE: DELETE statement. * MERGE: MERGE statement. * CREATE_TABLE: CREATE TABLE statement, without AS SELECT. * CREATE_TABLE_AS_SELECT: CREATE TABLE AS SELECT statement. * CREATE_VIEW: CREATE VIEW statement. * CREATE_MODEL: CREATE MODEL statement. * CREATE_MATERIALIZED_VIEW: CREATE MATERIALIZED VIEW statement. * CREATE_FUNCTION: CREATE FUNCTION statement. * CREATE_TABLE_FUNCTION: CREATE TABLE FUNCTION statement. * CREATE_PROCEDURE: CREATE PROCEDURE statement. * CREATE_ROW_ACCESS_POLICY: CREATE ROW ACCESS POLICY statement. * CREATE_SCHEMA: CREATE SCHEMA statement. * CREATE_SNAPSHOT_TABLE: CREATE SNAPSHOT TABLE statement. * CREATE_SEARCH_INDEX: CREATE SEARCH INDEX statement. * DROP_TABLE: DROP TABLE statement. * DROP_EXTERNAL_TABLE: DROP EXTERNAL TABLE statement. * DROP_VIEW: DROP VIEW statement. * DROP_MODEL: DROP MODEL statement. * DROP_MATERIALIZED_VIEW: DROP MATERIALIZED VIEW statement. * DROP_FUNCTION : DROP FUNCTION statement. * DROP_TABLE_FUNCTION : DROP TABLE FUNCTION statement. * DROP_PROCEDURE: DROP PROCEDURE statement. * DROP_SEARCH_INDEX: DROP SEARCH INDEX statement. * DROP_SCHEMA: DROP SCHEMA statement. * DROP_SNAPSHOT_TABLE: DROP SNAPSHOT TABLE statement.

Returns:

  • (String)


6618
6619
6620
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6618

def statement_type
  @statement_type
end

#timelineArray<Google::Apis::BigqueryV2::QueryTimelineSample>

Output only. Describes a timeline of job execution. Corresponds to the JSON property timeline



6623
6624
6625
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6623

def timeline
  @timeline
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)


6631
6632
6633
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6631

def total_bytes_billed
  @total_bytes_billed
end

#total_bytes_processedFixnum

Output only. Total bytes processed for the job. Corresponds to the JSON property totalBytesProcessed

Returns:

  • (Fixnum)


6636
6637
6638
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6636

def total_bytes_processed
  @total_bytes_processed
end

#total_bytes_processed_accuracyString

Output only. For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estimate is upper bound of what the query would cost. Corresponds to the JSON property totalBytesProcessedAccuracy

Returns:

  • (String)


6645
6646
6647
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6645

def total_bytes_processed_accuracy
  @total_bytes_processed_accuracy
end

#total_partitions_processedFixnum

Output only. Total number of partitions processed from all partitioned tables referenced in the job. Corresponds to the JSON property totalPartitionsProcessed

Returns:

  • (Fixnum)


6651
6652
6653
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6651

def total_partitions_processed
  @total_partitions_processed
end

#total_services_sku_slot_msFixnum

Output only. Total slot milliseconds for the job that ran on external services and billed on the services SKU. This field is only populated for jobs that have external service costs, and is the total of the usage for costs whose billing method is "SERVICES_SKU". Corresponds to the JSON property totalServicesSkuSlotMs

Returns:

  • (Fixnum)


6659
6660
6661
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6659

def total_services_sku_slot_ms
  @total_services_sku_slot_ms
end

#total_slot_msFixnum

Output only. Slot-milliseconds for the job. Corresponds to the JSON property totalSlotMs

Returns:

  • (Fixnum)


6664
6665
6666
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6664

def total_slot_ms
  @total_slot_ms
end

#transferred_bytesFixnum

Output only. Total bytes transferred for BigQuery Omni queries from the remote cloud back to Google Cloud. This tracks data movement over Google-managed connections (like query results). It doesn't include input data read from the external data lake (for example, S3) because that data stays within the remote cloud. Corresponds to the JSON property transferredBytes

Returns:

  • (Fixnum)


6673
6674
6675
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6673

def transferred_bytes
  @transferred_bytes
end

#undeclared_query_parametersArray<Google::Apis::BigqueryV2::QueryParameter>

Output only. GoogleSQL only: list of undeclared query parameters detected during a dry run validation. Corresponds to the JSON property undeclaredQueryParameters



6679
6680
6681
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6679

def undeclared_query_parameters
  @undeclared_query_parameters
end

#vector_search_statisticsGoogle::Apis::BigqueryV2::VectorSearchStatistics

Statistics for a vector search query. Populated as part of JobStatistics2. Corresponds to the JSON property vectorSearchStatistics



6684
6685
6686
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6684

def vector_search_statistics
  @vector_search_statistics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6691

def update!(**args)
  @bi_engine_statistics = args[:bi_engine_statistics] if args.key?(:bi_engine_statistics)
  @billing_tier = args[:billing_tier] if args.key?(:billing_tier)
  @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
  @dcl_target_dataset = args[:dcl_target_dataset] if args.key?(:dcl_target_dataset)
  @dcl_target_table = args[:dcl_target_table] if args.key?(:dcl_target_table)
  @dcl_target_view = args[:dcl_target_view] if args.key?(:dcl_target_view)
  @ddl_affected_row_access_policy_count = args[:ddl_affected_row_access_policy_count] if args.key?(:ddl_affected_row_access_policy_count)
  @ddl_destination_table = args[:ddl_destination_table] if args.key?(:ddl_destination_table)
  @ddl_operation_performed = args[:ddl_operation_performed] if args.key?(:ddl_operation_performed)
  @ddl_target_dataset = args[:ddl_target_dataset] if args.key?(:ddl_target_dataset)
  @ddl_target_routine = args[:ddl_target_routine] if args.key?(:ddl_target_routine)
  @ddl_target_row_access_policy = args[:ddl_target_row_access_policy] if args.key?(:ddl_target_row_access_policy)
  @ddl_target_table = args[:ddl_target_table] if args.key?(:ddl_target_table)
  @dml_stats = args[:dml_stats] if args.key?(:dml_stats)
  @estimated_bytes_processed = args[:estimated_bytes_processed] if args.key?(:estimated_bytes_processed)
  @export_data_statistics = args[:export_data_statistics] if args.key?(:export_data_statistics)
  @external_service_costs = args[:external_service_costs] if args.key?(:external_service_costs)
  @gen_ai_stats = args[:gen_ai_stats] if args.key?(:gen_ai_stats)
  @incremental_result_stats = args[:incremental_result_stats] if args.key?(:incremental_result_stats)
  @load_query_statistics = args[:load_query_statistics] if args.key?(:load_query_statistics)
  @materialized_view_statistics = args[:materialized_view_statistics] if args.key?(:materialized_view_statistics)
  @metadata_cache_statistics = args[:metadata_cache_statistics] if args.key?(:metadata_cache_statistics)
  @ml_statistics = args[:ml_statistics] if args.key?(:ml_statistics)
  @model_training = args[:model_training] if args.key?(:model_training)
  @model_training_current_iteration = args[:model_training_current_iteration] if args.key?(:model_training_current_iteration)
  @model_training_expected_total_iteration = args[:model_training_expected_total_iteration] if args.key?(:model_training_expected_total_iteration)
  @num_dml_affected_rows = args[:num_dml_affected_rows] if args.key?(:num_dml_affected_rows)
  @performance_insights = args[:performance_insights] if args.key?(:performance_insights)
  @query_info = args[:query_info] if args.key?(:query_info)
  @query_plan = args[:query_plan] if args.key?(:query_plan)
  @referenced_property_graphs = args[:referenced_property_graphs] if args.key?(:referenced_property_graphs)
  @referenced_routines = args[:referenced_routines] if args.key?(:referenced_routines)
  @referenced_tables = args[:referenced_tables] if args.key?(:referenced_tables)
  @reservation_usage = args[:reservation_usage] if args.key?(:reservation_usage)
  @schema = args[:schema] if args.key?(:schema)
  @search_statistics = args[:search_statistics] if args.key?(:search_statistics)
  @spark_statistics = args[:spark_statistics] if args.key?(:spark_statistics)
  @statement_type = args[:statement_type] if args.key?(:statement_type)
  @timeline = args[:timeline] if args.key?(:timeline)
  @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_bytes_processed_accuracy = args[:total_bytes_processed_accuracy] if args.key?(:total_bytes_processed_accuracy)
  @total_partitions_processed = args[:total_partitions_processed] if args.key?(:total_partitions_processed)
  @total_services_sku_slot_ms = args[:total_services_sku_slot_ms] if args.key?(:total_services_sku_slot_ms)
  @total_slot_ms = args[:total_slot_ms] if args.key?(:total_slot_ms)
  @transferred_bytes = args[:transferred_bytes] if args.key?(:transferred_bytes)
  @undeclared_query_parameters = args[:undeclared_query_parameters] if args.key?(:undeclared_query_parameters)
  @vector_search_statistics = args[:vector_search_statistics] if args.key?(:vector_search_statistics)
end