Class: Google::Apis::BigqueryV2::Table

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) ⇒ Table

Returns a new instance of Table.



9606
9607
9608
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9606

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

Instance Attribute Details

#biglake_configurationGoogle::Apis::BigqueryV2::BigLakeConfiguration

Configuration for BigLake managed tables. Corresponds to the JSON property biglakeConfiguration



9285
9286
9287
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9285

def biglake_configuration
  @biglake_configuration
end

#clone_definitionGoogle::Apis::BigqueryV2::CloneDefinition

Information about base table and clone time of a table clone. Corresponds to the JSON property cloneDefinition



9290
9291
9292
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9290

def clone_definition
  @clone_definition
end

#clusteringGoogle::Apis::BigqueryV2::Clustering

Configures table clustering. Corresponds to the JSON property clustering



9295
9296
9297
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9295

def clustering
  @clustering
end

#creation_timeFixnum

Output only. The time when this table was created, in milliseconds since the epoch. Corresponds to the JSON property creationTime

Returns:

  • (Fixnum)


9301
9302
9303
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9301

def creation_time
  @creation_time
end

#default_collationString

Optional. Defines the default collation specification of new STRING fields in the table. During table creation or update, if a STRING field is added to this table without explicit collation specified, then the table inherits the table default collation. A change to this field affects only fields added afterwards, and does not alter the existing fields. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior. Corresponds to the JSON property defaultCollation

Returns:

  • (String)


9312
9313
9314
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9312

def default_collation
  @default_collation
end

#default_rounding_modeString

Optional. Defines the default rounding mode specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. During table creation or update, if a decimal field is added to this table without an explicit rounding mode specified, then the field inherits the table default rounding mode. Changing this field doesn't affect existing fields. Corresponds to the JSON property defaultRoundingMode

Returns:

  • (String)


9321
9322
9323
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9321

def default_rounding_mode
  @default_rounding_mode
end

#descriptionString

Optional. A user-friendly description of this table. Corresponds to the JSON property description

Returns:

  • (String)


9326
9327
9328
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9326

def description
  @description
end

#encryption_configurationGoogle::Apis::BigqueryV2::EncryptionConfiguration

Configuration for Cloud KMS encryption settings. Corresponds to the JSON property encryptionConfiguration



9331
9332
9333
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9331

def encryption_configuration
  @encryption_configuration
end

#etagString

Output only. A hash of this resource. Corresponds to the JSON property etag

Returns:

  • (String)


9336
9337
9338
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9336

def etag
  @etag
end

#expiration_timeFixnum

Optional. The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created tables. Corresponds to the JSON property expirationTime

Returns:

  • (Fixnum)


9345
9346
9347
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9345

def expiration_time
  @expiration_time
end

#external_catalog_table_optionsGoogle::Apis::BigqueryV2::ExternalCatalogTableOptions

Metadata about open source compatible table. The fields contained in these options correspond to Hive metastore's table-level properties. Corresponds to the JSON property externalCatalogTableOptions



9351
9352
9353
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9351

def external_catalog_table_options
  @external_catalog_table_options
end

#external_data_configurationGoogle::Apis::BigqueryV2::ExternalDataConfiguration

Optional. Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table. Corresponds to the JSON property externalDataConfiguration



9358
9359
9360
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9358

def external_data_configuration
  @external_data_configuration
end

#friendly_nameString

Optional. A descriptive name for this table. Corresponds to the JSON property friendlyName

Returns:

  • (String)


9363
9364
9365
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9363

def friendly_name
  @friendly_name
end

#idString

Output only. An opaque ID uniquely identifying the table. Corresponds to the JSON property id

Returns:

  • (String)


9368
9369
9370
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9368

def id
  @id
end

#kindString

The type of resource ID. Corresponds to the JSON property kind

Returns:

  • (String)


9373
9374
9375
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9373

def kind
  @kind
end

#labelsHash<String,String>

The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


9382
9383
9384
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9382

def labels
  @labels
end

#last_modified_timeFixnum

Output only. The time when this table was last modified, in milliseconds since the epoch. Corresponds to the JSON property lastModifiedTime

Returns:

  • (Fixnum)


9388
9389
9390
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9388

def last_modified_time
  @last_modified_time
end

#locationString

Output only. The geographic location where the table resides. This value is inherited from the dataset. Corresponds to the JSON property location

Returns:

  • (String)


9394
9395
9396
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9394

def location
  @location
end

#managed_table_typeString

