Class: Embulk::Output::Bigquery::LocalFile

Inherits:
Object
  • Object
show all
Defined in:
lib/embulk/output/bigquery.rb

Overview

To support configuration like below as org.embulk.spi.unit.LocalFile

json_keyfile:

content: |

Class Method Summary collapse

Class Method Details

.load(v) ⇒ Object

Returns JSON string.

Returns:

  • JSON string



24
25
26
27
28
29
30
# File 'lib/embulk/output/bigquery.rb', line 24

def self.load(v)
  if v.is_a?(String) # path
    File.read(File.expand_path(v))
  elsif v.is_a?(Hash)
    v['content']
  end
end