Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Look up problems

  1. #1

    Default Look up problems

    I have this scenario:
    3 table CUSTOMER, VEHICLE, VEHICLECUSTOMER
    Within a trasformation i get info by XML and store it in these table.
    The flow store first the customer info than the vehicle and for last the vehiclecustomer
    When i try to store information on VEHICLECUSTOMER table i perform a look up on CUSTOMER and VEHICLE table in order to get the CUSTOMER.id and the VEHICLE.id.
    Randomically i have errors because the look up return null but CUSTOMER.id
    and VEHICLE.id must be not null on VEHICLECUSTOME.
    How can i solve this simple problem?
    There is a workaround?
    Thanks in advance for any help

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Are the Vehicles and Customers for the relations only in the XML, or can the relations be from other Vehicles or Customers in the DB?

    How I would do it:

    Use a job:
    Transform 1: Load Customers
    Transform 2: Load Vehicles
    Transform 3: Load VEHCUST Relations

  3. #3

    Default

    Thanks gutlez.
    I explain better the situation:
    I don't have relations in XML, i use it only to exstract information.
    I have relations on DB.
    The table VEHICLECUSTOMER contains two foreign key idcustomer and idvehicle. The parent key are the id of CUSTOMER and id of VEHICLE. I have to manage the loading in transactional mode. If i make a javascript alert prior to start the loading of VEHICLECUSTOMER, the transaction go right because seems that kettle have the right time to insert the id in CUST and VEHIC. But without js alert i have an error because the lookup to get the id return null and i have an error when try to insert null on idvehicle or idcustomer.
    If i manage this scenario with a job, how you suggest, i risk to have a DB in non concrete status because if something fail on the job to load CUSTOMERVEHICLE association i have the CUSTOMER, i have the VEHICLE but i don't have the association. It's not transactional.
    How can i solve this problem?, there is some task to guarantee that the previus step in a trasformation are ended?
    Thanks a lot for any 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.