Optional. If set, overrides the default managed table type configured in the dataset. Corresponds to the JSON property managedTableType

Returns:

  • (String)


9400
9401
9402
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9400

def managed_table_type
  @managed_table_type
end

#materialized_viewGoogle::Apis::BigqueryV2::MaterializedViewDefinition

Definition and configuration of a materialized view. Corresponds to the JSON property materializedView



9405
9406
9407
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9405

def materialized_view
  @materialized_view
end

#materialized_view_statusGoogle::Apis::BigqueryV2::MaterializedViewStatus

Status of a materialized view. The last refresh timestamp status is omitted here, but is present in the MaterializedViewDefinition message. Corresponds to the JSON property materializedViewStatus



9411
9412
9413
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9411

def materialized_view_status
  @materialized_view_status
end

#max_stalenessString

Optional. The maximum staleness of data that could be returned when the table ( or stale MV) is queried. Staleness encoded as a string encoding of sql IntervalValue type. Corresponds to the JSON property maxStaleness

Returns:

  • (String)


9418
9419
9420
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9418

def max_staleness
  @max_staleness
end

#modelGoogle::Apis::BigqueryV2::ModelDefinition

Deprecated. Corresponds to the JSON property model



9423
9424
9425
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9423

def model
  @model
end

#num_active_logical_bytesFixnum

Output only. Number of logical bytes that are less than 90 days old. Corresponds to the JSON property numActiveLogicalBytes

Returns:

  • (Fixnum)


9428
9429
9430
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9428

def num_active_logical_bytes
  @num_active_logical_bytes
end

#num_active_physical_bytesFixnum

Output only. Number of physical bytes less than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes. Corresponds to the JSON property numActivePhysicalBytes

Returns:

  • (Fixnum)


9434
9435
9436
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9434

def num_active_physical_bytes
  @num_active_physical_bytes
end

#num_bytesFixnum

Output only. The size of this table in logical bytes, excluding any data in the streaming buffer. Corresponds to the JSON property numBytes

Returns:

  • (Fixnum)


9440
9441
9442
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9440

def num_bytes
  @num_bytes
end

#num_current_physical_bytesFixnum

Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes. Corresponds to the JSON property numCurrentPhysicalBytes

Returns:

  • (Fixnum)


9447
9448
9449
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9447

def num_current_physical_bytes
  @num_current_physical_bytes
end

#num_long_term_bytesFixnum

Output only. The number of logical bytes in the table that are considered " long-term storage". Corresponds to the JSON property numLongTermBytes

Returns:

  • (Fixnum)


9453
9454
9455
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9453

def num_long_term_bytes
  @num_long_term_bytes
end

#num_long_term_logical_bytesFixnum

Output only. Number of logical bytes that are more than 90 days old. Corresponds to the JSON property numLongTermLogicalBytes

Returns:

  • (Fixnum)


9458
9459
9460
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9458

def num_long_term_logical_bytes
  @num_long_term_logical_bytes
end

#num_long_term_physical_bytesFixnum

Output only. Number of physical bytes more than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes. Corresponds to the JSON property numLongTermPhysicalBytes

Returns:

  • (Fixnum)


9464
9465
9466
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9464

def num_long_term_physical_bytes
  @num_long_term_physical_bytes
end

#num_partitionsFixnum

Output only. The number of partitions present in the table or materialized view. This data is not kept in real time, and might be delayed by a few seconds to a few minutes. Corresponds to the JSON property numPartitions

Returns:

  • (Fixnum)


9471
9472
9473
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9471

def num_partitions
  @num_partitions
end

#num_physical_bytesFixnum

Output only. The physical size of this table in bytes. This includes storage used for time travel. Corresponds to the JSON property numPhysicalBytes

Returns:

  • (Fixnum)


9477
9478
9479
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9477

def num_physical_bytes
  @num_physical_bytes
end

#num_rowsFixnum

Output only. The number of rows of data in this table, excluding any data in the streaming buffer. Corresponds to the JSON property numRows

Returns:

  • (Fixnum)


9483
9484
9485
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9483

def num_rows
  @num_rows
end

#num_time_travel_physical_bytesFixnum

Output only. Number of physical bytes used by time travel storage (deleted or changed data). This data is not kept in real time, and might be delayed by a few seconds to a few minutes. Corresponds to the JSON property numTimeTravelPhysicalBytes

Returns:

  • (Fixnum)


9490
9491
9492
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9490

