-2

I'm using embulk tools from CSV file (from the postgresql database) imported into bigquery.Found that some fields in the CSV file contains a newline(\n). Embulk tool plug-in can remove newline field?Or is there any way?

wangmin
  • 1
  • 1
  • Possible duplicate of [How to bulk insert from CSV when some fields have new line character?](http://stackoverflow.com/questions/2512924/how-to-bulk-insert-from-csv-when-some-fields-have-new-line-character) – Mario Santini Sep 06 '16 at 10:10

1 Answers1

0

Maybe you can use embulk-filter-eval or embulk-filter-ruby_proc plugins. (embulk-filter-ruby_proc is better)

This is an example to replace TAB(\t) to "" with embulk-filter-eval plugin. https://gist.github.com/hiroyuki-sato/a1f6f718cee236645649

I'll show you more example if you tell me to input and output data example. (Create table, insert into statement, An output text example).

Note: Both plugins are written by JRuby. It's slower than Java plugin.