You are on page 1of 7

tNetezzaNzLoad Documentation

Description:
This component invokes Netezzas nzload utility to insert records into the Netezza database. This component can be either in standalone mode, loading from an existing data file; or connected to an input row and loading data from the connected component. oth these scenarios are described in the sample !obs later.

"omponent #amily #unction 'urpose asic )ettings

$atabases%Netez za tNetezzaNz&oad component inserts data into a Netezza database table using Netezzas nzload utility To bulk data into a Netezza table either from an existing data file, an input flow, or a named(pipe. Property Type "hoose between a built(in or repository mode to specify the database connection parameters Host $atabase host address. Port $atabase port to connect to. Database Netezza database name to connect to. User $atabase user name. Password $atabase password. Table $atabase table to insert data into. Action on Table *sed to create or truncate table before loading data. Drop and Create: executes a drop and create table statement before loading data. Create Table: executes only a create table before loading data. Create table if not exists: executes a create table statement only if the table doesnt already exists in the database. Drop table if exists and create: drops the table only if it already exists in the database and creates it again. Clear table: executes a delete statement prior to loading data to clear the entire content of the table. Truncate table: executes a truncate statement prior to loading data to clear the entire content of the table. Schema "omponents schema. Data file #ull path to the data file to use. +f this component

Use named-pipe

!d"anced #ettings

Named-pipe name Use existing control file

Control file ield Separator

!e"#ire "#otes aro#nd fields

is used by itself ,not connected to another component with input flow- then this is the name of an existing data file to load into the database. ut if this component is connected with an input flow to another component; this is the name of the file to generate and write the incoming data to later be used with nzload to load into the database. "heck this option if you like to use a named(pipe instead of a data file. This option can only be used when this component is connected with an input flow to another component. .ith this option checked, there would be no data file generated and the data is passed to nzload through a named( pipe. This is option is strongly recommended to improve performance both &inux and .indows mode. To configure the named-pipe option to work on Windows platform please read the instructions below )pecify a name for the named(pipe to use for loading. /ake sure to enter a valid name. "heck this option if you like to provide a control file to be used with the nzload utility instead of specifying all the options explicitly through the component. .hen this option is specified, data file and all other nzload related options are ignored. 'lease refer to Netezzas nzload manual for details on creating a control file. The name of the nzload control to use. This option is passed to nzload utility via 0cf argument. The delimiter to use while loading data. This is nzloads 0delim argument. +f you do not use 1uoted values option, you must make sure that the delimiter is not included in the data thats inserted to the database. The default value is 2t or T3 . To improve performance you can keep the default value. This is nzloads 04uoted5alue argument. This option is only applied to columns with )tring, yte, yte67, "har, and 8b!ect type .5alid options are9 None: ,N8- do not wrap column values in 4uotes. #ingle $uote: ,)+N:&;- wrap column values in a single 4uote ,<-. Double $uote: ,$8* &;- wrap column values in double 4uote ,=-. %L&!#& refer to the description below to load data with $uoted "alues or carriage returns ;scape character to escape 4uotes in data. The

$scape char

!d"anced options 'nzload(s argument s)

-lf

-bf

-o#p#tDir

-log ileSi*e

-compress

-s,ip!ows &n(

-max!ows &n(

-max$rrors -ignore-ero

-re"#ire.#otes

only valid option is backslash ,2-. This option must be specified if previous option is set to either >single 4uote or >double 4uote. Name of the log file to generate. The logs will be appended if the log file already exists. +f the parameter is not specified, the default name for the log file is %&table'name()&db'name()n*log+. 3nd its generated under the current working directory where the !ob is running. Name of the bad file to generate. The bad file contains all the records that could not be loaded due to an internal Netezza error. The records will be appended if the bad file already exists. +f the parameter is not specified, the default name for the bad file is %&table'name()&db'name()n*bad+. 3nd its generated under the current working directory where the !ob is running. $irectory path to where the log and the bad file is generated. +f the parameter is not specified the files are generated under the current directory where the !ob is currently running. /aximum size for the log file. The value is in / . The default value is ?@@@ or ?: . To save hard disk space, specify a smaller amount if your !ob runs often. )pecify this option if the data file is compressed. This option is only valid if this component is used by itself and not connected to another component via an input flow. 5alid values are =TA*;= or =#3&);=. $efault value if =#3&);=. Number of rows to skip from the beginning of the data file. This option should only be used if this component is used by itself and not connected to another component via an input flow. )et the value to =B= if you like to skip the header row from the data file. The default value is =@=. /aximum number of rows to load from the data file. This option should only be used if this component is used by itself and not connected to another component via an input flow. /aximum number of error records to allow before terminating the load process. The default value if =B=. inary zero bytes in the input data will generate errors. )et this option no =N8= to generate error or to =C;)= to ignore zero bytes. The default value is =N8=. This option re4uires all the values to be wrapped in 4uotes. Note: this option currently does not work with

-n#ll/al#e &to,en(

-fill!ecord

-ctrlChar

-ct0nString

-tr#ncString

-dateStyle

-dateDelim

-y12ase -timeStyle

input flow. *se this option only in standalone mode with an existing file. default value is =#3&);=. )pecify the token to indicate a null value in the data file. The default value is =N*&&=. To improve slightly performance you can set this value to an empty field by specifying the value for the option as to single 4uotes9 =2<2<=. Treat missing trailing input fields as null. Cou do not need to specify a value for this option in the value field of the table. This option is not turned on by default, therefore input fields must match exactly all the columns of the table by default. Note: trailing input fields must be nullable in the database. 3ccept control chars in char%varchar fields ,must escape N*&, "A and &#-. Cou do not need to specify a value for this option in the value field of the table. This option is turned off by default. 3ccept un(escaped "A in char%varchar fields ,&# becomes only end of row-. Cou do not need to specify a value for this option in the value field of the table. This option is turned off by default. Truncate any string value that exceeds its declared char%varchar storage. Cou do not need to specify a value for this option in the value field of the table. This option is turned off by default. )pecify the date format in which the input data is written in. 5alid values are9 =C/$=, =C?/$=, =$/C=, =$/C?=, =/$C=, =/$C?=, =/8N$C=, =/8N$C?=. The default value is =C/$=. Note: the date format of the column in the components schema must match the value specified here. #or example if you want to load a $3T; column, specify the date format in the component schema as =yyyy(//(dd= and the (date)tyle option as =C/$=. *or more description on loading date and time fields please see the additional notes below $elimiter character between date parts. The default value is =(= for all date styles except for =/8N$C6?7= which is = = ,empty space-. Note: the date format of the column in the components schema must match the value specified here. #irst year expressible using two digit year ,C?date)tyle. )pecify the time format in which the input data is written in. 5alid values are9 =?DE8*A= and

-timeDelim

time!o#ndNanos -boolStyle

-allow!elay -allow!elay &n( $ncoding Specify n*load path #ll path to n*load exec#table

=B?E8*A=. The default value is =?DE8*A=. #or slightly better performance you should keep the default value. Note: the time format of the column in the components schema must match the value specified here. #or example if you want to load a T+/; column, specify the date format in the component schema as =EE9mm9ss= and the (time)tyle option as =?DE8*A=. *or more description on loading date and time fields please see the additional notes below $elimiter character between time parts. The default value is =9=. Note: the date format of the column in the components schema must match the value specified here. 3llow but round non(zero digits with smaller than microsecond resolution. )pecify the format in which oolean data is written in the data. The valid values are9 =BF@=, =TF#=, =CFN=, =TA*;F#3&);=, =C;)=. The default value is =BF@=. #or slightly better performance keep the default value. 3llow load to continue after one or more )'* reset or failed over. The default is not allowed. )pecify number of allowable continuation of a load. $efault value is =B=. ;ncoding of the data file. "heck this option to specify the full path for nzload executable. Cou must check this option if nzload path is not specified in the '3TE environment variable. #ull path to the nzload executable on the running machine. +ts recommended to put the nzload path in '3TE environment variable and do not specify this option.

Configuring Named-pipe +ption on Windows %latforms


This component on named(pipe mode uses a GN+ interface to create and write to a named(pipe on any .indows platform. Therefore the path to the associated GN+ $&& must be configured inside the !ava library path. The component comes with two

$&&s for both H? and ID bit operating systems called9 namedpipeF!ni.dll and namedpipeF!niFIDbit.dll. There are many ways to specify include these $&&s in the !ava library path. ut the easiest to copy the correct library file for your platform inside "92.+N$8.) directory. Note, for ID bit systems you must first rename the library to namedpipeF!ni.dll and place inside the windows directory. Cou can also explicitly specify the !ava library path through the G5/ command line. Therefore add the following argument to the G5/ call9 ($!ava.library.pathJ=&yo#r directory(%namedpipeF!ni.dll #or more information you can read the A;3$/;(.+N.txt file included with the component.

Loading D!T&, T-.&, and T-.&#T!.% columns


.hen this component is used with an input flow, the date format specified inside the components schema must match the value specified for (date)tyle, (date$elim, (time)tyle, and (time$elim options. 'lease refer to following example9 $ata type $3T; T+/; T+/;)T3 /' )chema $ate format =yyyy(//(dd= =EE9mm9ss= =yyyy(//(dd EE9mm9ss= ( date)ty le =C/$= n%a =C/$= ( date$eli m =(= n%a =(= ( time)tyl e n%a =?DE8* A= =?DE8* A= ( time$eli m n%a =9= =9=

#ample scenarios
3ttached zip file, tNetezzaNz&oadFsample.zip, contains three example to use this component in three different modes9 ( ( ( test/ 0ob: uses this component with an input flow but using a data file to load with nzload. test1 0ob: uses this component with an input flow but using a named(pipe to load to nzload. test2 0ob: uses this component in standalone mode, with no incoming input flows, and uses an existing data file to be loaded with nzload.

'lease use Talend version H.?.H or higher to import the zip file.

tNetezzaNz&oadFsample.zip

You might also like