def num_time_travel_physical_bytes
  @num_time_travel_physical_bytes
end

#num_total_logical_bytesFixnum

Output only. Total number of logical bytes in the table or materialized view. Corresponds to the JSON property numTotalLogicalBytes

Returns:

  • (Fixnum)


9495
9496
9497
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9495

def num_total_logical_bytes
  @num_total_logical_bytes
end

#num_total_physical_bytesFixnum

Output only. The physical size of this table in bytes. This also includes storage used for time travel. This data is not kept in real time, and might be delayed by a few seconds to a few minutes. Corresponds to the JSON property numTotalPhysicalBytes

Returns:

  • (Fixnum)


9502
9503
9504
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9502

def num_total_physical_bytes
  @num_total_physical_bytes
end

#partition_definitionGoogle::Apis::BigqueryV2::PartitioningDefinition

The partitioning information, which includes managed table, external table and metastore partitioned table partition information. Corresponds to the JSON property partitionDefinition



9508
9509
9510
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9508

def partition_definition
  @partition_definition
end

#range_partitioningGoogle::Apis::BigqueryV2::RangePartitioning

If specified, configures range partitioning for this table. Corresponds to the JSON property rangePartitioning



9513
9514
9515
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9513

def range_partitioning
  @range_partitioning
end

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

Optional. Output only. Table references of all replicas currently active on the table. Corresponds to the JSON property replicas



9519
9520
9521
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9519

def replicas
  @replicas
end

#require_partition_filterBoolean Also known as: require_partition_filter?

Optional. If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Corresponds to the JSON property requirePartitionFilter

Returns:

  • (Boolean)


9525
9526
9527
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9525

def require_partition_filter
  @require_partition_filter
end

#resource_tagsHash<String,String>

[Optional] The tags associated with this table. Tag keys are globally unique. See additional information on tags. An object containing a list of "key": value pairs. The key is the namespaced friendly name of the tag key, e.g. "12345/ environment" where 12345 is parent id. The value is the friendly short name of the tag value, e.g. "production". Corresponds to the JSON property resourceTags

Returns:

  • (Hash<String,String>)


9536
9537
9538
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9536

def resource_tags
  @resource_tags
end

#restrictionsGoogle::Apis::BigqueryV2::RestrictionConfig

Optional. Output only. Restriction config for table. If set, restrict certain accesses on the table based on the config. See Data egress for more details. Corresponds to the JSON property restrictions



9544
9545
9546
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9544

def restrictions
  @restrictions
end

#schemaGoogle::Apis::BigqueryV2::TableSchema

Schema of a table Corresponds to the JSON property schema



9549
9550
9551
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9549

def schema
  @schema
end

Output only. A URL that can be used to access this resource again. Corresponds to the JSON property selfLink

Returns:

  • (String)


9554
9555
9556
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9554

def self_link
  @self_link
end

#snapshot_definitionGoogle::Apis::BigqueryV2::SnapshotDefinition

Information about base table and snapshot time of the snapshot. Corresponds to the JSON property snapshotDefinition



9559
9560
9561
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9559

def snapshot_definition
  @snapshot_definition
end

#streaming_bufferGoogle::Apis::BigqueryV2::Streamingbuffer

Output only. Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer. Corresponds to the JSON property streamingBuffer



9566
9567
9568
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9566

def streaming_buffer
  @streaming_buffer
end

#table_constraintsGoogle::Apis::BigqueryV2::TableConstraints

The TableConstraints defines the primary key and foreign key. Corresponds to the JSON property tableConstraints



9571
9572
9573
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9571

def table_constraints
  @table_constraints
end

#table_referenceGoogle::Apis::BigqueryV2::TableReference

Required. Reference describing the ID of this table. Corresponds to the JSON property tableReference



9576
9577
9578
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9576

def table_reference
  @table_reference
end

#table_replication_infoGoogle::Apis::BigqueryV2::TableReplicationInfo

Replication info of a table created using AS REPLICA DDL like: CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv Corresponds to the JSON property tableReplicationInfo



9582
9583
9584
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9582

def table_replication_info
  @table_replication_info
end

#time_partitioningGoogle::Apis::BigqueryV2::TimePartitioning

If specified, configures time-based partitioning for this table. Corresponds to the JSON property timePartitioning



9587
9588
9589
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9587

def time_partitioning
  @time_partitioning
end

#typeString

