<?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: ELT Components with mutiple connections in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295005#M147022</link>
    <description>Thanks Sabrina, these are the components I am referring to. 
&lt;BR /&gt;Okay, I managed to make it work with multiple connections, but the update SQL that is generated is hogwash.&amp;nbsp; It is generating the SQL like the following: 
&lt;BR /&gt; 
&lt;PRE&gt;UPDATE TargetTableName&lt;BR /&gt;SET ColumnName = (&lt;BR /&gt;&amp;nbsp; SELECT StagingColumnName&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM Stage.StagingTable StagingAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT OUTER JOIN Target.TargetTableName TargetAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON TargetAlias.SourceId = StagingAlias.SourceId&lt;BR /&gt;&amp;nbsp;&amp;nbsp; WHERE TargetAlias.PrimaryKey IS NOT NULL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND StagingAlias.SourceTimeStamp &amp;gt; ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; NextColumnName = (&lt;BR /&gt;&amp;nbsp; SELECT NextStagingColumnName&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM Stage.StagingTable StagingAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT OUTER JOIN Target.TargetTableName TargetAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON TargetAlias.SourceId = StagingAlias.SourceId&lt;BR /&gt;&amp;nbsp;&amp;nbsp; WHERE TargetAlias.PrimaryKey IS NOT NULL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND StagingAlias.SourceTimeStamp &amp;gt; ),&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;...etc. 
&lt;BR /&gt;What I would expect to see would be: 
&lt;BR /&gt; 
&lt;PRE&gt;UPDATE Target.TargetTableName &lt;BR /&gt; &amp;nbsp; SET ColumnName = StagingAlias.StagingColumnName,&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; NextColumnName = StagingAlias.NextStagingColumnName,&lt;BR /&gt;	 &amp;nbsp; ...etc&lt;BR /&gt;FROM Staging.StagingTableName StagingAlias&lt;BR /&gt; &amp;nbsp;LEFT OUTER JOIN Target.TargetTableName TargetAlias&lt;BR /&gt; &amp;nbsp; &amp;nbsp;ON TargetAlias.SourceId = StagingAlias.SourceId&lt;BR /&gt;WHERE TargetAlias.PrimaryKey IS NOT NULL&lt;BR /&gt; &amp;nbsp;AND StagingAlias.SourceTimestamp &amp;gt; &lt;/PRE&gt; 
&lt;BR /&gt;The current generated SQL (this is specifically an MS SQL component constantly generates failures because is try's to update a NULL value to the target table when there is a null constraint on that column.&amp;nbsp; The current WHERE clause brings back 0 records, so nothing should be inserted or updated.&amp;nbsp; I am at the point where I feel like I need to modify yet another 6.3.1 component. 
&lt;BR /&gt;Any suggestions? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Scott</description>
    <pubDate>Wed, 08 Feb 2017 18:05:32 GMT</pubDate>
    <dc:creator>TXAggie00</dc:creator>
    <dc:date>2017-02-08T18:05:32Z</dc:date>
    <item>
      <title>ELT Components with mutiple connections</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295003#M147020</link>
      <description>I have a question regarding ELT and Talend.&amp;nbsp; Having worked with many ETL tools (Informatica, SAP Data Services, SSRS, etc), I have always tried to design jobs using as much ELT as possible to lighten the load on the job servers and push down as much logic to the database as possible.&amp;nbsp; I am currently working on a project where the client has Talend (subscription not open studio) with a MS SQL Server ODS.&amp;nbsp; I am having a bit of an issue with the ELT components and the different connections.&amp;nbsp; I have three different connections to SQL Server for the different databases and different schemas (all on the same server and instance, but the architect is very schema-happy).&amp;nbsp; All the db metadata is setup using context variables for the different environments.&amp;nbsp; Is it possible to use the ELT components with the different connections?&amp;nbsp; The current setup I have is a very common scenario.&amp;nbsp; I have a stage table in the staging database/schema which I filter based on incremental logic.&amp;nbsp; I also have my target table which I left outer to the staging to get my inserts/updates.&amp;nbsp; Unfortunately I only have the option to select one connection in the ELTMap component.&amp;nbsp; As a work-around to that limitation, I setup the flow to load a data transfer table (Staging table with filtered, incremental results creates a table in the same database/schema as the target, which I drop in the postjob flow), but I am getting errors because the ELT components don't fully qualify the tables with the schema specified in the connection.&amp;nbsp; I realize I can do this using my own query using standard DBInput/DBOutput components and use the globalMap to get the schema/database of the two connection to make it dynamic (or heck, even use an SP if SQL code is the only route), but this seems counter-intuitive for an ETL tool.&amp;nbsp; Am I missing something obvious? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Scott 
&lt;BR /&gt;FYI, we are using 6.3.1, which we have already found a bug in the tMSSqlOutput component, so it may be a bug in the tELTMSSqlMap component that is doesn't qualify the tables.&amp;nbsp; We ended up having to create a custom component for tMSSqlOutput using the 6.2.1 version of the same component.</description>
      <pubDate>Sat, 16 Nov 2024 10:06:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295003#M147020</guid>
      <dc:creator>TXAggie00</dc:creator>
      <dc:date>2024-11-16T10:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: ELT Components with mutiple connections</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295004#M147021</link>
      <description>Hi,&lt;BR /&gt;&amp;nbsp;t&amp;lt;DB&amp;gt;ELT components are some what related to Extract-Load-Transform (ELT) method while t&amp;lt;DB&amp;gt;xxx is related to Extract-Transform-Load method (ETL).&lt;BR /&gt;The difference is that the operation of t&amp;lt;DB&amp;gt;ELT component is available inside a database.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Wed, 08 Feb 2017 07:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295004#M147021</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T07:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: ELT Components with mutiple connections</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295005#M147022</link>
      <description>Thanks Sabrina, these are the components I am referring to. 
&lt;BR /&gt;Okay, I managed to make it work with multiple connections, but the update SQL that is generated is hogwash.&amp;nbsp; It is generating the SQL like the following: 
&lt;BR /&gt; 
&lt;PRE&gt;UPDATE TargetTableName&lt;BR /&gt;SET ColumnName = (&lt;BR /&gt;&amp;nbsp; SELECT StagingColumnName&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM Stage.StagingTable StagingAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT OUTER JOIN Target.TargetTableName TargetAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON TargetAlias.SourceId = StagingAlias.SourceId&lt;BR /&gt;&amp;nbsp;&amp;nbsp; WHERE TargetAlias.PrimaryKey IS NOT NULL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND StagingAlias.SourceTimeStamp &amp;gt; ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; NextColumnName = (&lt;BR /&gt;&amp;nbsp; SELECT NextStagingColumnName&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM Stage.StagingTable StagingAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT OUTER JOIN Target.TargetTableName TargetAlias&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON TargetAlias.SourceId = StagingAlias.SourceId&lt;BR /&gt;&amp;nbsp;&amp;nbsp; WHERE TargetAlias.PrimaryKey IS NOT NULL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND StagingAlias.SourceTimeStamp &amp;gt; ),&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;...etc. 
&lt;BR /&gt;What I would expect to see would be: 
&lt;BR /&gt; 
&lt;PRE&gt;UPDATE Target.TargetTableName &lt;BR /&gt; &amp;nbsp; SET ColumnName = StagingAlias.StagingColumnName,&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; NextColumnName = StagingAlias.NextStagingColumnName,&lt;BR /&gt;	 &amp;nbsp; ...etc&lt;BR /&gt;FROM Staging.StagingTableName StagingAlias&lt;BR /&gt; &amp;nbsp;LEFT OUTER JOIN Target.TargetTableName TargetAlias&lt;BR /&gt; &amp;nbsp; &amp;nbsp;ON TargetAlias.SourceId = StagingAlias.SourceId&lt;BR /&gt;WHERE TargetAlias.PrimaryKey IS NOT NULL&lt;BR /&gt; &amp;nbsp;AND StagingAlias.SourceTimestamp &amp;gt; &lt;/PRE&gt; 
&lt;BR /&gt;The current generated SQL (this is specifically an MS SQL component constantly generates failures because is try's to update a NULL value to the target table when there is a null constraint on that column.&amp;nbsp; The current WHERE clause brings back 0 records, so nothing should be inserted or updated.&amp;nbsp; I am at the point where I feel like I need to modify yet another 6.3.1 component. 
&lt;BR /&gt;Any suggestions? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Scott</description>
      <pubDate>Wed, 08 Feb 2017 18:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295005#M147022</guid>
      <dc:creator>TXAggie00</dc:creator>
      <dc:date>2017-02-08T18:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: ELT Components with mutiple connections</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295006#M147023</link>
      <description>I ended up modifying the existing component and creating a custom component.&amp;nbsp; The only component I modified was the ELTMSSqlOutput component, but in the future, in order to make this correction optional, I may need to touch the other two components. 
&lt;BR /&gt;If anyone is interested here are the two corrections I made to tELTMSSqlOutput_main.javajet: 
&lt;BR /&gt; 
&lt;PRE&gt;// Line 285 - 304: &amp;nbsp;Two lines weere modified: line 288, the updatesSetStmt and line 303, the updateQuery variable creation&lt;BR /&gt;		}else{&lt;BR /&gt;			insertColName.append(colStmt.getName()+suffix);&lt;BR /&gt;			insertValueStmt.append(colStmt.getValue()+suffix);	&lt;BR /&gt;			updateSetStmt.append(colStmt.getName()+"=\"+routines.system.StringUtils.splitSQLColumns(selectQueryColumnsName)+\"" +suffix);&lt;BR /&gt;		}&lt;BR /&gt;	}&lt;BR /&gt;	counterOuter ++;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;	if(("INSERT").equals(dataAction)){&lt;BR /&gt;%&amp;gt;	&lt;BR /&gt;	String insertQuery = "INSERT INTO "+tableName_&amp;lt;%=cid%&amp;gt;+"(&amp;lt;%=insertColName.toString()%&amp;gt;) &amp;nbsp;("+select_query+")";&lt;BR /&gt;	pstmt_&amp;lt;%=cid %&amp;gt; = conn_&amp;lt;%=cid%&amp;gt;.prepareStatement(insertQuery);&lt;BR /&gt;&amp;lt;%&lt;BR /&gt;	}else if (("UPDATE").equals(dataAction)){&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;	String updateQuery = "UPDATE "+tableName_&amp;lt;%=cid%&amp;gt;+" SET &amp;lt;%=updateSetStmt.toString()%&amp;gt; " + select_query.substring(select_query.indexOf("FROM"), select_query.length()).trim();&lt;BR /&gt;	pstmt_&amp;lt;%=cid %&amp;gt; = conn_&amp;lt;%=cid%&amp;gt;.prepareStatement(updateQuery);&lt;/PRE&gt; 
&lt;BR /&gt;The other caveat was that in the properties for this component, "Default Schema Name" should be an empty String and "Use different table name" should be check and the name of the alias table used in the map should be used here. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Scott</description>
      <pubDate>Thu, 09 Feb 2017 16:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295006#M147023</guid>
      <dc:creator>TXAggie00</dc:creator>
      <dc:date>2017-02-09T16:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: ELT Components with mutiple connections</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295007#M147024</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you please explain how you were able to manage to make it work for multiple connections ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a similar scenario where the source and target connections are different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prajwala&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 16:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2295007#M147024</guid>
      <dc:creator>prajwalagurram</dc:creator>
      <dc:date>2019-06-27T16:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: ELT Components with mutiple connections</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2484222#M147025</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You're right when you say that in ELTMap, Talend only supports one connection, and depending on the size of multiple databases or schemas being used, it could be a problem. One solution might be to generate a fully qualified table name by embedding context variables within an ELT component to qualify a schema. Otherwise, making use of DBInput/DBOutput components or even stored procedures might allow for better control over SQL logic, even if it is not totally ELT-driven.&lt;/P&gt;
&lt;P&gt;It could also be a bug in version 6.3.1, so an upgrade or a message to Talend support will help. More insight into ELT processes can be found here, an article on optimizing ELT pipelines; you may find this helpful: &lt;A href="https://hevodata.com/learn/elt-pipeline/" target="_blank" rel="noopener"&gt;ELT Pipeline.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 02:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ELT-Components-with-mutiple-connections/m-p/2484222#M147025</guid>
      <dc:creator>Divija_Agrawal</dc:creator>
      <dc:date>2024-09-30T02:56:03Z</dc:date>
    </item>
  </channel>
</rss>

