<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Context-Variables in DB-Connections? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239209#M27079</link>
    <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello, what you're going to want to do is configure the metadata to connect to your test environment, from there you press the "Export as context" button to convert the connection parameters into context variables for the metadata values. See the attached screen shots for what this will look like.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Thank you for your quick reply. 
&lt;BR /&gt;That is what I did - but that is not what I want. 
&lt;BR /&gt;Because the mechanism you showed does not make use of pre-existing context variables but creates a whole new context group which does not even know the contexts I have already defined. 
&lt;BR /&gt;If this "export to context" button is really the only way to deal with this, I am either not understanding the underlying principle of Talend contexts, or Talend does not use the context mechanism in an appropriate and intuitive fashion here. 
&lt;BR /&gt;Thank you 
&lt;BR /&gt;Matt</description>
    <pubDate>Thu, 27 Mar 2014 15:24:01 GMT</pubDate>
    <dc:creator>kleinmat</dc:creator>
    <dc:date>2014-03-27T15:24:01Z</dc:date>
    <item>
      <title>Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239205#M27075</link>
      <description>Hi everyone, 
&lt;BR /&gt;I am a Talend newbie who is just trying to build a little job connecting to an Oracle DB to pull out some data. Basic stuff &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 
&lt;BR /&gt;So here's what I have done since this morning: 
&lt;BR /&gt;1. Created a project 
&lt;BR /&gt;2. Created a context group in the metadata 
&lt;BR /&gt;3. Created a context for each system environment that job will later run (Test, Production etc.) 
&lt;BR /&gt;4. Created a set of suitable context variables (especially for the DB connection) 
&lt;BR /&gt;What I have been stuck with for the past few hours and could not resolve by reading manuals is this: 
&lt;BR /&gt;I created a DB-Connection in the Metadata-section of Talend, chose "Oracle with SID" as type and tried to use the already existing context variables. 
&lt;BR /&gt;But Talend wouldn't let me. 
&lt;BR /&gt;When I entered the connection data of my test environment directly into the text fields, I was successfully able to test the connection. 
&lt;BR /&gt;But when I then replaced the text field content with variables like 
&lt;BR /&gt;context.username 
&lt;BR /&gt;context.password 
&lt;BR /&gt;nothing worked anymore. It was not even possible to enter 
&lt;BR /&gt;context.port 
&lt;BR /&gt;into the "port" field 
&lt;BR /&gt;All I found was the option to "export as context". But when I did that, it would create a whole new context group, create new variable names and everything - and would disregard all the settings in "my" context group that was already created. 
&lt;BR /&gt;I find that very confusing. 
&lt;BR /&gt;My 2 questions to you are: 
&lt;BR /&gt;1. Have I generally set my project up properly? (Using global context groups, db-connections in the metadata etc.) 
&lt;BR /&gt;2. Is it even possible to use pre-existing context variables in a db connection? (If so: how?) 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Matt</description>
      <pubDate>Thu, 27 Mar 2014 13:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239205#M27075</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2014-03-27T13:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239206#M27076</link>
      <description>hi kleinmat,&lt;BR /&gt;what do you mean by "Talend don't let you".&lt;BR /&gt;You"re not able to write in filed or it give you any errors when trying to run the job ?&lt;BR /&gt;regards&lt;BR /&gt;laurent</description>
      <pubDate>Thu, 27 Mar 2014 14:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239206#M27076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-27T14:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239207#M27077</link>
      <description>Hello, what you're going to want to do is configure the metadata to connect to your test environment, from there you press the "Export as context" button to convert the connection parameters into context variables for the metadata values. See the attached screen shots for what this will look like. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDSn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155208iFD97A3CA8CAEDB6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDSn.png" alt="0683p000009MDSn.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDSs.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140449i4AA2D9B58C904AC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDSs.png" alt="0683p000009MDSs.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 27 Mar 2014 14:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239207#M27077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-27T14:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239208#M27078</link>
      <description>Thank you, kzone, for your quick reply. 
&lt;BR /&gt;What I meant is 
&lt;BR /&gt;a) that it is technically not even possible to enter something like context.port into the port text field (try it, it doesn't work) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 
&lt;BR /&gt;b) even if I enter the port as number but replace any other field with the name of the context variable, it does not work (as in "does not create a connection"). 
&lt;BR /&gt;Apparently, Talend does not use the context variables.</description>
      <pubDate>Thu, 27 Mar 2014 15:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239208#M27078</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2014-03-27T15:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239209#M27079</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello, what you're going to want to do is configure the metadata to connect to your test environment, from there you press the "Export as context" button to convert the connection parameters into context variables for the metadata values. See the attached screen shots for what this will look like.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Thank you for your quick reply. 
&lt;BR /&gt;That is what I did - but that is not what I want. 
&lt;BR /&gt;Because the mechanism you showed does not make use of pre-existing context variables but creates a whole new context group which does not even know the contexts I have already defined. 
&lt;BR /&gt;If this "export to context" button is really the only way to deal with this, I am either not understanding the underlying principle of Talend contexts, or Talend does not use the context mechanism in an appropriate and intuitive fashion here. 
&lt;BR /&gt;Thank you 
&lt;BR /&gt;Matt</description>
      <pubDate>Thu, 27 Mar 2014 15:24:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239209#M27079</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2014-03-27T15:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239210#M27080</link>
      <description>Hi kleinmat - after converting your DB connections to contexts or a context group, your new contexts are stored in the Talend repository. Next, you use the contexts on your DB input and output drums... To do this, you'd type those values in your DB properties (see screenshot - property set to built-in). 
