<?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: Importing data from SQL Server to Mongo in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349836#M116764</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm usin Talend Open Studio for Big Data Version: 7.1.1.&lt;/P&gt;&lt;P&gt;The schema is correctly mapped or otherwise it will throw an error.&lt;/P&gt;&lt;P&gt;It's &amp;nbsp;Mongo v4.0.10-rc1&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 12:44:49 GMT</pubDate>
    <dc:creator>matiasdesousa</dc:creator>
    <dc:date>2021-07-07T12:44:49Z</dc:date>
    <item>
      <title>Importing data from SQL Server to Mongo</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349834#M116762</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I have a simple job to import data from SQL Server to MongoDB and i noticed something strange when inserting data into Mongo.&lt;/P&gt;&lt;P&gt;Some fields that are empty in SQL server are being filled with data in Mongo when it should be null.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;If i execute this query:&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;select SUBSTRING(UF204,1,14) as imei_14, uf204 as imei, uf102 as trafego, uf201 as Origem, uf211 as Destino, uf301 as Data, uf300 as hora, uf400 as Duração,&amp;nbsp;uf202 as IMSI, uf203 as LAC_CI&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;from dbo.History20210605 where uf101=1 and ProcID like 'MCR_09_PRA_CSR4_%' and uf301 = 20210605 and uf201='5885732'"&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;The result are 4 lines and it's comming with null fields and being inserted as it should in Mongo.&lt;/P&gt;&lt;P&gt;But if i change the query to (removed last part - &lt;B&gt;&lt;I&gt;and uf201='5885732'&lt;/I&gt;&lt;/B&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;select SUBSTRING(UF204,1,14) as imei_14, uf204 as imei, uf102 as trafego, uf201 as Origem, uf211 as Destino, uf301 as Data, uf300 as hora, uf400 as Duração,&amp;nbsp;uf202 as IMSI, uf203 as LAC_CI&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;from dbo.History"+context.table_date +" where uf101=1 and ProcID like 'MCR_09_PRA_CSR4_%' and uf301 = 20210605"&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;The result of this query are 2 million lines that are inserted into Mongo. If i search for the &lt;B&gt;&lt;I&gt;{uf201: 5885732} &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;the results are the same 4 lines from first query but the fields that should be null are not, which is causing data to be incorrect.&lt;/P&gt;&lt;P&gt;I have a java code(image) that converts the string from SQL to number before inserting to Mongo but don't think that causes any issue.&lt;/P&gt;&lt;P&gt;Any idea on what can be the cause of this? Let me know if you need any more info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;The problem seems to be in the conversion to Long. I made that conversion so the search would be faster since the fields are mostly numbers but they are commng as strings from SQL.&lt;/P&gt;&lt;P&gt;If i put them as strings in mongo it seems to work fine but that would slow dow the search. Any suggestions?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:01:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349834#M116762</guid>
      <dc:creator>matiasdesousa</dc:creator>
      <dc:date>2024-11-16T00:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data from SQL Server to Mongo</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349835#M116763</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Could&amp;nbsp;you please clarify in which Talend version/edition you are?&lt;/P&gt;&lt;P&gt;Is the schema column number type correctly mapped to mongodb collection field type with tMongoDBOutput component? What's Mongodb version are you using? Mongodb 3.6?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 07:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349835#M116763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-24T07:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data from SQL Server to Mongo</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349836#M116764</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm usin Talend Open Studio for Big Data Version: 7.1.1.&lt;/P&gt;&lt;P&gt;The schema is correctly mapped or otherwise it will throw an error.&lt;/P&gt;&lt;P&gt;It's &amp;nbsp;Mongo v4.0.10-rc1&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 12:44:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349836#M116764</guid>
      <dc:creator>matiasdesousa</dc:creator>
      <dc:date>2021-07-07T12:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Importing data from SQL Server to Mongo</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349837#M116765</link>
      <description>&lt;P&gt;Hi, you can put a tlogrow just after tDBInput to see the values you get from the query .&lt;/P&gt;&lt;P&gt;So you'll see if the value are null or not when you get it for &lt;B&gt;&lt;I&gt;uf201='5885732'"&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Send me Love and kudos&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Importing-data-from-SQL-Server-to-Mongo/m-p/2349837#M116765</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-07T13:14:31Z</dc:date>
    </item>
  </channel>
</rss>

