<?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 Insert/update CSV files to database (MySQL char limit/  last table text garbled) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251294#M35296</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I wanted to use CSV to insert/update DB record (using dynamic schema)&amp;nbsp; with the following job design.&lt;/P&gt; 
&lt;P&gt;(Insert and Update Record will shared the same 1st job design)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;**the 1st job has a problem, so I will only explain this one.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;**If there's a way to directly update a record (with dynamic schema), please let me know.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;FYI, the input source will be from CSV and there's also original source in MSSQL while the final output should be in MySQL DB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Insert/Create New Record from CSV&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CSV Input" style="width: 637px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9gO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145023iB7B8AF44E1FB81C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9gO.png" alt="0683p000009M9gO.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;CSV Input&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;However, there are two major problems here (insert case).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) When I set the tDBOutput as MySQL, the row limit error occurred.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&lt;FONT color="#800000"&gt;Exception in component tDBOutput_1 (Data_Update1)
java.sql.SQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;columns to TEXT or BLOBs&lt;/FONT&gt;&lt;/PRE&gt; 
&lt;P&gt;Is there a way to make it work in MySQL?&lt;/P&gt; 
&lt;P&gt;Some columns has 1000 characters while Talends only allows 100-255 characters per column.&lt;/P&gt; 
&lt;P&gt;Is there a way to dynamically set the column character limit? or make it all 1000 characters/column?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) When I set tDBOutput to MSSQL, there's no problem with character limit.&lt;/P&gt; 
&lt;P&gt;However the &lt;STRONG&gt;last table's text data is not encoding properly, resulting in garbled text&lt;/STRONG&gt;.&amp;nbsp; Encoding is already set to UTF-8.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="encoding setting" style="width: 588px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9jb.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138147i82704338271842DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9jb.png" alt="0683p000009M9jb.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;encoding setting&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When trying the update, primary key(in my case, a compose pk and pk fields) is needed, however, I do not know how I can set PK dynamically, like how dynamic column is.&amp;nbsp;&lt;BR /&gt;Does anyone know how to do so?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Right now, I'm working on a lengthy way to update record as the following:&lt;/P&gt; 
&lt;P&gt;1st Job: create and store record in temp DB&lt;/P&gt; 
&lt;P&gt;2nd Job: inject constraint into temp DB's tables&lt;/P&gt; 
&lt;P&gt;3rd job: migrate to real DB&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If there's better way than this, please let me know.&lt;/P&gt; 
&lt;P&gt;And if there's anything unclear please let me know.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:58:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T02:58:22Z</dc:date>
    <item>
      <title>Insert/update CSV files to database (MySQL char limit/  last table text garbled)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251294#M35296</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I wanted to use CSV to insert/update DB record (using dynamic schema)&amp;nbsp; with the following job design.&lt;/P&gt; 
&lt;P&gt;(Insert and Update Record will shared the same 1st job design)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;**the 1st job has a problem, so I will only explain this one.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;**If there's a way to directly update a record (with dynamic schema), please let me know.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;FYI, the input source will be from CSV and there's also original source in MSSQL while the final output should be in MySQL DB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Insert/Create New Record from CSV&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CSV Input" style="width: 637px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9gO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145023iB7B8AF44E1FB81C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9gO.png" alt="0683p000009M9gO.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;CSV Input&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;However, there are two major problems here (insert case).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) When I set the tDBOutput as MySQL, the row limit error occurred.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&lt;FONT color="#800000"&gt;Exception in component tDBOutput_1 (Data_Update1)
java.sql.SQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;columns to TEXT or BLOBs&lt;/FONT&gt;&lt;/PRE&gt; 
&lt;P&gt;Is there a way to make it work in MySQL?&lt;/P&gt; 
&lt;P&gt;Some columns has 1000 characters while Talends only allows 100-255 characters per column.&lt;/P&gt; 
&lt;P&gt;Is there a way to dynamically set the column character limit? or make it all 1000 characters/column?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) When I set tDBOutput to MSSQL, there's no problem with character limit.&lt;/P&gt; 
&lt;P&gt;However the &lt;STRONG&gt;last table's text data is not encoding properly, resulting in garbled text&lt;/STRONG&gt;.&amp;nbsp; Encoding is already set to UTF-8.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="encoding setting" style="width: 588px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9jb.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138147i82704338271842DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9jb.png" alt="0683p000009M9jb.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;encoding setting&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When trying the update, primary key(in my case, a compose pk and pk fields) is needed, however, I do not know how I can set PK dynamically, like how dynamic column is.&amp;nbsp;&lt;BR /&gt;Does anyone know how to do so?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Right now, I'm working on a lengthy way to update record as the following:&lt;/P&gt; 
&lt;P&gt;1st Job: create and store record in temp DB&lt;/P&gt; 
&lt;P&gt;2nd Job: inject constraint into temp DB's tables&lt;/P&gt; 
&lt;P&gt;3rd job: migrate to real DB&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If there's better way than this, please let me know.&lt;/P&gt; 
&lt;P&gt;And if there's anything unclear please let me know.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251294#M35296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T02:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Insert/update CSV files to database (MySQL char limit/  last table text garbled)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251295#M35297</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQspAAG"&gt;@crotmn&lt;/A&gt;&amp;nbsp;, have you verified below link?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCtMTCA0" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/MySQLSyntaxErrorException-Row-size-too-large/td-p/63404&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 02:56:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251295#M35297</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-03-17T02:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Insert/update CSV files to database (MySQL char limit/  last table text garbled)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251296#M35298</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Yes, I did.&lt;BR /&gt;It works fine when migrating database from MSSQL to MySQL, however it doesn't work when importing from CSV...&lt;BR /&gt;Is there anyway to make this work? I think I heard about setting single row, but to be honest I'm not sure how that works.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For you reference, this is an error when I tried to import a single CSV to database.&lt;/P&gt; 
&lt;PRE&gt;Exception in component tDBOutput_1 (testconnection)
java.sql.BatchUpdateException: Data truncation: Data too long for column 'comment' at row 14
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2020 03:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-update-CSV-files-to-database-MySQL-char-limit-last-table/m-p/2251296#M35298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-17T03:17:58Z</dc:date>
    </item>
  </channel>
</rss>

