Module: Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb
Overview
Path helper methods for the BigQueryWrite API.
Instance Method Summary collapse
-
#table_path(project:, dataset:, table:) ⇒ ::String
Create a fully-qualified Table resource string.
-
#write_stream_path(project:, dataset:, table:, stream:) ⇒ ::String
Create a fully-qualified WriteStream resource string.
Instance Method Details
#table_path(project:, dataset:, table:) ⇒ ::String
Create a fully-qualified Table resource string.
The resource will be in the following format:
projects/{project}/datasets/{dataset}/tables/{table}
40 41 42 43 44 45 |
# File 'lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb', line 40 def table_path project:, dataset:, table: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" "projects/#{project}/datasets/#{dataset}/tables/#{table}" end |
#write_stream_path(project:, dataset:, table:, stream:) ⇒ ::String
Create a fully-qualified WriteStream resource string.
The resource will be in the following format:
projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}
60 61 62 63 64 65 66 |
# File 'lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb', line 60 def write_stream_path project:, dataset:, table:, stream: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" "projects/#{project}/datasets/#{dataset}/tables/#{table}/streams/#{stream}" end |