Class: Fluent::BigQuery::StringFieldSchema

Inherits:
FieldSchema
  • Object
show all
Defined in:
lib/fluent/plugin/bigquery/schema.rb

Instance Attribute Summary

Attributes inherited from FieldSchema

#mode, #name

Instance Method Summary collapse

Methods inherited from FieldSchema

#format, #initialize, #to_h

Constructor Details

This class inherits a constructor from Fluent::BigQuery::FieldSchema

Instance Method Details

#format_one(value) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/fluent/plugin/bigquery/schema.rb', line 60

def format_one(value)
  if value.is_a?(Hash) || value.is_a?(Array)
    MultiJson.dump(value)
  else
    value.to_s
  end
end

#typeObject



56
57
58
# File 'lib/fluent/plugin/bigquery/schema.rb', line 56

def type
  :string
end