Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: New Job entry : Mysql Bulk File

  1. #1
    samatar hassan Guest

    Default New Job entry : Mysql Bulk File

    Hello all,

    I have just finised new job entry ( see picture).

    see Tracker:
    Change Request -




    [# 4912]


    Mysql Bulk Load to a file (in javaforge).

    I have done first tests...it works pretty good but i have just one pb.
    In fact, i use "execStatements" in Database.java to launch the query.
    The mysql Bulk file statement is like "SELECT...INTO OUTFILE/DUMPFILE ..." so it use "SELECT" and in the "execStatements" the select query is waiting for a result otherwise it raise an error.


    if (rs!=null)
    {
    Row r = getRow(rs);
    while (r!=null)
    {
    result.setNrLinesRead(result.getNrLinesRead()+1);
    log.logDetailed(toString(), r.toString());
    r=getRow(rs);
    }

    }
    else
    {
    if (log.isDebug()) log.logDebug(toString(), "Error executing query: "+Const.CR+sql);
    }


    In my situation, the select is like an Update.
    The Bulk File entry works (file was populated) but raise an error at the end.
    What sould be the best way to handle that ?

    Thanks

    Samatar


    Samatar HASSAN

    Fixe: 02-35-63-03-45
    GSM: 06-68-28-68-02







    ___________________________________________________________________________
    D

  2. #2
    Matt Casters Guest

    Default RE: New Job entry : Mysql Bulk File

    Hi Samatar,

    This is obviously a special case. Perhaps you could do something like
    this:

    PreparedStatement ps = database.prepareSQL("SELECT ... INTO ...");
    ps.executeUpdate();

    All the best,

    Matt


    _____

    From: kettle-developers (AT) googlegroups (DOT) com
    [mailto:kettle-developers (AT) googlegroups (DOT) com] On Behalf Of samatar hassan
    Sent: Sunday, March 04, 2007 6:27 PM
    To: kettle-developers (AT) googlegroups (DOT) com
    Cc: Matt CASTERS; Sven Boden
    Subject: New Job entry : Mysql Bulk File


    Hello all,

    I have just finised new job entry ( see picture).

    see Tracker: Change Request - [# 4912] Mysql Bulk Load to a file (in
    javaforge).


    I have done first tests...it works pretty good but i have just one pb.
    In fact, i use "execStatements" in Database.java to launch the query.
    The mysql Bulk file statement is like "SELECT...INTO OUTFILE/DUMPFILE ....."
    so it use "SELECT" and in the "execStatements" the select query is waiting
    for a result otherwise it raise an error.


    if (rs!=null)
    {
    Row r = getRow(rs);
    while (r!=null)
    {

    result.setNrLinesRead(result.getNrLinesRead()+1);
    log.logDetailed(toString(),
    r.toString());
    r=getRow(rs);
    }

    }
    else
    {
    if (log.isDebug()) log.logDebug(toString(),
    "Error executing query: "+Const.CR+sql);
    }


    In my situation, the select is like an Update.
    The Bulk File entry works (file was populated) but raise an error at the
    end.
    What sould be the best way to handle that ?

    Thanks

    Samatar


    Samatar HASSAN

    Fixe: 02-35-63-03-45
    GSM: 06-68-28-68-02


    _____

    D

  3. #3
    Matt Casters Guest

    Default RE: New Job entry : Mysql Bulk File

    Absolutely not Samatar, all the credit clearly goes to you in this case ;-)

    _____

    From: kettle-developers (AT) googlegroups (DOT) com
    [mailto:kettle-developers (AT) googlegroups (DOT) com] On Behalf Of samatar hassan
    Sent: Monday, March 05, 2007 1:42 PM
    To: kettle-developers (AT) googlegroups (DOT) com
    Subject: Re : New Job entry : Mysql Bulk File



    Thanks Matt,



    In fact executeUpdate does'nt works (it expect a DDL statement) but execute
    works.

    Thanks to u we have now a new entry for MYSQL





    Samatar



    Samatar HASSAN

    Fixe: 02-35-63-03-45
    GSM: 06-68-28-68-02


    ----- Message d'origine ----
    De : Matt Casters <mcasters (AT) pentaho (DOT) org>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.