Class: Fluent::BigQuery::JsonFieldSchema

Inherits:
FieldSchema 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, is_load: false) ⇒ Object



74
75
76
77
78
79
80
# File 'lib/fluent/plugin/bigquery/schema.rb', line 74

def format_one(value, is_load: false)
  if is_load
    value
  else
    MultiJson.dump(value)
  end
end

#typeObject



70
71
72
# File 'lib/fluent/plugin/bigquery/schema.rb', line 70

def type
  :json
end