<?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: mongodb to mysql How to give Structure To My Data in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099613#M6944</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/237756"&gt;@lakshmanan6991&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'd like to add additional info besides&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/150145"&gt;@Shai_E&lt;/a&gt;&amp;nbsp;comments.&lt;/P&gt;
&lt;P&gt;I agree with Shai, it's by design. looks to me the best approach is :&lt;/P&gt;
&lt;P&gt;1- Replicate the collections to _doc in MySQL&lt;/P&gt;
&lt;P&gt;2- Parse and convert the JSON document to 'relational' table within MySQL. It's better if you can define a &lt;STRONG&gt;VIEW&lt;/STRONG&gt; to parse the document from &lt;STRONG&gt;table&lt;/STRONG&gt; to relational structured row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; More information can be found at&amp;nbsp;&lt;A title="MySQL Document Store" href="https://www.mysql.com/products/enterprise/document_store.html#:~:text=MySQL%20Document%20store%20gives,tabular%20or%20JSON%20formats." target="_blank" rel="noopener"&gt;MySQL Document Store&lt;/A&gt;, &amp;amp; &lt;A title="Converting between JSON and non-JSON values" href="https://dev.mysql.com/doc/refman/8.0/en/json.html#:~:text=mysql%3E%20SELECT%20sentence%2D%3E%3E%22%24.mascot%22%20FROM%20facts%3B%0A%2B%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2B%0A%7C%20sentence%2D%3E%3E%22%24.mascot%22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%0A%2B%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2B%0A%7C%20Our%20mascot%20is%20a%20dolphin%20named%20%22Sakila%22.%20%7C%0A%2B%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2B" target="_blank" rel="noopener"&gt;Converting between JSON and non-JSON values&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; In MySQL 8.0, there are 2 API(s) to access MySQL tables:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SQL API (Std Protocol)&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CRUD and SQL APIs (X Protocol)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; It's easy to access JSON and parse the unstructured document as is 'relational' structured rows. for example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] JS&amp;gt; db.demo.find()&lt;BR /&gt;[ &lt;BR /&gt;&amp;nbsp; { &lt;BR /&gt;&amp;nbsp; &amp;nbsp; "_id": "0000641484ed0000000000000001", &lt;BR /&gt;&amp;nbsp; &amp;nbsp; "id": "22", &lt;BR /&gt;&amp;nbsp; &amp;nbsp; "name": "John" &lt;BR /&gt;&amp;nbsp; } &lt;BR /&gt;] &lt;BR /&gt;1 document in set (0.0009 sec) &lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] SQL&amp;gt; show create table demo\G&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;*************************** 1. row ***************************&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Table: demo&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Create Table: CREATE TABLE `demo` (&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`_doc` json DEFAULT NULL,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`_id` varbinary(32) GENERATED ALWAYS AS (json_unquote(json_extract(`_doc`,_utf8mb4'$._id'))) STORED NOT NULL,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;PRIMARY KEY (`_id`)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 row in set (0.0015 sec)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] SQL&amp;gt; &lt;STRONG&gt;select _doc-&amp;gt;&amp;gt;'$.name'&lt;/STRONG&gt; from demo;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| _doc-&amp;gt;&amp;gt;'$.name'|&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| John |&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 row in set (0.0010 sec)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] SQL&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Wed, 02 Aug 2023 14:40:40 GMT</pubDate>
    <dc:creator>john_wang</dc:creator>
    <dc:date>2023-08-02T14:40:40Z</dc:date>
    <item>
      <title>mongodb to mysql How to give Structure To My Data</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099463#M6941</link>
      <description>&lt;P&gt;how can i give structure to my data coming from mongo_db and write into mysql as a structure data&lt;/P&gt;
&lt;P&gt;below is my unstructure data&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lakshmanan6991_0-1690972275641.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/113414i726C155CAC3B9F4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lakshmanan6991_0-1690972275641.png" alt="lakshmanan6991_0-1690972275641.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But I want the data as&amp;nbsp; structured data below I mentioned:-&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lakshmanan6991_1-1690972405844.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/113415i053ADA74D3525F0F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lakshmanan6991_1-1690972405844.png" alt="lakshmanan6991_1-1690972405844.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any One can Suggest to Achieve this in qlik replicate is possibile or Not&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, 02 Aug 2023 10:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099463#M6941</guid>
      <dc:creator>lakshmanan6991</dc:creator>
      <dc:date>2023-08-02T10:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: mongodb to mysql How to give Structure To My Data</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099558#M6942</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/237756"&gt;@lakshmanan6991&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I didnt test this out, but from reading the user guide section related to mongodb as a source this seems to be by design:&lt;/P&gt;
