<?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: set up a global rule to replace '' with ' ' in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2433076#M10242</link>
    <description>&lt;P&gt;It seems to me if there are both global rule and table transformation presented, then the global rule will not be executed?&amp;nbsp; Please confirm.&amp;nbsp; Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 22:17:10 GMT</pubDate>
    <dc:creator>RichJ</dc:creator>
    <dc:date>2024-03-20T22:17:10Z</dc:date>
    <item>
      <title>set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2431538#M10162</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt;
&lt;P&gt;I have a large number of tables with some column data type "STRING(1)", where we need to ensure if the value is '' (empty space) then re-set it as ' ' (one space).&lt;/P&gt;
&lt;P&gt;It can be done by individual table transformation; but it world be idea to setup a global rule to achieve it. I tried numerous cases for global rules&amp;nbsp; like below, but none worked out -&lt;/P&gt;
&lt;P&gt;case &lt;BR /&gt;&amp;nbsp; &amp;nbsp;when $AR_M_SOURCE_DATATYPE_NAME = 'STRING' and $AR_M_SOURCE_DATATYPE_LENGTH = 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and $AR_M_SOURCE_COLUMN_NAME =''&lt;BR /&gt;&amp;nbsp; &amp;nbsp;THEN $AR_M_SOURCE_COLUMN_NAME = ' '&lt;BR /&gt;&amp;nbsp; &amp;nbsp;ELSE $AR_M_SOURCE_COLUMN_NAME&lt;BR /&gt;END&lt;/P&gt;
&lt;P&gt;Appreciate the help,&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 17:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2431538#M10162</guid>
      <dc:creator>RichJ</dc:creator>
      <dc:date>2024-03-16T17:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2431552#M10163</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/152714"&gt;@RichJ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to Qlik Community!&lt;/P&gt;
&lt;P&gt;Not sure what's the source/target DBs types and the exact datatype in the table, so let's focus on the Global Transformation in Qlik Replicate now. Below is a sample:&lt;/P&gt;
&lt;P&gt;1. New a Global&amp;nbsp;&lt;SPAN class="checkboxInnerSpan"&gt;Transformation rule "&lt;FONT face="courier new,courier"&gt;Replace column value&lt;/FONT&gt;" &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="checkboxInnerSpan"&gt;2. Define the Transformation scope to STRING(1) by using&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="checkboxInnerSpan"&gt;&amp;nbsp; Data type is&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: STRING&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="checkboxInnerSpan"&gt;&amp;nbsp; Scope Expression:&amp;nbsp;$AR_M_SOURCE_DATATYPE_LENGTH == 1&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="checkboxInnerSpan"&gt;&amp;nbsp; &amp;nbsp; If the source column length is not 1 then the '' will NOT be replaced by ' '. Certainly you may add additional constraints eg schema name/table name/column name pattern etc.&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-1710642892615.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/162141i749E2631456CFEF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1710642892615.png" alt="john_wang_0-1710642892615.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. Using &lt;A title="Null Check function ifnull()" href="https://help.qlik.com/en-US/replicate/November2023/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/tasks_expressOther.htm#NULL:~:text=ifnull(x%2Cy,with%20two%20arguments." target="_blank" rel="noopener"&gt;Null Check function ifnull()&lt;/A&gt;, the expression is:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; ifnull($AR_M_SOURCE_COLUMN_DATA,' ')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_1-1710643061398.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/162142iA42C5F49A549B4EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_1-1710643061398.png" alt="john_wang_1-1710643061398.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 02:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2431552#M10163</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-03-17T02:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2431639#M10169</link>
      <description>&lt;P&gt;Just a brainfart it seems, or maybe not the most recent version.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/152714"&gt;@RichJ&lt;/a&gt;&amp;nbsp; wrote -&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;and $AR_M_SOURCE_COLUMN_NAME =''&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But you need to set and get the columns DATA, not it's name. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Use: &lt;STRONG&gt;$AR_M_SOURCE_COLUMN_DATA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note, this variable is NOT available/documented in early Replicate 'V7' versions but it is in 2023.11&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Going in though the GUI you start with:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Transformation Type -&amp;nbsp;Column -&amp;nbsp;Replace column value&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 02:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2431639#M10169</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-03-18T02:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2432523#M10206</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;
&lt;P&gt;Thanks for help!&amp;nbsp; The source db is SQL Server, the target is Snowflake.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we have more than one global rules,&amp;nbsp; what is the order they got executed?&lt;/P&gt;
&lt;P&gt;If we have both global rules and table transformations, will global rules get executed before table transformation?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 17:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2432523#M10206</guid>
      <dc:creator>RichJ</dc:creator>
      <dc:date>2024-03-19T17:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2432527#M10207</link>
      <description>&lt;P&gt;Hi Hein,&lt;/P&gt;
&lt;P&gt;Our server version is "2023.11.0.159",&amp;nbsp; but there is no "&lt;STRONG&gt;$AR_M_SOURCE_COLUMN_DATA"&lt;/STRONG&gt; available in global rule configuration page.&amp;nbsp;&amp;nbsp;&amp;nbsp;However, I simply went ahead and used&amp;nbsp;"&lt;STRONG&gt;$AR_M_SOURCE_COLUMN_DATA"&lt;/STRONG&gt; , and it seemed working - I am just wondering if that's reliable for me to use it even it's not shown in the config page?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 18:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2432527#M10207</guid>
      <dc:creator>RichJ</dc:creator>
      <dc:date>2024-03-19T18:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2432561#M10208</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/152714"&gt;@RichJ&lt;/a&gt;&amp;nbsp;&amp;lt;&lt;EM&gt;but there is no "&lt;STRONG&gt;$AR_M_SOURCE_COLUMN_DATA"&lt;/STRONG&gt;&amp;nbsp;available in global rule configuration page. &amp;gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I verified just now under 2023.5.0152.&lt;/P&gt;
&lt;P&gt;You have to select "&lt;SPAN class="checkboxInnerSpan"&gt;Replace column value" along the way otherwise the "data" tab will not show.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heinvandenheuvel_0-1710877778642.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/162326i80137124443A26E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Heinvandenheuvel_0-1710877778642.png" alt="Heinvandenheuvel_0-1710877778642.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 19:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2432561#M10208</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-03-19T19:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: set up a global rule to replace '' with ' '</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2433076#M10242</link>
      <description>&lt;P&gt;It seems to me if there are both global rule and table transformation presented, then the global rule will not be executed?&amp;nbsp; Please confirm.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 22:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/set-up-a-global-rule-to-replace-with/m-p/2433076#M10242</guid>
      <dc:creator>RichJ</dc:creator>
      <dc:date>2024-03-20T22:17:10Z</dc:date>
    </item>
  </channel>
</rss>

