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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Table

Returns a new instance of Table.


5767
5768
5769
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5767

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

Instance Attribute Details

#clusteringGoogle::Apis::BigqueryV2::Clustering

[Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. Corresponds to the JSON property clustering


5591
5592
5593
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5591

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)

5597
5598
5599
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5597

def creation_time
  @creation_time
end

#descriptionString

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

Returns:

  • (String)

5602
5603
5604
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5602

def description
  @description
end

#encryption_configurationGoogle::Apis::BigqueryV2::EncryptionConfiguration

Custom encryption configuration (e.g., Cloud KMS keys). Corresponds to the JSON property encryptionConfiguration


5607
5608
5609
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5607

def encryption_configuration
  @encryption_configuration
end

#etagString

[Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change. Corresponds to the JSON property etag

Returns:

  • (String)

5615
5616
5617
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5615

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)

5624
5625
5626
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5624

def expiration_time
  @expiration_time
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


5631
5632
5633
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5631

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)

5636
5637
5638
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5636

def friendly_name
  @friendly_name
end

#idString

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

Returns:

  • (String)

5641
5642
5643
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5641

def id
  @id
end

#kindString

[Output-only] The type of the resource. Corresponds to the JSON property kind

Returns:

  • (String)

5646
5647
5648
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5646

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

5655
5656
5657
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5655

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)

5661
5662
5663
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5661

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)

5667
5668
5669
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5667

def location
  @location
end

#materialized_viewGoogle::Apis::BigqueryV2::MaterializedViewDefinition

[Optional] Materialized view definition. Corresponds to the JSON property materializedView


5672
5673
5674
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5672

def materialized_view
  @materialized_view
end

#modelGoogle::Apis::BigqueryV2::ModelDefinition

[Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run ‘PREDICT’ queries. Corresponds to the JSON property model


5679
5680
5681
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5679

def model
  @model
end

#num_bytesFixnum

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

Returns:

  • (Fixnum)

5685
5686
5687
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5685

def num_bytes
  @num_bytes
end

#num_long_term_bytesFixnum

[Output-only] The number of bytes in the table that are considered “long-term storage”. Corresponds to the JSON property numLongTermBytes

Returns:

  • (Fixnum)

5691
5692
5693
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5691

def num_long_term_bytes
  @num_long_term_bytes
end

#num_physical_bytesFixnum

[Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel. Corresponds to the JSON property numPhysicalBytes

Returns:

  • (Fixnum)

5698
5699
5700
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5698

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)

5704
5705
5706
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5704

def num_rows
  @num_rows
end

#range_partitioningGoogle::Apis::BigqueryV2::RangePartitioning

[TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. Corresponds to the JSON property rangePartitioning


5710
5711
5712
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5710

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

5716
5717
5718
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5716

def require_partition_filter
  @require_partition_filter
end

#schemaGoogle::Apis::BigqueryV2::TableSchema

[Optional] Describes the schema of this table. Corresponds to the JSON property schema


5722
5723
5724
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5722

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)

5727
5728
5729
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5727

def self_link
  @self_link
end

#snapshot_definitionGoogle::Apis::BigqueryV2::SnapshotDefinition

[Output-only] Snapshot definition. Corresponds to the JSON property snapshotDefinition


5732
5733
5734
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5732

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


5739
5740
5741
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5739

def streaming_buffer
  @streaming_buffer
end

#table_referenceGoogle::Apis::BigqueryV2::TableReference

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


5744
5745
5746
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5744

def table_reference
  @table_reference
end

#time_partitioningGoogle::Apis::BigqueryV2::TimePartitioning

Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. Corresponds to the JSON property timePartitioning


5750
5751
5752
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5750

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. [ TrustedTester] SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. Corresponds to the JSON property type

Returns:

  • (String)

5760
5761
5762
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5760

def type
  @type
end

#viewGoogle::Apis::BigqueryV2::ViewDefinition

[Optional] The view definition. Corresponds to the JSON property view


5765
5766
5767
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5765

def view
  @view
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5772

def update!(**args)
  @clustering = args[:clustering] if args.key?(:clustering)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @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_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)
  @materialized_view = args[:materialized_view] if args.key?(:materialized_view)
  @model = args[:model] if args.key?(:model)
  @num_bytes = args[:num_bytes] if args.key?(:num_bytes)
  @num_long_term_bytes = args[:num_long_term_bytes] if args.key?(:num_long_term_bytes)
  @num_physical_bytes = args[:num_physical_bytes] if args.key?(:num_physical_bytes)
  @num_rows = args[:num_rows] if args.key?(:num_rows)
  @range_partitioning = args[:range_partitioning] if args.key?(:range_partitioning)
  @require_partition_filter = args[:require_partition_filter] if args.key?(:require_partition_filter)
  @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_reference = args[:table_reference] if args.key?(:table_reference)
  @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