Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Couldn't open file

  1. #1
    Join Date
    Mar 2014
    Posts
    181

    Default Couldn't open file

    Hi,

    I have a transfirmation that the reads a txt file and converts it into CSV and assigns it a file name with a time stamp.

    When I run the transformation, it cannot read the file but the file does exist.

    Also attached are the logs I am getting:

    Is this bug? How can I fix this?

    Thanks for your help.

    Thanks,

    Ron

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    The mistake is yours.

    When using JavaScript to set filepath to a string literal, a backslash is interpreted as an escape sequence introducer.
    Either you double your backslashes (\\) or you change your bad Windows habits

    Code:
    filepath = "C:\\Windows\\system32\\drivers\\etc\\hosts";
    filepath = "C:/Windows/system32/drivers/etc/hosts";
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Oct 2010
    Posts
    369

    Default u have a prob. before ur steps in ktr relating to setting up <info> tag check ur tag

    u have a prob. before ur steps in ktr relating to setting up <info> tag check ur tag .
    adding a new transformation which u can modify
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2014
    Posts
    181

    Red face

    Quote Originally Posted by marabu View Post
    The mistake is yours.

    When using JavaScript to set filepath to a string literal, a backslash is interpreted as an escape sequence introducer.
    Either you double your backslashes (\\) or you change your bad Windows habits

    Code:
    filepath = "C:\\Windows\\system32\\drivers\\etc\\hosts";
    filepath = "C:/Windows/system32/drivers/etc/hosts";
    Lesson learnt, thank you, I will give it a try.

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.