RGC
RGC

Reputation: 382

Is it possible to change the column and record delimiter in sqoop2?

Is it possbile to change the default column delimiter (comma) to a different character in Sqoop2? I read in some mail archives that it is not supported yet.

If no, how can we specify the enclosed-by and escaped-by chars so that Sqoop properly extracts columns with values containing comma and quotes? Does this work by default or need to turn it on by setting any options?

Upvotes: 1

Views: 768

Answers (1)

RGC
RGC

Reputation: 382

Like I doubted, changing the delimiter is not yet supported in Sqoop2. Refer below:

http://grokbase.com/t/cloudera/cdh-user/137q954ffz/sqoop2-import-field-delimiter

  • By default, the column delimiter is comma
  • String fields should be enclosed within single quotes (this takes care of fields with comma in them)
  • If the field contains single quote in itself then escape it with backslash \

Upvotes: 2

Related Questions