Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Insert/Update steps linked (error)

  1. #1
    Join Date
    Apr 2009

    Default Insert/Update steps linked (error)


    I will try to explain the problem I'm getting:
    - I have configured the connection to PostgreSQL database (it works fine).
    - I'm creating a simple transformation
    Step1 (CSV file input): parse values from CSV file [OK]
    Step2 (Insert/Update): insert some registers to HOUSE table [OK]
    Step3 (Insert/Update): insert some registers to PERSON table [FAIL]

    Suppose the PERSON have a foreign key (house) referencing one field of HOUSE.

    - id
    - name

    - id
    - house

    If in Step2 I insert for example
    INSERT INTO HOUSE VALUES ('112233', 'myHouse');

    and then in Step3 I try to insert a record referencing the previously created record
    INSERT INTO PERSON VALUES ('John', '112233');

    the transformation launch an error:
    ERROR: insert or update on table "PERSON" violates foreign key constraint "owner" Detail: Key (id)=(112233) is not present in table "HOUSE".

    It seems the register isn't inserted when the Step3 tries to reference it.
    But the register (112233, myHouse) is on HOUSE table.

    I have tried putting a "Blocking step" between them, but it doesn't work.

    Thanks in advance.


  2. #2



    you should made the transformation transactionnal (see transformation settings).
    Using one connection should help.



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.