Class: Google::Apis::BigqueryV2::Table
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::Table
- 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
-
#clone_definition ⇒ Google::Apis::BigqueryV2::CloneDefinition
[Output-only] Clone definition.
-
#clustering ⇒ Google::Apis::BigqueryV2::Clustering
[Beta] Clustering specification for the table.
-
#creation_time ⇒ Fixnum
[Output-only] The time when this table was created, in milliseconds since the epoch.
-
#default_collation ⇒ String
[Output-only] The default collation of the table.
-
#description ⇒ String
[Optional] A user-friendly description of this table.
-
#encryption_configuration ⇒ Google::Apis::BigqueryV2::EncryptionConfiguration
Custom encryption configuration (e.g., Cloud KMS keys).
-
#etag ⇒ String
[Output-only] A hash of the table metadata.
-
#expiration_time ⇒ Fixnum
[Optional] The time when this table expires, in milliseconds since the epoch.
-
#external_data_configuration ⇒ Google::Apis::BigqueryV2::ExternalDataConfiguration
[Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery.
-
#friendly_name ⇒ String
[Optional] A descriptive name for this table.
-
#id ⇒ String
[Output-only] An opaque ID uniquely identifying the table.
-
#kind ⇒ String
[Output-only] The type of the resource.
-
#labels ⇒ Hash<String,String>
The labels associated with this table.
-
#last_modified_time ⇒ Fixnum
[Output-only] The time when this table was last modified, in milliseconds since the epoch.
-
#location ⇒ String
[Output-only] The geographic location where the table resides.
-
#materialized_view ⇒ Google::Apis::BigqueryV2::MaterializedViewDefinition
[Optional] Materialized view definition.
-
#model ⇒ Google::Apis::BigqueryV2::ModelDefinition
[Output-only, Beta] Present iff this table represents a ML model.
-
#num_active_logical_bytes ⇒ Fixnum
[Output-only] Number of logical bytes that are less than 90 days old.
-
#num_active_physical_bytes ⇒ Fixnum
[Output-only] Number of physical bytes less than 90 days old.
-
#num_bytes ⇒ Fixnum
[Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
-
#num_long_term_bytes ⇒ Fixnum
[Output-only] The number of bytes in the table that are considered "long-term storage".
-
#num_long_term_logical_bytes ⇒ Fixnum
[Output-only] Number of logical bytes that are more than 90 days old.
-
#num_long_term_physical_bytes ⇒ Fixnum
[Output-only] Number of physical bytes more than 90 days old.
-
#num_partitions ⇒ Fixnum
[Output-only] The number of partitions present in the table or materialized view.
-
#num_physical_bytes ⇒ Fixnum
[Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer.
-
#num_rows ⇒ Fixnum
[Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
-
#num_time_travel_physical_bytes ⇒ Fixnum
[Output-only] Number of physical bytes used by time travel storage (deleted or changed data).
-
#num_total_logical_bytes ⇒ Fixnum
[Output-only] Total number of logical bytes in the table or materialized view.
-
#num_total_physical_bytes ⇒ Fixnum
[Output-only] The physical size of this table in bytes.
-
#range_partitioning ⇒ Google::Apis::BigqueryV2::RangePartitioning
[TrustedTester] Range partitioning specification for this table.
-
#require_partition_filter ⇒ Boolean
(also: #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.
-
#schema ⇒ Google::Apis::BigqueryV2::TableSchema
[Optional] Describes the schema of this table.
-
#self_link ⇒ String
[Output-only] A URL that can be used to access this resource again.
-
#snapshot_definition ⇒ Google::Apis::BigqueryV2::SnapshotDefinition
[Output-only] Snapshot definition.
-
#streaming_buffer ⇒ Google::Apis::BigqueryV2::Streamingbuffer
[Output-only] Contains information regarding this table's streaming buffer, if one is present.
-
#table_reference ⇒ Google::Apis::BigqueryV2::TableReference
[Required] Reference describing the ID of this table.
-
#time_partitioning ⇒ Google::Apis::BigqueryV2::TimePartitioning
Time-based partitioning specification for this table.
-
#type ⇒ String
[Output-only] Describes the table type.
-
#view ⇒ Google::Apis::BigqueryV2::ViewDefinition
[Optional] The view definition.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Table
constructor
A new instance of Table.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Table
Returns a new instance of Table.
7172 7173 7174 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7172 def initialize(**args) update!(**args) end |
Instance Attribute Details
#clone_definition ⇒ Google::Apis::BigqueryV2::CloneDefinition
[Output-only] Clone definition.
Corresponds to the JSON property cloneDefinition
6936 6937 6938 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6936 def clone_definition @clone_definition end |
#clustering ⇒ Google::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
6943 6944 6945 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6943 def clustering @clustering end |
#creation_time ⇒ Fixnum
[Output-only] The time when this table was created, in milliseconds since the
epoch.
Corresponds to the JSON property creationTime
6949 6950 6951 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6949 def creation_time @creation_time end |
#default_collation ⇒ String
[Output-only] The default collation of the table.
Corresponds to the JSON property defaultCollation
6954 6955 6956 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6954 def default_collation @default_collation end |
#description ⇒ String
[Optional] A user-friendly description of this table.
Corresponds to the JSON property description
6959 6960 6961 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6959 def description @description end |
#encryption_configuration ⇒ Google::Apis::BigqueryV2::EncryptionConfiguration
Custom encryption configuration (e.g., Cloud KMS keys).
Corresponds to the JSON property encryptionConfiguration
6964 6965 6966 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6964 def encryption_configuration @encryption_configuration end |
#etag ⇒ String
[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
6972 6973 6974 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6972 def etag @etag end |
#expiration_time ⇒ Fixnum
[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
6981 6982 6983 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6981 def expiration_time @expiration_time end |
#external_data_configuration ⇒ Google::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
6988 6989 6990 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6988 def external_data_configuration @external_data_configuration end |
#friendly_name ⇒ String
[Optional] A descriptive name for this table.
Corresponds to the JSON property friendlyName
6993 6994 6995 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6993 def friendly_name @friendly_name end |
#id ⇒ String
[Output-only] An opaque ID uniquely identifying the table.
Corresponds to the JSON property id
6998 6999 7000 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6998 def id @id end |
#kind ⇒ String
[Output-only] The type of the resource.
Corresponds to the JSON property kind
7003 7004 7005 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7003 def kind @kind end |
#labels ⇒ Hash<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
7012 7013 7014 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7012 def labels @labels end |
#last_modified_time ⇒ Fixnum
[Output-only] The time when this table was last modified, in milliseconds
since the epoch.
Corresponds to the JSON property lastModifiedTime
7018 7019 7020 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7018 def last_modified_time @last_modified_time end |
#location ⇒ String
[Output-only] The geographic location where the table resides. This value is
inherited from the dataset.
Corresponds to the JSON property location
7024 7025 7026 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7024 def location @location end |
#materialized_view ⇒ Google::Apis::BigqueryV2::MaterializedViewDefinition
[Optional] Materialized view definition.
Corresponds to the JSON property materializedView
7029 7030 7031 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7029 def materialized_view @materialized_view end |
#model ⇒ Google::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
7036 7037 7038 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7036 def model @model end |
#num_active_logical_bytes ⇒ Fixnum
[Output-only] Number of logical bytes that are less than 90 days old.
Corresponds to the JSON property num_active_logical_bytes
7066 7067 7068 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7066 def num_active_logical_bytes @num_active_logical_bytes end |
#num_active_physical_bytes ⇒ Fixnum
[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 num_active_physical_bytes
7072 7073 7074 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7072 def num_active_physical_bytes @num_active_physical_bytes end |
#num_bytes ⇒ Fixnum
[Output-only] The size of this table in bytes, excluding any data in the
streaming buffer.
Corresponds to the JSON property numBytes
7042 7043 7044 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7042 def num_bytes @num_bytes end |
#num_long_term_bytes ⇒ Fixnum
[Output-only] The number of bytes in the table that are considered "long-term
storage".
Corresponds to the JSON property numLongTermBytes
7048 7049 7050 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7048 def num_long_term_bytes @num_long_term_bytes end |
#num_long_term_logical_bytes ⇒ Fixnum
[Output-only] Number of logical bytes that are more than 90 days old.
Corresponds to the JSON property num_long_term_logical_bytes
7077 7078 7079 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7077 def num_long_term_logical_bytes @num_long_term_logical_bytes end |
#num_long_term_physical_bytes ⇒ Fixnum
[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 num_long_term_physical_bytes
7083 7084 7085 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7083 def num_long_term_physical_bytes @num_long_term_physical_bytes end |
#num_partitions ⇒ Fixnum
[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 num_partitions
7090 7091 7092 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7090 def num_partitions @num_partitions end |
#num_physical_bytes ⇒ Fixnum
[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
7055 7056 7057 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7055 def num_physical_bytes @num_physical_bytes end |
#num_rows ⇒ Fixnum
[Output-only] The number of rows of data in this table, excluding any data in
the streaming buffer.
Corresponds to the JSON property numRows
7061 7062 7063 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7061 def num_rows @num_rows end |
#num_time_travel_physical_bytes ⇒ Fixnum
[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 num_time_travel_physical_bytes
7097 7098 7099 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7097 def num_time_travel_physical_bytes @num_time_travel_physical_bytes end |
#num_total_logical_bytes ⇒ Fixnum
[Output-only] Total number of logical bytes in the table or materialized view.
Corresponds to the JSON property num_total_logical_bytes
7102 7103 7104 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7102 def num_total_logical_bytes @num_total_logical_bytes end |
#num_total_physical_bytes ⇒ Fixnum
[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 num_total_physical_bytes
7109 7110 7111 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7109 def num_total_physical_bytes @num_total_physical_bytes end |
#range_partitioning ⇒ Google::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
7115 7116 7117 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7115 def range_partitioning @range_partitioning end |
#require_partition_filter ⇒ Boolean 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
7121 7122 7123 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7121 def require_partition_filter @require_partition_filter end |
#schema ⇒ Google::Apis::BigqueryV2::TableSchema
[Optional] Describes the schema of this table.
Corresponds to the JSON property schema
7127 7128 7129 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7127 def schema @schema end |
#self_link ⇒ String
[Output-only] A URL that can be used to access this resource again.
Corresponds to the JSON property selfLink
7132 7133 7134 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7132 def self_link @self_link end |
#snapshot_definition ⇒ Google::Apis::BigqueryV2::SnapshotDefinition
[Output-only] Snapshot definition.
Corresponds to the JSON property snapshotDefinition
7137 7138 7139 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7137 def snapshot_definition @snapshot_definition end |
#streaming_buffer ⇒ Google::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
7144 7145 7146 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7144 def streaming_buffer @streaming_buffer end |
#table_reference ⇒ Google::Apis::BigqueryV2::TableReference
[Required] Reference describing the ID of this table.
Corresponds to the JSON property tableReference
7149 7150 7151 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7149 def table_reference @table_reference end |
#time_partitioning ⇒ Google::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
7155 7156 7157 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7155 def time_partitioning @time_partitioning end |
#type ⇒ String
[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.
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
7165 7166 7167 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7165 def type @type end |
#view ⇒ Google::Apis::BigqueryV2::ViewDefinition
[Optional] The view definition.
Corresponds to the JSON property view
7170 7171 7172 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7170 def view @view end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7177 def update!(**args) @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) @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) @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_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_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) @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 |