Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Delete file step fails in Kitchen

  1. #1
    Join Date
    Apr 2006
    Posts
    7

    Question Delete file step fails in Kitchen

    Hi all,

    Let me start by saying that I'm a big fan of Kettle and congrats on a fantastic project.

    I've created a job that holds a few transformations that create some tables, do a query and create an Excel file. Finally I send the Excel file by mail, drop the temp tables and delete the created Excel file.

    Now when I run the job through the Spoon GUI everything seems to work as expected. When I run the same job through Kitchen it cannot seem to delete the Excel file.

    I'm running Kettle 2.5.0 on a Windows 2000 Adv. Server (!)

    Has anybody experienced the same problem? Any thoughts on solving it?

    TIA

    Arie

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

    Default

    Perhaps it would be easier if you posted the error message.

  3. #3
    Join Date
    Apr 2006
    Posts
    7

    Default Error message

    Point taken. Following is the error message.

    2007/05/10 10:09:03 - Delete file 1 - ERROR (version 2.5.0, build 25002 from 2007/05/04 00:20:04) : Could not delete file [file:///C:/temp/testfile_070510.xls], exception: Could not delete "file:///C:/temp/testfile_070510.xls".

    In addition to my previous post: this error happened while running the job in the Spoon GUI so the problem doesn't seem to be limited to Kitchen.

    FYI: the filename is set with a "Set environment variables" step and then used as a env variable in the "Delete file" step.

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

    Default

    Do you have permissions to delete the file?
    Is the file owned by another user on the system?

  5. #5
    Join Date
    Apr 2006
    Posts
    7

    Default

    I run Spoon under my account and the file is created with myself as owner. That account is also member of the administrators group. Since I can also delete the file manually I doubt this is an authorisation issue.

    I have noticed in the past that I was unable to delete a file created by Spoon (with another job/transformation) but at that time I got an error message saying the file was in use. After shutting down Spoon I was able to delete the file manually.

    Could the current issue be caused by the file being locked in some way by one ot the previous steps?

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

    Default

    It might be, yes. In that case, we have another bug to fix.
    Is the file created with the "Excel Output" step?

  7. #7
    Join Date
    Apr 2006
    Posts
    7

    Default

    Yes it is.

    Would you like me to post a test job so you can try to reproduce the problem?

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

    Default

    Yes, absolutely.

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

    Default

    I checked the source code and it does seem like we close the file approriately.
    Please note that if you open the file with any program it will be impossible to delete the file under Windows.

  10. #10
    Join Date
    Apr 2006
    Posts
    7

    Default

    Ok added the job and two transformations as attachment. I changed the source for the data to a "Get system info" step (so there are no connections needed)

    Of course you will have to change the e-mail adresses and server to match your test environment.

    HTH
    Attached Files Attached Files

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.