Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Connections in file repository keeps embedded in .ktr

  1. #1

    Question Connections in file repository keeps embedded in .ktr

    Hello,

    I'm using a file repository, if I create a conection in Tools->Repository->Explore->Connections this creates a .kdb file with all the connections string. Create 2 connections, "SOURCE" and "DESTINATION".

    Now use those connections created there in a new transformatio, for this example create a input table step and use the "SOURCE" connection, use output table step and use the "DESTINATION" connection. and save it.

    Now open the .ktr file with some text editor and you will see there is a <connection> node inside with all the connection strings (host, port, user name, password, etc) embedded on the file.

    Now edit those connections on
    Tools->Repository->Explore->Connections and change something (like the server host) and save it.

    Now open again the .ktr file and you will see the embedded "old" strings are the same, not changed, but the transformation works, pointing to the new host (or using any other change you made on the connection .kdb file).

    This is normal? Is just a visualization error?

    I have tested this in PDI
    5.3.0.0-213 CE and EE editions, and 6.0.1.0-386 CE (all with file repository).

    Any idea?

    Thanks!

  2. #2
    Join Date
    Apr 2014
    Posts
    18

    Default

    Did you share the connection the first time when you created it?

    Quote Originally Posted by garsan View Post
    Hello,

    I'm using a file repository, if I create a conection in Tools->Repository->Explore->Connections this creates a .kdb file with all the connections string. Create 2 connections, "SOURCE" and "DESTINATION".

    Now use those connections created there in a new transformatio, for this example create a input table step and use the "SOURCE" connection, use output table step and use the "DESTINATION" connection. and save it.

    Now open the .ktr file with some text editor and you will see there is a <connection> node inside with all the connection strings (host, port, user name, password, etc) embedded on the file.

    Now edit those connections on
    Tools->Repository->Explore->Connections and change something (like the server host) and save it.

    Now open again the .ktr file and you will see the embedded "old" strings are the same, not changed, but the transformation works, pointing to the new host (or using any other change you made on the connection .kdb file).

    This is normal? Is just a visualization error?

    I have tested this in PDI
    5.3.0.0-213 CE and EE editions, and 6.0.1.0-386 CE (all with file repository).

    Any idea?

    Thanks!

  3. #3

    Default

    Hello shailesh10,

    These connections are not shared, are connections inside the repository, they dont live in the Shared.xml file and for some reason the stayed "pasted" on every ktr / jkb file when the user exported the enterprise repository to file repository instead of creating kdb files.

    Thank you!

    Quote Originally Posted by shailesh10 View Post
    Did you share the connection the first time when you created it?

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    All KTR files (either inside or outside a file repository) are supposed to be capable of being run with no other information.
    Therefore they HAVE to have connections in them.

    I've never seen a KDB file, but it sounds like it overrides values that are in a KTR, which means that's one more step to keep in mind for troubleshooting.

  5. #5

    Default

    Hello, a .kdb file is a connection, in the 'same' way as Shared.xml but in this case you can have this connection (every connection is a .kdb file, if you create 10 connections you have 10 .kdb files) for the entire repository without to use the Shared.xml file.

    I don't know if it 'overrides' the connection on the .ktr, but when you use this kind of connections, on the .ktr you can find a section for this.

    Ok, now, if every .ktr must be capable of run in/outside of a repository, how do you manage those connections.

    Imagine this scenario, you have a user who set a connection to server1 and uses a user and a password, then other user create another connection to the same server with other credentials, and for some reason the first connection expires the credentials, and you have to change ir on 100 .ktr file, right?

    Thanks.


    Quote Originally Posted by gutlez View Post
    All KTR files (either inside or outside a file repository) are supposed to be capable of being run with no other information.
    Therefore they HAVE to have connections in them.

    I've never seen a KDB file, but it sounds like it overrides values that are in a KTR, which means that's one more step to keep in mind for troubleshooting.

  6. #6
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by garsan View Post
    Ok, now, if every .ktr must be capable of run in/outside of a repository, how do you manage those connections.

    Imagine this scenario, you have a user who set a connection to server1 and uses a user and a password, then other user create another connection to the same server with other credentials, and for some reason the first connection expires the credentials, and you have to change ir on 100 .ktr file, right?
    Two well known solutions:
    1) JNDI
    2) User variables in the connection definition for Username, Password, Host, DBName, and set them in the kettle.properties file.

    If you use either one of those solutions, when User1's credentials change, you don't need to touch the KTRs, only the JNDI definition or the kettle.properties file.

Tags for this Thread

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.