<?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: Converting Sql Server UniqueIdentifier Column into oracle Raw Column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303985#M75805</link>
    <description>I need this answer too.&lt;BR /&gt;Thanks</description>
    <pubDate>Wed, 08 Jun 2011 10:27:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-06-08T10:27:19Z</dc:date>
    <item>
      <title>Converting Sql Server UniqueIdentifier Column into oracle Raw Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303984#M75804</link>
      <description>Does somebody know the best way to convert SqlServer 2008 UniqueIdentifier Column to Oracle10g Raw Column using the Tmap Component ?&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 16 Nov 2024 13:57:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303984#M75804</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Sql Server UniqueIdentifier Column into oracle Raw Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303985#M75805</link>
      <description>I need this answer too.&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 08 Jun 2011 10:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303985#M75805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-08T10:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Sql Server UniqueIdentifier Column into oracle Raw Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303986#M75806</link>
      <description>I have the same issue only to MySQL.
&lt;BR /&gt;Without a TMap I found setting the MSSQL input schema to Type data[] and DB Type to uniqueidentifier and the output schema (MySQL in my case) to Type data[] and DB Type BINARY(16) (or CHAR(16), but not VARCHAR) seems to work fine. You know you haven't got it right when ETL complains about the length because it will treat the GUID as a string of length 36.
&lt;BR /&gt;I'm now looking at how to do this for GUIDs stored as strings in an XML file, which will require explicit conversion like you suggest.
&lt;BR /&gt;FYI 
&lt;A href="http://wiki.mcneel.com/developer/scriptsamples/guidtostring" rel="nofollow noopener noreferrer"&gt;http://wiki.mcneel.com/developer/scriptsamples/guidtostring&lt;/A&gt;
&lt;BR /&gt;Cheers
&lt;BR /&gt;Kevin</description>
      <pubDate>Thu, 25 Aug 2011 22:57:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303986#M75806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-25T22:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Sql Server UniqueIdentifier Column into oracle Raw Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303987#M75807</link>
      <description>Here you go: 
&lt;BR /&gt;In tMap use GUID.stringToGuid(SomeStringColumn) 
&lt;BR /&gt;Create the custom routine GUID as follows 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;public class GUID {&lt;BR /&gt;    /**&lt;BR /&gt;     * &lt;BR /&gt;     * {talendTypes} byte | Byte&lt;BR /&gt;     * &lt;BR /&gt;     * {Category} User Defined&lt;BR /&gt;     * &lt;BR /&gt;     * {param} string("00000000-0000-0000-0000-000000000000") input: The guid as a string.&lt;BR /&gt;     * &lt;BR /&gt;     */&lt;BR /&gt;    public static byte[] stringToGuid(String guid) {&lt;BR /&gt;        if (guid == null) {&lt;BR /&gt;            return null; //$NON-NLS-1$&lt;BR /&gt;        }&lt;BR /&gt;        &lt;BR /&gt;        UUID uuid = UUID.fromString(guid);&lt;BR /&gt;        &lt;BR /&gt;        long msb = uuid.getMostSignificantBits();&lt;BR /&gt;        long lsb = uuid.getLeastSignificantBits();       &lt;BR /&gt;        &lt;BR /&gt;        byte[] output  = new byte;&lt;BR /&gt;        // Reverse the first 4 bytes&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 3));&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 2));&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 1));&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 0));&lt;BR /&gt;        // Reverse 5th and 5th&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 5));&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 4));&lt;BR /&gt;        // Reverse 7th and 8th&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 7));&lt;BR /&gt;        output = (byte) (msb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - 6));&lt;BR /&gt;        // Copy the rest&lt;BR /&gt;        for (int i = 8; i &amp;lt; 16; i++) {&lt;BR /&gt;        	output&lt;I&gt; = (byte) (lsb &amp;gt;&amp;gt;&amp;gt; 8 * (7 - i));&lt;BR /&gt;        }&lt;BR /&gt;        return output;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2011 05:15:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-Sql-Server-UniqueIdentifier-Column-into-oracle-Raw/m-p/2303987#M75807</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-26T05:15:50Z</dc:date>
    </item>
  </channel>
</rss>

