Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: CSV to mysql table : rows added but never updated

  1. #1
    Join Date
    Sep 2008
    Posts
    12

    Default CSV to mysql table : rows added but never updated

    Hi,

    I have to make a data warehouse for my company and I want to transform a CSV file and put it into a mySQL table.

    I have made a fields mapping but when I execute it :

    1- the first time all rows are added.
    2 - I try to change 1 row in the csv File
    3 - 1 execute a new time.
    4 -
    result are :

    2008/09/22 13:06:25 - Extraction depuis fichier CSV.0 - Finished processing (I=1791, O=0, R=0, W=1790, U=0, E=0)
    2008/09/22 13:06:25 - Sélection valeurs.0 - Finished processing (I=0, O=0, R=1790, W=1790, U=0, E=0)
    2008/09/22 13:06:29 - Insertion / Mise à jour table.0 - Finished processing (I=1790, O=1, R=1790, W=1790, U=0, E=0)
    2008/09/22 13:06:29 - Spoon - The transformation has finished!!

    O=1 : I think that means i ve change 1 row...

    but U=0 ... nothing is changed in my db

    (Ktr file joined)

    any idea, why ?

    Thank you

    Olivier
    Last edited by olivgiov; 09-23-2008 at 04:30 AM.

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

    Default

    Because you didn't list any fields to update. (you only specified the primary key fields ADVERTISERPRODUCTID and PRODUCTNAME. So in effect there can never be any update in that table.

  3. #3
    Join Date
    Sep 2008
    Posts
    12

    Default

    thanks for your response.

    But take a look on the screenshot (joined file)

    Update fields are :

    - ADVERTISERPRODUCTID
    - PRODUCTNAME

    and both are on update=Y

    Maybe i haven't understood what you told me

    Thank you
    Olivier
    Attached Images Attached Images  

  4. #4

    Default

    Hi olivgiov,

    the KEY is used to find the one row that fits. If a row is found (matchs the key) then all value fields are updated.
    If your value fields are only the key fields - what should be updated? The matching key is equal, identical, the same, ...

    Christoph
    21 is only half the truth

  5. #5
    Join Date
    Sep 2008
    Posts
    12

    Default

    Ok thank you a lot
    I have understood, it s working now


    Olivier

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.