Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Problem with MySQL bulk insertion

  1. #1
    Join Date
    Jun 2011
    Posts
    11

    Default Problem with MySQL bulk insertion

    Hello.

    I have a problem with the MySQL bulk insertion componant. I use the same connexion that the table insertion componant (and this one works fine) but after data load, I revieve this error :

    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) : PDI a rencontré une erreur! L'exécution de la transformation va être arrêtée:
    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException:
    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) : Couldn't execute SQL: LOAD DATA INFILE 'C:\Users\Administrateur\Desktop\BENCH\BULK' INTO TABLE `bench` REPLACE FIELDS TERMINATED BY '\t ' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' (`Commande_Code`,`Commande_Date`,`Commande_Qte`,`Commande_PU`,`Commande_Delai`,`Client_Code`,`Produit_Code`);
    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) :
    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) :
    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REPLACE FIELDS TERMINATED BY '\t ' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' (`' at line 1
    2011/07/07 00:50:51 - Chargement en bloc vers MySQL.0 - ERROR (version 4.1.3-GA, build 15242 from 2011-05-26 13.49.19 by buildguy) :

    I've searched in the MySQL Server 5.5 documentation without find anything. Someone had find a solution for this problem ?

  2. #2

    Default

    Hi,

    I don't think it needs the double back slashes in ESCAPED BY '\\' can you try a test without escape chars and leave it blank in the PDI dialog.
    Regards,

    Mark, Cloud2Land

    http://www.cloud2land.com

  3. #3

    Default

    Hi,

    Just tested here and that's not the problem, according to MySQL ref http://dev.mysql.com/doc/refman/5.6/en/load-data.html the REPLACE is in the wrong place, it should be LOAD DATA INFILE 'C:\Users\Administrateur\Desktop\BENCH\BULK' REPLACE INTO TABLE `bench` FIELDS...

    It's already been posted in Jira and was fixed as of PDI 4.2 http://jira.pentaho.com/browse/PDI-4877
    Regards,

    Mark, Cloud2Land

    http://www.cloud2land.com

  4. #4
    Join Date
    Jun 2011
    Posts
    11

    Default

    Ok, thanks a lot.

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.