Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to go to the previous directory by using {Internal.Job.Filename.Directory} ?

  1. #1

    Default How to go to the previous directory by using {Internal.Job.Filename.Directory} ?

    How to go to the previous directory by using {Internal.Job.Filename.Directory} .... for example if the {Internal.Job.Filename.Directory} is C:\Pentaho_Lab\Test\ETL . so how I can store some file to the previous directory which is C:\Pentaho_Lab\Test by using the variable {Internal.Job.Filename.Directory}

  2. #2

    Default How to go to the previous directory by using {Internal.Job.Filename.Directory} ?

    How to go to the previous directory by using {Internal.Job.Filename.Directory} .... for example if the {Internal.Job.Filename.Directory} is C:\Pentaho_Lab\Test\ETL . so how I can store some file to the previous directory which is C:\Pentaho_Lab\Test by using the variable {Internal.Job.Filename.Directory}

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

    Default

    Learn about file system navigation using . (current directory) and .. (parent directory).

    ${Internal.Transformation.Filename.Directory}/.. == C:\Pentaho_Lab\Test
    So long, and thanks for all the fish.

  4. #4
    Join Date
    Feb 2017
    Posts
    23

    Default

    This doesn't work in the Database Name field.

    For example, if you set a variable DB_PATH to ${Internal.Transformation.Filename.Directory}/../db and then in the Database Name you try to use ${DB_PATH}/data.sqlite it will fail as it literally looks for C:/Pentaho_Lab/Test/ETL/../db/data.sqlite

    The strange part is, if you set a variable DATA_PATH to ${Internal.Transformation.Filename.Directory}/../data and in a CSV Input try to use ${DATA_PATH}/file.csv, it works and finds the file in C:/Pentaho_Lab/Test/data/file.csv


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.