<?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: Issues with views SQL Server in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153529#M8548</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/108119"&gt;@PGN&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I remember, if the source and target databases are of the same type, an identical table structure is created.&amp;nbsp;However, I am not sure whether this holds true for all databases.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I have conducted following tests:&lt;BR /&gt;&lt;BR /&gt;My table and view:&lt;BR /&gt;CREATE TABLE [dbo].[test] (ID int not null primary key, C1 CHAR(10), V1 VARCHAR(10));&lt;BR /&gt;CREATE VIEW&amp;nbsp;[dbo].[test_v] as SELECT * FROM&amp;nbsp;[dbo].[test];&lt;/P&gt;
&lt;P&gt;1) SQL Server -&amp;gt; SQL Server&lt;BR /&gt;Created target tables [test] and [test_v] are same as source table: CHAR maps to CHAR, VARCHAR maps to VARCHAR.&lt;/P&gt;
&lt;P&gt;2) SQL Server -&amp;gt; Oracle Server&lt;BR /&gt;CHAR maps to VARCHAR and VARCHAR maps to VARCHAR.&lt;/P&gt;
&lt;P&gt;Please try following workaround:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a global transformation&lt;/LI&gt;
&lt;LI&gt;Convert data type STRING to data type STRING. For example:&lt;BR /&gt;Convert data type for %.% with column % and data type STRING to data type STRING and sub type Regular&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Desmond&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 11:19:12 GMT</pubDate>
    <dc:creator>DesmondWOO</dc:creator>
    <dc:date>2023-12-15T11:19:12Z</dc:date>
    <item>
      <title>Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2152720#M8510</link>
      <description>&lt;P&gt;I have a number of views that we are replicating as snapshots.&amp;nbsp; Before the&amp;nbsp;&lt;SPAN&gt;May 2023 (2023.5.0.322) release which we installed end of September, the tables that were being created from the views would create target columns as type varchar.&amp;nbsp; After the release, they are being created as the source has them (char types).&amp;nbsp; Unfortunately, they contain trailing spaces which is causing havoc on the users.&amp;nbsp; We didn't notice because we hadn't dropped the tables after their initial creation.&amp;nbsp; We set the task up as truncate.&amp;nbsp; We just dropped/created all of them because there was an issue with one of the columns in the tables that had changed size.&amp;nbsp; I didn't believe it, originally but the target system has an audit of schema changes and I see the original sql script done by Qlik has them cast as varchar whereas the new version casts them as char.&amp;nbsp; The source views did not change.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So creating them as the original source is actually more accurate, but I'm trying to look for a root cause.&amp;nbsp; Was this a change made to that release?&amp;nbsp; I reviewed the notes, but didn't find anything.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 20:02:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2152720#M8510</guid>
      <dc:creator>PGN</dc:creator>
      <dc:date>2023-12-13T20:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2152723#M8511</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/108119"&gt;@PGN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is possible that this change was made as a fix that was caught internally. High impact and customer reported issues that are fixed are always listed in the release notes.&lt;/P&gt;
&lt;P&gt;To confirm we would need to check with our internal support team, but we do not have a mechanism for doing that via the Community forum. Could you please submit a support case for this question?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dana&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 20:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2152723#M8511</guid>
      <dc:creator>Dana_Baldwin</dc:creator>
      <dc:date>2023-12-13T20:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2152724#M8512</link>
      <description>&lt;P&gt;Sure.&amp;nbsp; I'll do that tomorrow.&amp;nbsp; Thx.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 20:19:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2152724#M8512</guid>
      <dc:creator>PGN</dc:creator>
      <dc:date>2023-12-13T20:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153114#M8532</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/108119"&gt;@PGN&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Besides&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121014"&gt;@Dana_Baldwin&lt;/a&gt;&amp;nbsp;comment, maybe a global transformation helps, for example replace the data type STRING columns value with expression:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;trim($AR_M_SOURCE_COLUMN_DATA)&lt;/FONT&gt;&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>Thu, 14 Dec 2023 15:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153114#M8532</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-12-14T15:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153152#M8537</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; I tried that but got some funky errors:&lt;/P&gt;