&lt;H2 id="anchor-3" tabindex="-1"&gt;How target tables are created&lt;/H2&gt;
&lt;P&gt;For each MongoDB collection, a corresponding target table is created with two columns:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="ui_item"&gt;_id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;- a WSTRING column containing the document's&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;_id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field (the primary key).&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN class="ui_item"&gt;&amp;nbsp;_doc&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;- an NCLOB column containing the JSON representation of the document.&lt;BR /&gt;&lt;BR /&gt;User guide section:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/MongoDB_Source/mongodb_db_overview.htm" target="_blank"&gt;Overview | Qlik Replicate Help&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099558#M6942</guid>
      <dc:creator>Shai_E</dc:creator>
      <dc:date>2023-08-02T13:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: mongodb to mysql How to give Structure To My Data</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099613#M6944</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/237756"&gt;@lakshmanan6991&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'd like to add additional info besides&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/150145"&gt;@Shai_E&lt;/a&gt;&amp;nbsp;comments.&lt;/P&gt;
&lt;P&gt;I agree with Shai, it's by design. looks to me the best approach is :&lt;/P&gt;
&lt;P&gt;1- Replicate the collections to _doc in MySQL&lt;/P&gt;
&lt;P&gt;2- Parse and convert the JSON document to 'relational' table within MySQL. It's better if you can define a &lt;STRONG&gt;VIEW&lt;/STRONG&gt; to parse the document from &lt;STRONG&gt;table&lt;/STRONG&gt; to relational structured row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; More information can be found at&amp;nbsp;&lt;A title="MySQL Document Store" href="https://www.mysql.com/products/enterprise/document_store.html#:~:text=MySQL%20Document%20store%20gives,tabular%20or%20JSON%20formats." target="_blank" rel="noopener"&gt;MySQL Document Store&lt;/A&gt;, &amp;amp; &lt;A title="Converting between JSON and non-JSON values" href="https://dev.mysql.com/doc/refman/8.0/en/json.html#:~:text=mysql%3E%20SELECT%20sentence%2D%3E%3E%22%24.mascot%22%20FROM%20facts%3B%0A%2B%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2B%0A%7C%20sentence%2D%3E%3E%22%24.mascot%22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%0A%2B%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2B%0A%7C%20Our%20mascot%20is%20a%20dolphin%20named%20%22Sakila%22.%20%7C%0A%2B%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2B" target="_blank" rel="noopener"&gt;Converting between JSON and non-JSON values&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; In MySQL 8.0, there are 2 API(s) to access MySQL tables:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SQL API (Std Protocol)&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CRUD and SQL APIs (X Protocol)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; It's easy to access JSON and parse the unstructured document as is 'relational' structured rows. for example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] JS&amp;gt; db.demo.find()&lt;BR /&gt;[ &lt;BR /&gt;&amp;nbsp; { &lt;BR /&gt;&amp;nbsp; &amp;nbsp; "_id": "0000641484ed0000000000000001", &lt;BR /&gt;&amp;nbsp; &amp;nbsp; "id": "22", &lt;BR /&gt;&amp;nbsp; &amp;nbsp; "name": "John" &lt;BR /&gt;&amp;nbsp; } &lt;BR /&gt;] &lt;BR /&gt;1 document in set (0.0009 sec) &lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] SQL&amp;gt; show create table demo\G&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;*************************** 1. row ***************************&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Table: demo&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Create Table: CREATE TABLE `demo` (&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`_doc` json DEFAULT NULL,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`_id` varbinary(32) GENERATED ALWAYS AS (json_unquote(json_extract(`_doc`,_utf8mb4'$._id'))) STORED NOT NULL,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;PRIMARY KEY (`_id`)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 row in set (0.0015 sec)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] SQL&amp;gt; &lt;STRONG&gt;select _doc-&amp;gt;&amp;gt;'$.name'&lt;/STRONG&gt; from demo;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| _doc-&amp;gt;&amp;gt;'$.name'|&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| John |&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 row in set (0.0010 sec)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MySQL [localhost+ ssl/nosql] SQL&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Wed, 02 Aug 2023 14:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099613#M6944</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-08-02T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: mongodb to mysql How to give Structure To My Data</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099619#M6945</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;This is very good stuff John.&lt;BR /&gt;&lt;BR /&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 14:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/mongodb-to-mysql-How-to-give-Structure-To-My-Data/m-p/2099619#M6945</guid>
      <dc:creator>Shai_E</dc:creator>
      <dc:date>2023-08-02T14:43:51Z</dc:date>
    </item>
  </channel>
</rss>

