Class: Google::Apis::PubsubV1::BigQueryConfig
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::BigQueryConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
Configuration for a BigQuery subscription.
Instance Attribute Summary collapse
-
#drop_unknown_fields ⇒ Boolean
(also: #drop_unknown_fields?)
When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery.
-
#state ⇒ String
Output only.
-
#table ⇒ String
The name of the table to which to write data, of the form
projectId
.datasetId
.tableId
Corresponds to the JSON propertytable
. -
#use_topic_schema ⇒ Boolean
(also: #use_topic_schema?)
When true, use the topic's schema as the columns to write to in BigQuery, if it exists.
-
#write_metadata ⇒ Boolean
(also: #write_metadata?)
When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BigQueryConfig
constructor
A new instance of BigQueryConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BigQueryConfig
Returns a new instance of BigQueryConfig.
110 111 112 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 110 def initialize(**args) update!(**args) end |
Instance Attribute Details
#drop_unknown_fields ⇒ Boolean Also known as: drop_unknown_fields?
When true and use_topic_schema is true, any fields that are a part of the
topic schema that are not part of the BigQuery table schema are dropped when
writing to BigQuery. Otherwise, the schemas must be kept in sync and any
messages with extra fields are not written and remain in the subscription's
backlog.
Corresponds to the JSON property dropUnknownFields
78 79 80 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 78 def drop_unknown_fields @drop_unknown_fields end |
#state ⇒ String
Output only. An output-only field that indicates whether or not the
subscription can receive messages.
Corresponds to the JSON property state
85 86 87 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 85 def state @state end |
#table ⇒ String
The name of the table to which to write data, of the form projectId
.
datasetId
.tableId
Corresponds to the JSON property table
91 92 93 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 91 def table @table end |
#use_topic_schema ⇒ Boolean Also known as: use_topic_schema?
When true, use the topic's schema as the columns to write to in BigQuery, if
it exists.
Corresponds to the JSON property useTopicSchema
97 98 99 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 97 def use_topic_schema @use_topic_schema end |
#write_metadata ⇒ Boolean Also known as: write_metadata?
When true, write the subscription name, message_id, publish_time, attributes,
and ordering_key to additional columns in the table. The subscription name,
message_id, and publish_time fields are put in their own columns while all
other message properties (other than data) are written to a JSON object in the
attributes column.
Corresponds to the JSON property writeMetadata
107 108 109 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 107 def @write_metadata end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
115 116 117 118 119 120 121 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 115 def update!(**args) @drop_unknown_fields = args[:drop_unknown_fields] if args.key?(:drop_unknown_fields) @state = args[:state] if args.key?(:state) @table = args[:table] if args.key?(:table) @use_topic_schema = args[:use_topic_schema] if args.key?(:use_topic_schema) @write_metadata = args[:write_metadata] if args.key?(:write_metadata) end |