&lt;BR /&gt;For your port in particular, make sure the data type of the context.port variable is integer... 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDSU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147921i271DCD37446FB362/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDSU.png" alt="0683p000009MDSU.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 27 Mar 2014 15:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239210#M27080</guid>
      <dc:creator>willm1</dc:creator>
      <dc:date>2014-03-27T15:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239211#M27081</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi kleinmat - after converting your DB connections to contexts or a context group, your new contexts are stored in the Talend repository. Next, you use the contexts on your DB input and output drums... To do this, you'd type those values in your DB properties (see screenshot - property set to built-in).&lt;BR /&gt;For your port in particular, make sure the data type of the context.port variable is integer...&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi willm, thank you very much for your reply. I have not actually taken a physical component to create my connection. Instead, I have tried to create a db connection in the metadata section of Talend. (see screenshot) 
&lt;BR /&gt;Is that the wrong way to approach the thing I am trying to do? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Matt 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDFg.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151320i5E39F6DD96B5CF92/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDFg.jpg" alt="0683p000009MDFg.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 27 Mar 2014 15:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239211#M27081</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2014-03-27T15:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239212#M27082</link>
      <description>Hi kleinmat. No it will work. But if you drag and drop your connection to a job I guess you will not get automatically the context var group also added to you job, this must be done manually - but that is not a big deal.</description>
      <pubDate>Thu, 27 Mar 2014 20:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239212#M27082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-27T20:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239213#M27083</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi kleinmat. No it will work. But if you drag and drop your connection to a job I guess you will not get automatically the context var group also added to you job, this must be done manually - but that is not a big deal.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Thanks for your reply. What do you mean by "it will work"? For me, it does not work. 
&lt;BR /&gt;When I create a DB connection (I used "Oracle with SID") and entered the information of my test environment, clicking "Check connection" results in a positive response. 
&lt;BR /&gt;But when I replace even only 1 single entry with the context variable I previously created (e.g. context.source_username), clicking "check" results in an error message. 
&lt;BR /&gt;And when I try to enter context.port into the port field, it does not even let me enter anything past context (pressing the . does not result a . showing up because apparently there is an input filter for that field) 
&lt;BR /&gt;Do I misunderstand the concept behind Talend in this scenario? 
&lt;BR /&gt;Or is this really not working in Talend at all? 
&lt;BR /&gt;Or am I doing something wrong? 
&lt;BR /&gt;Thank you 
&lt;BR /&gt;Matt</description>
      <pubDate>Fri, 28 Mar 2014 15:16:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239213#M27083</guid>
      <dc:creator>kleinmat</dc:creator>
      <dc:date>2014-03-28T15:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239214#M27084</link>
      <description>&lt;P&gt;i have same situation using context variable in my database connection but it doesn't work.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;error:&amp;nbsp;&amp;nbsp;Connection failure. You must change the Database Settings.&lt;BR /&gt;java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'context.JV_UAT_Server.userName'. ClientConnectionId:67d9089e-7a71-49cd-81e3-1390844e4a89&lt;BR /&gt;at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:204)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;First figure show a successful test connection without using context variables.&lt;/P&gt; 
&lt;P&gt;2nd show the context created.&lt;/P&gt; 
&lt;P&gt;Lastly the failed connection test using context variables.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Would you know what I may did wrong?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbTestSuccess.jpg" style="width: 744px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2oV.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147992i02498915B00EB50C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2oV.jpg" alt="0683p000009M2oV.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="contextServerConnection.jpg" style="width: 700px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2nE.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150376i87FD7B7E073C2DD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2nE.jpg" alt="0683p000009M2nE.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbTestConnectionFailed.jpg" style="width: 788px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2of.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131911iA522CFB5F402EF9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2of.jpg" alt="0683p000009M2of.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LuXl"&gt;dbTestSuccess.jpg&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Luiu"&gt;dbTestConnectionFailed.jpg&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lu9I"&gt;contextServerConnection.jpg&lt;/A&gt;</description>
      <pubDate>Wed, 27 Feb 2019 01:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239214#M27084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-27T01:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239215#M27085</link>
      <description>&lt;P&gt;Contexts are initialized at run time. I do not think you can add that to the Metadata section &amp;amp; test it out because they don't get initialized during that test.&amp;nbsp;For testing the connection you will need the absolute values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, you can add that to the metadata schema, use that schema as an input/ output and then test it out. It should work definitely.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 19:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239215#M27085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-27T19:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context-Variables in DB-Connections?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239216#M27086</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While on the subject on DB connections and contexts...&lt;/P&gt;
&lt;P&gt;Lets say I created 2 distinct Oracle connections which I exported as context.&lt;/P&gt;
&lt;P&gt;Is it possible to have a input parameter which would allow me to switch the connection on a given job?&lt;BR /&gt;&lt;BR /&gt;For instance, I have several databases that contain the same table name which I have to extract data. I would like to avoid recreating the same job for each databases because if the table changes, it will impact both jobs.&lt;BR /&gt;My goal would be to fetch data both databases by running the same job on using a parameter that would toggle source DB connection. Is this possible? Could someone provide the steps and/or screen prints as example?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 02:32:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-Variables-in-DB-Connections/m-p/2239216#M27086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-27T02:32:44Z</dc:date>
    </item>
  </channel>
</rss>