Output only. Describes the table type. The following values are supported: * TABLE: A normal BigQuery table. * VIEW: A virtual table defined by a SQL query. * EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. * MATERIALIZED_VIEW: A precomputed view defined by a SQL query. * SNAPSHOT: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on table snapshots. The default value is TABLE. Corresponds to the JSON property type

Returns:

  • (String)


9599
9600
9601
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9599

def type
  @type
end

#viewGoogle::Apis::BigqueryV2::ViewDefinition

Describes the definition of a logical view. Corresponds to the JSON property view



9604
9605
9606
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9604

def view
  @view
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9611

def update!(**args)
  @biglake_configuration = args[:biglake_configuration] if args.key?(:biglake_configuration)
  @clone_definition = args[:clone_definition] if args.key?(:clone_definition)
  @clustering = args[:clustering] if args.key?(:clustering)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @default_collation = args[:default_collation] if args.key?(:default_collation)
  @default_rounding_mode = args[:default_rounding_mode] if args.key?(:default_rounding_mode)
  @description = args[:description] if args.key?(:description)
  @encryption_configuration = args[:encryption_configuration] if args.key?(:encryption_configuration)
  @etag = args[:etag] if args.key?(:etag)
  @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
  @external_catalog_table_options = args[:external_catalog_table_options] if args.key?(:external_catalog_table_options)
  @external_data_configuration = args[:external_data_configuration] if args.key?(:external_data_configuration)
  @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @labels = args[:labels] if args.key?(:labels)
  @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time)
  @location = args[:location] if args.key?(:location)
  @managed_table_type = args[:managed_table_type] if args.key?(:managed_table_type)
  @materialized_view = args[:materialized_view] if args.key?(:materialized_view)
  @materialized_view_status = args[:materialized_view_status] if args.key?(:materialized_view_status)
  @max_staleness = args[:max_staleness] if args.key?(:max_staleness)
  @model = args[:model] if args.key?(:model)
  @num_active_logical_bytes = args[:num_active_logical_bytes] if args.key?(:num_active_logical_bytes)
  @num_active_physical_bytes = args[:num_active_physical_bytes] if args.key?(:num_active_physical_bytes)
  @num_bytes = args[:num_bytes] if args.key?(:num_bytes)
  @num_current_physical_bytes = args[:num_current_physical_bytes] if args.key?(:num_current_physical_bytes)
  @num_long_term_bytes = args[:num_long_term_bytes] if args.key?(:num_long_term_bytes)
  @num_long_term_logical_bytes = args[:num_long_term_logical_bytes] if args.key?(:num_long_term_logical_bytes)
  @num_long_term_physical_bytes = args[:num_long_term_physical_bytes] if args.key?(:num_long_term_physical_bytes)
  @num_partitions = args[:num_partitions] if args.key?(:num_partitions)
  @num_physical_bytes = args[:num_physical_bytes] if args.key?(:num_physical_bytes)
  @num_rows = args[:num_rows] if args.key?(:num_rows)
  @num_time_travel_physical_bytes = args[:num_time_travel_physical_bytes] if args.key?(:num_time_travel_physical_bytes)
  @num_total_logical_bytes = args[:num_total_logical_bytes] if args.key?(:num_total_logical_bytes)
  @num_total_physical_bytes = args[:num_total_physical_bytes] if args.key?(:num_total_physical_bytes)
  @partition_definition = args[:partition_definition] if args.key?(:partition_definition)
  @range_partitioning = args[:range_partitioning] if args.key?(:range_partitioning)
  @replicas = args[:replicas] if args.key?(:replicas)
  @require_partition_filter = args[:require_partition_filter] if args.key?(:require_partition_filter)
  @resource_tags = args[:resource_tags] if args.key?(:resource_tags)
  @restrictions = args[:restrictions] if args.key?(:restrictions)
  @schema = args[:schema] if args.key?(:schema)
  @self_link = args[:self_link] if args.key?(:self_link)
  @snapshot_definition = args[:snapshot_definition] if args.key?(:snapshot_definition)
  @streaming_buffer = args[:streaming_buffer] if args.key?(:streaming_buffer)
  @table_constraints = args[:table_constraints] if args.key?(:table_constraints)
  @table_reference = args[:table_reference] if args.key?(:table_reference)
  @table_replication_info = args[:table_replication_info] if args.key?(:table_replication_info)
  @time_partitioning = args[:time_partitioning] if args.key?(:time_partitioning)
  @type = args[:type] if args.key?(:type)
  @view = args[:view] if args.key?(:view)
end