Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Execute step to update table is slow.

  1. #1
    Join Date
    Mar 2014
    Posts
    181

    Default Execute step to update table is slow.

    I have an update statement that is running slow.

    Attached is the kettle transformation.

    I am using Penaho 5.0.1 AND Postgresql is my database application.

    item_ord_id, item_sg_id and item_sku_id have indexes on but the update statement is taking long to run.

    Is there an effecient approach I could take other than using the Execute sql step, please i need your advice.

    Thanks,

    Ron
    Attached Files Attached Files

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

    Default

    This KTR *SHOULDN'T* work at all.
    Using a Table Input step to execute an update statement is not how it's supposed to be done.

    This makes me think that you are only showing us part of the whole.


    Try doing:
    Table Input: Select shipmt_ord_id, shipmt_sg_id, Shipmt_iml_mfg_part, shipmt_iml_ship_qty, shipmt_iml_shp_frm_branch from rpt.dropship_shipments
    Connected to an Update Statement, configured to match the Stream Fields to the Table Fields and the Fields to be updated.
    Last edited by gutlez; 05-07-2014 at 04:18 PM.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  3. #3
    Join Date
    Mar 2014
    Posts
    181

    Default

    Quote Originally Posted by gutlez View Post
    This KTR *SHOULDN'T* work at all.
    Using a Table Input step to execute an update statement is not how it's supposed to be done.

    This makes me think that you are only showing us part of the whole.


    Try doing:
    Table Input: Select shipmt_ord_id, shipmt_sg_id, Shipmt_iml_mfg_part, shipmt_iml_ship_qty, shipmt_iml_shp_frm_branch from rpt.dropship_shipments
    Connected to an Update Statement, configured to match the Stream Fields to the Table Fields and the Fields to be updated.
    I will try it out and get back to you.

    Thanks,

    Ron

  4. #4
    Join Date
    Mar 2014
    Posts
    181

    Default

    Quote Originally Posted by Ron256 View Post
    I will try it out and get back to you.

    Thanks,

    Ron

    I tried it out and it worked.

    Thanks,

    Ron
    Attached Files Attached Files

  5. #5
    Join Date
    Apr 2008
    Posts
    4,685

    Default

    Ron,

    Did you notice that there's a step called "Update" which is intended to update rows?
    Execute SQL might not be the best way to do this.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  6. #6
    Join Date
    Mar 2014
    Posts
    181

    Default

    Quote Originally Posted by gutlez View Post
    Ron,

    Did you notice that there's a step called "Update" which is intended to update rows?
    Execute SQL might not be the best way to do this.
    Thanks for the information. I will also look at it.

    Thanks,

    Ron

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.