Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: How to delete rows from SQL server tables based on Date

  1. #1

    Question How to delete rows from SQL server tables based on Date

    Can anyone shed some light on how can I delete rows from a SQL Server table by using pentaho integration services.

  2. #2
    Join Date
    Nov 2008
    Posts
    107

    Default

    Hi,

    You can delete the rows by using data validator or Filter Rows.
    Regards:

    Kaberi

  3. #3
    Join Date
    Sep 2007
    Posts
    834

    Default

    I think he meant deleting from the DB, not from the transformation stream.
    Basicaly, you have to use the Delete step (Output category of steps)
    If you provided an example of what you're trying to do, we could help with a better explanation,

  4. #4

    Default

    In a SQL server table I will need to delete data older than 30 day. I will have to run that job every night once.
    So, I was thinking if I will need to choose > Input Table + Delete or could I use SQL Scripts. Or, what should be my options?

  5. #5

    Default

    @@ Maria Carina Roldan,
    I bought your book. Can you tell me which chapter should I follow to do this task?
    My email id is pavelcc@gmail.com. If there are any events please mail me here as well. Thank you.
    Pavel

  6. #6
    Join Date
    Sep 2007
    Posts
    834

    Default

    Hi, Pavel,
    I'm glad to hear it! You'll find how to delete records in chapter 8.

    If you simply have to delete all data with date<=today-30, you could use a SQL script.
    For more complex use cases, you have to build a stream with the values that will make the conditions for deleting, and end the stream with a Delete step,

  7. #7

    Default

    I got it now. It needs input table + Output Delete.
    Thanks both of you for your responses. I found you guys quite helpful. Thank you.
    Pavel

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.