Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: shared objects file never works same between gui and command line?!

  1. #1

    Default shared objects file never works same between gui and command line?!

    I am working on a project which uses kettle transformations from the filesystem instead of a repository. This is done so that I have revision control and because I don't want to have to maintain a repository. Also, it was the recommendation of the trainer from pentaho we paid to train us on the product.

    I am using a shared objects file to store common db connections and such. I specify the location of the shared objects file in the transformation settings dialog.

    When I am in the UI, I can use variables in that field such as ${Internal.Transformation.Filename.Directory}/../shared/shared.xml, which work great and allow me to specify a relative path to the shared objects file. Unfortunately, those same variables don't function at all when I run pan from the command line, I guess because the variables aren't initialized prior to trying to read the shared objects file. The net result is that if I use such a relative path, I cannot use the transform in my production environment without editing it first. This makes deployment far too complex.

    SO next, I attempted to use regular environment variables. This works great when running from the shell - all the variables are populated with values and the reoslution of the file location works like a charm. The only problem within pan is that I don't seem to be able to construct a composite string, consisting of constants and environment vars - such as /path/to/base/directory/${SOME_VAR}/${SOME_OTHER_VAR}. But I can construct the string outside of pan and pass the entire thing as a variable, so that isn't too much of a problem. However, when I thern try to use the same transform from within the spoon gui, once again, the variables are not initialized correctly, so the shared objects file doesn't work within the gui, so again I'm left with the issue of having to edit the file before deployment.

    As a last resort, I decided to use the default location for the shared.xml file, which is ~/.kettle/shared.xml. I can use symlinks to different overrides in both dev and production environments, which isn't my ideal solution, but at least it won't require modifying files in order to deploy. However, when I tried this, it appears that once again only spoon finds the file in the default location. WHen I run from the shell, it doesn't find the shared.xml file in the default location, so my transforms still don't work.

    Is there ANY WAY to put a dynamic value in the shared objects file location which works exactly the same in both spoon and pan? The only thing that truly works identically is if I put a hardcoded path to the file in that field, but our dev and prodction environments are not even close to similar enough to allow a hardcoded path, so once again, I'm left with a solution that requires editing every single transform before deployment, which is just unacceptable from a maintenance and operational perspective.

    Thanks for your advice.


  2. #2
    Join Date
    May 2006


    I'll check tomorrow, raise a bug tracker. It should be fixed in 3.0


  3. #3
    Join Date
    Nov 1999


    That being said, I fixed a bug in 3.0 related to shared objects.
    The actual loading was commented out, probably because of the repository woes we had.
    Since I don't know what version Sam is on, I don't know if it applies.

  4. #4


    version 2.5

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.