We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eaab04 commit 8fd7b4eCopy full SHA for 8fd7b4e
lib/embulk/output/bigquery/value_converter_factory.rb
@@ -225,12 +225,19 @@ def string_converter
225
}
226
end
227
when 'TIME'
228
- Proc.new {|val|
229
- next nil if val.nil?
230
- with_typecast_error(val) do |val|
+ if @timestamp_format
+ Proc.new {|val|
+ next nil if val.nil?
231
+ with_typecast_error(val) do |val|
232
+ Time.strptime(val, @timestamp_format).strftime("%H:%M:%S.%6N")
233
+ end
234
+ }
235
+ else
236
237
238
Time.parse(val).strftime("%H:%M:%S.%6N")
- end
- }
239
240
241
when 'RECORD'
242
Proc.new {|val|
243
next nil if val.nil?
0 commit comments