Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Data loss at Table Input step with MySQL?

  1. #1

    Question Data loss at Table Input step with MySQL?

    Hi!

    I have to Unload a MySQL (5.1) database, and load it into an Oracle (10gR2) with PDI (4.0.1 - Win XP). The job runs fine, but I have some data loss because of number rounding.

    A use Table Input step to load the data from the MySQL table. (The SQL code is simple: SELECT * FROM..). When I hit the preview, the first some rows looks like this:
    sum euro kg
    4,9 3,7 1,1
    1,5 1,1 4,1
    16,1 12,4 17,5

    But if I execute the same SQL code from a MySQL Workbench, the result looks like this:
    sum euro kg
    4.872 3.737 1.133
    1.472 1.129 4.08
    16.148 12.386 17.453

    How can I get the full number format? What and why rounds? Where and how to set to not to do this?
    The connection is Native JDBC.

    Thanks in advance!
    Last edited by hose; 03-21-2011 at 06:59 AM. Reason: Formating table

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    That's just Java displaying the double precision numbers differently in String format.
    It only matters if you want to write the data to text format (CSV, XML and all).

  3. #3

    Default

    I use Oracle Bulk Loader to load the data, so I have to write the data to CSV.
    Is there any workaround to handle this problem?

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Just set a format mask in a "Select Values" step.

  5. #5

    Default

    Thanks Matt! It worked.
    Now I feel myself a bit dumm. I tried to operate with precision, but hasn't helped.

  6. #6

    Default

    Antoher question: at Select Values the Decimal column means what is the decimal separator? Am I right? Because I set comma (,) and don't want to work, still uses a dot(.).

Tags for this Thread

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.