&lt;P&gt;]I: Start loading table 'odn'.'rm_agPlanAFKS' (Id = 56) by subtask 10. Start load timestamp 00060C691725C42C (replicationtask_util.c:755)&lt;BR /&gt;00001116: 2023-12-13T14:22:46 [DATA_STRUCTURE ]E: SQLite general error. Code &amp;lt;1&amp;gt;, Message &amp;lt;near ".": syntax error&amp;gt;. [1000504] (at_sqlite.c:326)&lt;BR /&gt;00001116: 2023-12-13T14:22:46 [TRANSFORMATION ]E: Failed to init column calculation expression 'trim($PlanID),trim($PlanName),trim($ProductType),trim($ContractNumber),trim($LinkToLineOfBusiness.LineOfBusiness),trim($PBP),'2023-12-13 14:22:10.805263'' [1000504] (manipulator.c:1649)&lt;BR /&gt;00001116: 2023-12-13T14:22:46 [TRANSFORMATION ]W: The metadata transformations defined for table 'odn.rm_agPlanAFKS' were not performed as at least one of the transformation expressions contains an error (manipulator.c:164)&lt;BR /&gt;00001116: 2023-12-13T14:22:46 [SOURCE_UNLOAD ]E: Cannot refresh source table (56) metadata [1000504] (endpointshell.c:3943)&lt;BR /&gt;00009080: 2023-12-13T14:22:46 [DATA_STRUCTURE ]E: SQLite general error. Code &amp;lt;1&amp;gt;, Message &amp;lt;near ".": syntax error&amp;gt;. [1000504] (at_sqlite.c:326)&lt;BR /&gt;00009080: 2023-12-13T14:22:46 [TRANSFORMATION ]E: Failed to init column calculation expression 'trim($EntityCaseID),trim($EntityDecision),trim($Reviewer),trim($ExternalCaseReviewLevel),trim($ExternalReviewNarrative),trim($OPMdecision),trim($IfOTnotifiedappropriatedept),trim($DepartmentNotified),trim($LinkToCase.CaseNumber),'2023-12-13 14:22:10.805263'' [1000504] (manipulator.c:1649)&lt;BR /&gt;00009080: 2023-12-13T14:22:46 [TRANSFORMATION ]W: The metadata transformations defined for table 'odn.rm_agOPM' were not performed as at least one of the transformation expressions contains an error (manipulator.c:164)&lt;BR /&gt;00009080: 2023-12-13T14:22:46 [SOURCE_UNLOAD ]E: Cannot refresh source table (55) metadata [1000504] (endpointshell.c:3943)&lt;BR /&gt;00010424: 2023-12-13T14:22:46 [UTILITIES ]I: Mail "[GHPATTA2D1W19v.geisinger.edu\Error - System Error] ODINDEV1_LZ_OnBase_Crp1OnBase-S1:encountered errors" sent successfully (notification_manager.c:1923)&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 16:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153152#M8537</guid>
      <dc:creator>PGN</dc:creator>
      <dc:date>2023-12-14T16:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153529#M8548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/108119"&gt;@PGN&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I remember, if the source and target databases are of the same type, an identical table structure is created.&amp;nbsp;However, I am not sure whether this holds true for all databases.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I have conducted following tests:&lt;BR /&gt;&lt;BR /&gt;My table and view:&lt;BR /&gt;CREATE TABLE [dbo].[test] (ID int not null primary key, C1 CHAR(10), V1 VARCHAR(10));&lt;BR /&gt;CREATE VIEW&amp;nbsp;[dbo].[test_v] as SELECT * FROM&amp;nbsp;[dbo].[test];&lt;/P&gt;
&lt;P&gt;1) SQL Server -&amp;gt; SQL Server&lt;BR /&gt;Created target tables [test] and [test_v] are same as source table: CHAR maps to CHAR, VARCHAR maps to VARCHAR.&lt;/P&gt;
&lt;P&gt;2) SQL Server -&amp;gt; Oracle Server&lt;BR /&gt;CHAR maps to VARCHAR and VARCHAR maps to VARCHAR.&lt;/P&gt;
&lt;P&gt;Please try following workaround:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a global transformation&lt;/LI&gt;
&lt;LI&gt;Convert data type STRING to data type STRING. For example:&lt;BR /&gt;Convert data type for %.% with column % and data type STRING to data type STRING and sub type Regular&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Desmond&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 11:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2153529#M8548</guid>
      <dc:creator>DesmondWOO</dc:creator>
      <dc:date>2023-12-15T11:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with views SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2164008#M9012</link>
      <description>&lt;P&gt;Thanks DesmondWOO.&amp;nbsp; &amp;nbsp;This worked prefect!&amp;nbsp; &amp;nbsp;I added a few more filters to make it fit my needs:&lt;/P&gt;
&lt;P&gt;Convert data type for %.% with column % and data type STRING Scope expression: (($AR_M_SOURCE_COLUMN_NAME == 'col_1'&lt;BR /&gt;OR $AR_M_SOURCE_COLUMN_NAME == 'col_2')... etc&lt;BR /&gt;AND $AR_M_SOURCE_DATATYPE_LENGTH == 255 to data type STRING(255) and sub type Regular )&lt;/P&gt;
&lt;P&gt;The columns that were CHAR(255) are now VARCHAR(255) in the Target SQL Server DB).&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Snowflake conversion already worked as hoped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 17:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Issues-with-views-SQL-Server/m-p/2164008#M9012</guid>
      <dc:creator>RandyWeis</dc:creator>
      <dc:date>2024-01-22T17:30:38Z</dc:date>
    </item>
  </channel>
</rss>

