Class: Aq::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/aq/schema.rb

Instance Method Summary collapse

Constructor Details

#initializeSchema

Returns a new instance of Schema.



8
9
10
# File 'lib/aq/schema.rb', line 8

def initialize
  @schema = []
end

Instance Method Details

#append_column(name, type, mode = nil) ⇒ Object



12
13
14
15
16
# File 'lib/aq/schema.rb', line 12

def append_column(name, type, mode=nil)
  nullable = mode != 'required'
  column = {name: name, type: convert_type_from_bq_to_athena(type), nullable: nullable}
  @schema.push column
end

#get_allObject



18
19
20
# File 'lib/aq/schema.rb', line 18

def get_all
  @schema
end