| |
| //// |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| //// |
| |
| The delimiters used to separate fields and records can be specified |
| on the command line, as can a quoting character and an escape character |
| (for quoting delimiters inside a values). Data imported with |
| +\--as-textfile+ will be formatted according to these parameters. Classes |
| generated by Sqoop will encode this information, so using +toString()+ |
| from a data record stored +\--as-sequencefile+ will reproduce your |
| specified formatting. |
| |
| The +(char)+ argument for each argument in this section can be specified |
| either as a normal character (e.g., +\--fields-terminated-by ,+) or via |
| an escape sequence. Arguments of the form +\0xhhh+ will be interpreted |
| as a hexidecimal representation of a character with hex number _hhh_. |
| Arguments of the form +\0ooo+ will be treated as an octal representation |
| of a character represented by octal number _ooo_. The special escapes |
| +\n+, +\r+, +\"+, +\b+, +\t+, and +\\+ act as they do inside Java strings. +\0+ will be |
| treated as NUL. This will insert NUL characters between fields or lines |
| (if used for +\--fields-terminated-by+ or +\--lines-terminated-by+), or will |
| disable enclosing/escaping if used for one of the +\--enclosed-by+, |
| +\--optionally-enclosed-by+, or +\--escaped-by+ arguments. |
| |
| The default delimiters are +,+ for fields, +\n+ for records, no quote |
| character, and no escape character. Note that this can lead to |
| ambiguous/unparsible records if you import database records containing |
| commas or newlines in the field data. For unambiguous parsing, both must |
| be enabled, e.g., via +\--mysql-delimiters+. |
| |