<?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 MySQL INFILE CSV in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/MySQL-INFILE-CSV/m-p/1535853#M3568</link>
    <description>&lt;P&gt;I am trying to use the INFILE MySQL function to upload a large CSV file (2GB) into a MySQL database.&lt;/P&gt;&lt;P&gt;INFILE is faster than looping through each row, so I want to try get INFILE to work. The bottom script works in Qlikview - so why not in Qlik Sense?&lt;/P&gt;&lt;P&gt;So far...&lt;/P&gt;&lt;P&gt;First hurdle was that the "MySQL Enterprise Edition" Data connection can only read from our MySQL Community Edition. Using drop / truncate / create commands results&amp;nbsp;in the error: (Most command&amp;nbsp;actually executed if you ignore errors)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"QVX_UNEXPECTED_END_OF_DATA: Unable to get column information for the fields that are used in the query: Object reference not set to an instance of an object."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The errors&amp;nbsp;were fixed by using the ODBC connection setup for Qlik Sense:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.google.com/url?q=https://withdave.com/2017/04/connecting-to-mysql-community-edition-with-qlik-sense-system-dsn-with-mysql-odbc-driver/&amp;amp;sa=D&amp;amp;source=hangouts&amp;amp;ust=1548753129507000&amp;amp;usg=AFQjCNENGIbf1XXDQNTIG3abWrzdMwyTMw" target="_blank" rel="nofollow noreferrer noopener"&gt;https://withdave.com/2017/04/connecting-to-mysql-community-edition-with-qlik-sense-system-dsn-with-mysql-odbc-driver/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;INLINE still gives an error. This time:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Connector reply error: SQL##f - SqlState: S1000, ErrorCode: 1148, ErrorMsg: [MySQL][ODBC 8.0(w) Driver][mysqld-5.5.49-log]The used command is not allowed with this MySQL version"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I also tried using OLE DB with the ODBC connection, but I get an error.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Connector reply error: ErrorSource: Unknown source, ErrorMsg: Unknown description"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I tried different path references, but without luck.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"D:/QlikData/QSData/Temp/Test.csv"&lt;/LI&gt;&lt;LI&gt;"D:\\QlikData\\QSData\\Temp\\Test.csv"&lt;/LI&gt;&lt;LI&gt;referencing the csv file path on the qlikview server&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Qlikview Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ODBC CONNECT TO MySQL;

SQL
LOAD DATA LOCAL INFILE "//QS_Server/QSData/Temp/Test.csv"
INTO TABLE Test_DB.Test_Table
COLUMNS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n' 
IGNORE 1 LINES;&lt;/PRE&gt;&lt;P&gt;Any other ideas ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Dec 2021 14:17:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-23T14:17:17Z</dc:date>
    <item>
      <title>MySQL INFILE CSV</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/MySQL-INFILE-CSV/m-p/1535853#M3568</link>
      <description>&lt;P&gt;I am trying to use the INFILE MySQL function to upload a large CSV file (2GB) into a MySQL database.&lt;/P&gt;&lt;P&gt;INFILE is faster than looping through each row, so I want to try get INFILE to work. The bottom script works in Qlikview - so why not in Qlik Sense?&lt;/P&gt;&lt;P&gt;So far...&lt;/P&gt;&lt;P&gt;First hurdle was that the "MySQL Enterprise Edition" Data connection can only read from our MySQL Community Edition. Using drop / truncate / create commands results&amp;nbsp;in the error: (Most command&amp;nbsp;actually executed if you ignore errors)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"QVX_UNEXPECTED_END_OF_DATA: Unable to get column information for the fields that are used in the query: Object reference not set to an instance of an object."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The errors&amp;nbsp;were fixed by using the ODBC connection setup for Qlik Sense:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.google.com/url?q=https://withdave.com/2017/04/connecting-to-mysql-community-edition-with-qlik-sense-system-dsn-with-mysql-odbc-driver/&amp;amp;sa=D&amp;amp;source=hangouts&amp;amp;ust=1548753129507000&amp;amp;usg=AFQjCNENGIbf1XXDQNTIG3abWrzdMwyTMw" target="_blank" rel="nofollow noreferrer noopener"&gt;https://withdave.com/2017/04/connecting-to-mysql-community-edition-with-qlik-sense-system-dsn-with-mysql-odbc-driver/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;INLINE still gives an error. This time:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Connector reply error: SQL##f - SqlState: S1000, ErrorCode: 1148, ErrorMsg: [MySQL][ODBC 8.0(w) Driver][mysqld-5.5.49-log]The used command is not allowed with this MySQL version"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I also tried using OLE DB with the ODBC connection, but I get an error.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Connector reply error: ErrorSource: Unknown source, ErrorMsg: Unknown description"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I tried different path references, but without luck.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"D:/QlikData/QSData/Temp/Test.csv"&lt;/LI&gt;&lt;LI&gt;"D:\\QlikData\\QSData\\Temp\\Test.csv"&lt;/LI&gt;&lt;LI&gt;referencing the csv file path on the qlikview server&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Qlikview Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ODBC CONNECT TO MySQL;

SQL
LOAD DATA LOCAL INFILE "//QS_Server/QSData/Temp/Test.csv"
INTO TABLE Test_DB.Test_Table
COLUMNS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n' 
IGNORE 1 LINES;&lt;/PRE&gt;&lt;P&gt;Any other ideas ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 14:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/MySQL-INFILE-CSV/m-p/1535853#M3568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-23T14:17:17Z</dc:date>
    </item>
  </channel>
</rss>

