Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Usage of shared objects in non-standard location

  1. #1
    Join Date
    Jul 2010
    Posts
    10

    Default Usage of shared objects in non-standard location

    I am attempting to use shared objects for my connections in a group of jobs and transformations. I am not using a repository, but instead a set of .ktr and .kjb files. I have added a sharedObjects.xml file to the same directory. The sharedObjects.xml file looks like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <sharedobjects>
      <connection>
        <name>Source Connection - Parameterized</name>
        <server>${db.source.hostname}</server>
        <type>MSSQL</type>
        <access>Native</access>
        <database>${db.source.catalog}</database>
        <port>${db.source.port}</port>
        <username>${db.source.user}</username>
        <password>${db.source.password}</password>
        <servername/>
        <data_tablespace/>
        <index_tablespace/>
        <attributes>
          <attribute><code>EXTRA_OPTION_MSSQL.appName</code><attribute>${db.appname}</attribute></attribute>
          <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
          <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
          <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
          <attribute><code>MSSQL_DOUBLE_DECIMAL_SEPARATOR</code><attribute>N</attribute></attribute>
          <attribute><code>PORT_NUMBER</code><attribute>${db.source.port}</attribute></attribute>
          <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
          <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
          <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
        </attributes>
      </connection>
    </sharedobjects>
    I have changed all the jobs and transformations so that the XML files have a node like this for jobs:
    Code:
    <shared_objects_file>${Internal.Job.Filename.Directory}/sharedObjects.xml</shared_objects_file>
    and like this for transformations:
    Code:
    <shared_objects_file>${Internal.Transformation.Filename.Directory}/sharedObjects.xml</shared_objects_file>
    The problem is that neither spoon nor kitchen are recognizing that those shared connections exist.

    This is using PDI 3.2
    Last edited by stevedonie; 01-18-2011 at 05:26 PM.

  2. #2

    Default

    I have no help for you why spoon/kettle does not recognize the shared.xml. Have you tried newer PDI versions?

    I do not understand the pattern you use - scattering the configuration over different shared.xml in different directories (assuming you more than one directory).

    IMHO one of the main reasons to use shared.xml is to have an single point of configuration (combined with kettle.properties). Could you explain why do you tie shared.xml to the location where the ktr/kjb are?

    kind regards
    Max

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

    Default

    I remember a similar problem from the 3.2 days. I would search JIRA for it because it's probably fixed in some 3.2.x revision and certainly in 4.x.

  4. #4
    Join Date
    Jul 2010
    Posts
    10

    Default

    Ahh - we have been using 3.2.0 and I thought that was the latest of the 3.2 line. I happened to see when looking at the KFF project that there are 3.2.4 and 3.2.5 (at least) and it looks like going to 3.2.5 seems to have helped. The download page on Sourceforge needs to be updated to reflect reality I think. We haven't made the change to 4.0 yet because I haven't been able to come up with a way to verify that everything we have will work the same under 4.x as it does under 3.2.x

  5. #5
    Join Date
    Jul 2010
    Posts
    10

    Default

    The reason I am wanting to have the shared.xml in different directories is that I see the shared stuff as being shared only by each project and the jobs/transforms within it. I want to be able to develop a project in one environment, test it in another, and deploy it in a third. If part of the deploy process involves changing files in 3 different directories, or running scripts, etc., that adds cost and complexity. If everything is packaged together, I have more hope that changes to one project won't adversely affect another project.

    I think that the way the KFF project is going reflects my thoughts on "best practices" pretty well, and I'm going to start looking into using that.

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.