<?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: Trimming a field in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/2001978#M4132</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your post to the Replicate Forums. Along with John's update here is the mapping of the WSTRING to the Redshift Data Type and the size.&amp;nbsp; This may explain why there is extra bytes on the Redshift Target.&lt;/P&gt;
&lt;TABLE class="TableStyle-tableGrid" cellspacing="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="BodyI--"&gt;
&lt;P&gt;WSTRING&lt;/P&gt;
&lt;/TD&gt;
&lt;TD class="BodyG--"&gt;
&lt;P&gt;If length is =&amp;gt; 1 and =&amp;lt; 65535, then:&lt;/P&gt;
&lt;P&gt;NVARCHAR (Length in Bytes)&lt;/P&gt;
&lt;P&gt;If length is =&amp;gt; 65536 and =&amp;lt; 2147483647, then:&lt;/P&gt;
&lt;P&gt;NVARCHAR (65535)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Bill&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 20:05:50 GMT</pubDate>
    <dc:creator>Bill_Steinagle</dc:creator>
    <dc:date>2022-11-08T20:05:50Z</dc:date>
    <item>
      <title>Trimming a field</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/1986045#M3766</link>
      <description>&lt;P&gt;I am using a File source.&lt;BR /&gt;Column in question is defined in Replicate a WSTRING(255)&lt;BR /&gt;&lt;BR /&gt;Target is Redshift&lt;BR /&gt;Also defined in Replicate as WSTRING(255), and in Redshift itself as varchar(765)&lt;BR /&gt;&lt;BR /&gt;Yet when the load executes, Redshift is throwing an error.&lt;BR /&gt;'String length exceeds DDL length'&lt;BR /&gt;&lt;BR /&gt;Now, I can see in the source file, that there are extra spaces added onto the end of a value for this column , which explains where the extra length is.&lt;BR /&gt;However ....&lt;BR /&gt;&lt;BR /&gt;If I am telling Replicate that the source is 255, shouldn't it either&amp;nbsp; throw an error when it reads the source file, or truncate the value before passing it to Redshift ?&lt;BR /&gt;Else what was the point of telling Replicate that the source fields is any length at all ?&lt;BR /&gt;&lt;BR /&gt;I am just surprised as to why the extra length is getting to Redshift at all ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 13:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/1986045#M3766</guid>
      <dc:creator>simonB2020</dc:creator>
      <dc:date>2022-09-27T13:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a field</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/1986103#M3767</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/144432"&gt;@simonB2020&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Not very sure why it's defined as&amp;nbsp;&lt;SPAN&gt;WSTRING(255) - it means NCHAR(255) in RDBMS. Anyway, you can use length() function to figure out the real length of the string. If it's padded by spaces, you may use trim() function to remove the unnecessary&amp;nbsp;spaces, like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1664291241440.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90034i5D72B5BCEFF294EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1664291241440.png" alt="john_wang_0-1664291241440.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This can be set in column level (table settings), or in &lt;A title="Global Transformation Rules" href="https://help.qlik.com/en-US/replicate/May2022/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/tasks_newTransRuleWiz.htm#Starting%20the%20Global%20Transformation%20Rules%20wizard" target="_blank" rel="noopener"&gt;Global Transformation Rules&lt;/A&gt;&amp;nbsp;of task "Global Rules...".&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 15:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/1986103#M3767</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2022-09-27T15:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a field</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/2001978#M4132</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your post to the Replicate Forums. Along with John's update here is the mapping of the WSTRING to the Redshift Data Type and the size.&amp;nbsp; This may explain why there is extra bytes on the Redshift Target.&lt;/P&gt;
&lt;TABLE class="TableStyle-tableGrid" cellspacing="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="BodyI--"&gt;
&lt;P&gt;WSTRING&lt;/P&gt;
&lt;/TD&gt;
&lt;TD class="BodyG--"&gt;
&lt;P&gt;If length is =&amp;gt; 1 and =&amp;lt; 65535, then:&lt;/P&gt;
&lt;P&gt;NVARCHAR (Length in Bytes)&lt;/P&gt;
&lt;P&gt;If length is =&amp;gt; 65536 and =&amp;lt; 2147483647, then:&lt;/P&gt;
&lt;P&gt;NVARCHAR (65535)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 20:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Trimming-a-field/m-p/2001978#M4132</guid>
      <dc:creator>Bill_Steinagle</dc:creator>
      <dc:date>2022-11-08T20:05:50Z</dc:date>
    </item>
  </channel>
</rss>

