Review Board 1.7.22


Fix for SQOOP-932 documentation subtask

Review Request #10057 - Created March 21, 2013 and updated

Venkat Ranganathan
Reviewers
Sqoop
jarcec
sqoop-trunk
Documentation for the null string handling
Ran docs target - successfully built and verified output

Diff revision 2 (Latest)

1 2
1 2

  1. src/docs/user/connectors.txt: Loading...
src/docs/user/connectors.txt
Revision c172c4b New Change
[20] 307 lines
[+20]
308
    --username nzuser \
308
    --username nzuser \
309
    --password nzpass \
309
    --password nzpass \
310
    --export-dir hdfsdir \
310
    --export-dir hdfsdir \
311
    --input-fields-terminated-by "\t"
311
    --input-fields-terminated-by "\t"
312
----
312
----

    
   
313

   

    
   
314
Null string handling

    
   
315
^^^^^^^^^^^^^^^^^^^^

    
   
316

   

    
   
317
Netezza direct connector supports the null-string features of Sqoop.  The null

    
   
318
string values are converted to appropriate external table options during export

    
   
319
and import operations.

    
   
320

   

    
   
321
.Supported export control arguments:

    
   
322
[grid="all"]

    
   
323
`----------------------------------------`---------------------------------------

    
   
324
Argument                                 Description

    
   
325
---------------------------------------------------------------------------------

    
   
326
+\--input-null-string <null-string>+     The string to be interpreted as\

    
   
327
                                         null for string columns.

    
   
328
+\--input-null-non-string <null-string>+ The string to be interpreted as\

    
   
329
                                         null for non string columns.

    
   
330
---------------------------------------------------------------------------------

    
   
331

   

    
   
332
In the case of Netezza direct mode connector, both the arguments must be

    
   
333
left to the default values or explicitly set to the same value.  Furthermore

    
   
334
the null string value is restricted to 0-4 utf8 characters.

    
   
335

   

    
   
336
On export, for non-string columns, if the chosen null value is a valid

    
   
337
representation in the column domain, then the column might not be loaded as

    
   
338
null.  For example, if the null string value is specified as "1", then on

    
   
339
export, any occurrence of "1" in the input file will be loaded as value 1

    
   
340
instead of NULL for int columns.

    
   
341

   

    
   
342
It is suggested that the null value be specified as empty string for

    
   
343
performance and consistency.

    
   
344

   

    
   
345
.Supported import control arguments:

    
   
346
[grid="all"]

    
   
347
`----------------------------------------`---------------------------------------

    
   
348
Argument                                 Description

    
   
349
---------------------------------------------------------------------------------

    
   
350
+\--null-string <null-string>+           The string to be interpreted as\

    
   
351
                                         null for string columns.

    
   
352
+\--null-non-string <null-string>+       The string to be interpreted as\

    
   
353
                                         null for non string columns.

    
   
354
---------------------------------------------------------------------------------

    
   
355

   

    
   
356
In the case of Netezza direct mode connector, both the arguments must be

    
   
357
left to the default values or explicitly set to the same value.  Furthermore

    
   
358
the null string value is restricted to 0-4 utf8 characters.

    
   
359

   

    
   
360
On import, for non-string columns, the chosen null value in current

    
   
361
implementations the null value representation is ignored for non character

    
   
362
columns.  For example, if the null string value is specified as "\N", then on

    
   
363
import, any occurrence of NULL for non-char columns in the table will be

    
   
364
imported as an empty string instead of '\N', the chosen null string

    
   
365
representation.

    
   
366

   

    
   
367
It is suggested that the null value be specified as empty string for

    
   
368
performance and consistency.
  1. src/docs/user/connectors.txt: Loading...