Class: Tumugi::Plugin::Bigquery::Table
- Inherits:
-
Object
- Object
- Tumugi::Plugin::Bigquery::Table
- Defined in:
- lib/tumugi/plugin/bigquery/table.rb
Instance Attribute Summary collapse
-
#dataset_id ⇒ Object
readonly
Returns the value of attribute dataset_id.
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#table_id ⇒ Object
readonly
Returns the value of attribute table_id.
Instance Method Summary collapse
- #dataset ⇒ Object
-
#initialize(project_id:, dataset_id:, table_id:) ⇒ Table
constructor
A new instance of Table.
- #table_full_name ⇒ Object
- #table_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(project_id:, dataset_id:, table_id:) ⇒ Table
Returns a new instance of Table.
9 10 11 12 13 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 9 def initialize(project_id:, dataset_id:, table_id:) @project_id = project_id @dataset_id = dataset_id @table_id = table_id end |
Instance Attribute Details
#dataset_id ⇒ Object (readonly)
Returns the value of attribute dataset_id.
7 8 9 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 7 def dataset_id @dataset_id end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
7 8 9 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 7 def project_id @project_id end |
#table_id ⇒ Object (readonly)
Returns the value of attribute table_id.
7 8 9 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 7 def table_id @table_id end |
Instance Method Details
#dataset ⇒ Object
15 16 17 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 15 def dataset Tumugi::Plugin::Bigquery::Dataset.new(project_id: @project_id, dataset_id: @dataset_id) end |
#table_full_name ⇒ Object
23 24 25 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 23 def table_full_name "#{project_id}:#{dataset_id}.#{table_id}" end |
#table_name ⇒ Object
19 20 21 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 19 def table_name "#{dataset_id}.#{table_id}" end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/tumugi/plugin/bigquery/table.rb', line 27 def to_s "bq://#{project_id}/#{dataset_id}/#{table_id}" end |