• Does anyone have a simple HPL onpladm example?

    From jgedmiston@gmail.com@21:1/5 to All on Wed Jun 29 13:28:32 2016
    I'm looking for an onpladm example to create an unload of a table with SQL where clause. I almost had it with...

    onpladm create map <map> -D <database> -t <tabname> -z D

    Then...

    onpladm describe query <map> -F <file>

    Then edit the file and change the SELECTSTATEMENT.

    Then...

    onpladm modify object -F <file>

    But then I get an error when executing onpload...

    onpload -m <map> -d /data1/tmp/unload_file -fup

    I just want to unload part of a table, it is a very large table, so need to use HPL.

    Thanks,
    James

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Carlson@21:1/5 to jgedmiston@gmail.com on Thu Jun 30 20:37:16 2016
    On 6/29/2016 4:28 PM, jgedmiston@gmail.com wrote:
    I'm looking for an onpladm example to create an unload of a table with SQL where clause. I almost had it with...

    onpladm create map <map> -D <database> -t <tabname> -z D

    Then...

    onpladm describe query <map> -F <file>

    Then edit the file and change the SELECTSTATEMENT.

    Then...

    onpladm modify object -F <file>

    But then I get an error when executing onpload...

    onpload -m <map> -d /data1/tmp/unload_file -fup

    I just want to unload part of a table, it is a very large table, so need to use HPL.

    Thanks,
    James


    Not sure if this would help . . .

    http://www.ibm.com/developerworks/data/zones/informix/library/techarticle/0307carlson/0307carlson.html

    JWC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Casique@21:1/5 to All on Fri Jul 1 09:29:42 2016
    El miércoles, 29 de junio de 2016, 15:58:33 (UTC-4:30), jgedm...@gmail.com escribió:
    I'm looking for an onpladm example to create an unload of a table with SQL where clause. I almost had it with...

    onpladm create map <map> -D <database> -t <tabname> -z D

    Then...

    onpladm describe query <map> -F <file>

    Then edit the file and change the SELECTSTATEMENT.

    Then...

    onpladm modify object -F <file>

    But then I get an error when executing onpload...

    onpload -m <map> -d /data1/tmp/unload_file -fup

    I just want to unload part of a table, it is a very large table, so need to use HPL.

    Thanks,
    James

    I did this by using a filter. In fact, I performed this steps:

    - Create a HPL project:
    onpladm create project projectName

    - Create a HPL job:
    onpladm create job jobName -p jobProject -D databaseName -t tableName -d "/respaldo/hpl/outputFileName.unl"

    - Create a filter, first I create a file named filterFile.f with this template:

    BEGIN OBJECT FILTER filterName
    PROJECT "projectName"
    FORMAT "tableName"
    BEGIN SEQUENCE
    FIELDNAME "columnName"
    STATUS "K"
    MATCH Sentence
    END SEQUENCE
    END OBJECT

    Example of line of "MATCH Sentence", replace Sentence for " > 260", It means that it unload the rows whose columnName are greater than 260

    Then you have to create the filter:
    onpladm create object -F filterFile.f

    - Execute the job:
    onpload -p projetName -j jobName -fl -F filterName -l "pathLog"

    pathlog = file for saving the results of onpload execution

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)