<?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: Exporting from MySQL, importing in QV as flat text in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070705#M357668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, that might be a possible solution if:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Installation rights on the machine running Qlikview were a non-issue&lt;/P&gt;&lt;P&gt;- Access rights to the database is a non-issue&lt;/P&gt;&lt;P&gt;- Data would encompass the entire database and not a restricted subset&lt;/P&gt;&lt;P&gt;- Security and data sensitivity is a non-issue (ftp and email are NOT secure)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2016 09:59:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-25T09:59:29Z</dc:date>
    <item>
      <title>Exporting from MySQL, importing in QV as flat text</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070701#M357664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to import some data from a MySQL database into Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main problem here is that I don't have (direct) access to the database, so I need to export from MySQL and import to Qlikview through flat text files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I first tried XML with the following command: &lt;CODE&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;mysqldump &lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="pun"&gt;--&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;xml test &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; test&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;xml&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;But Qlikview was unable to make anything useful from this, since the fields are labeled through a name attribute instead of the tag itself. ( I know I could manually iterate over all columns with the script, but this obviously is not maintainable nor desired)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;So now I want to simply export as CSV using the following MySQL query:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SELECT id, name, email INTO OUTFILE '/tmp/result.csv'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ESCAPED BY ‘\\’&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LINES TERMINATED BY '\n'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM users &lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;(source: &lt;A href="https://ariejan.net/2008/11/27/export-csv-directly-from-mysql/" title="https://ariejan.net/2008/11/27/export-csv-directly-from-mysql/"&gt;ariejan de vroom&lt;/A&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;However, what do I need to tell Qlikview regarding the quoting? I can choose from 'no quotes', 'standard', or 'MSQ' (whatever that may be). How does this relate to the Enclosed and / or Escaped character in my MySQL query? Which is the correct option?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 00:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070701#M357664</guid>
      <dc:creator />
      <dc:date>2016-03-25T00:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting from MySQL, importing in QV as flat text</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070702#M357665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only way to be sure is to simply try both settings (with a small data set).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what the help file says about the different quoting styles:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG style="font-size: 18pt;"&gt;Quotes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Bold"&gt;Quotes&lt;/SPAN&gt; is a file specifier for the &lt;SPAN class="Bold"&gt;Load&lt;/SPAN&gt; statement that defines whether quotes can be used and the precedence between quotes and separators.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For text files only. Available options are:&lt;/P&gt;
&lt;P class="syntax"&gt;&lt;A name="kanchor965"&gt;&lt;/A&gt;&lt;A name="no_quotes"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;no quotes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="syntax"&gt;&lt;STRONG&gt;&lt;A name="kanchor966"&gt;&lt;/A&gt;&lt;A name="msq"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;msq&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If the specifier is omitted, standard quoting is used, i.e. the quotes " " or ' ' can be used, but only if they are the first and last non blank character of a field value.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If &lt;A class="MCXref_0"&gt;&lt;EM&gt;Quotation Marks in Scripting&lt;/EM&gt;&lt;/A&gt; are not to be accepted in a text file, the &lt;SPAN class="Bold"&gt;no quotes&lt;/SPAN&gt; specifier should be used.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;msq&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; i&lt;/STRONG&gt;s used to specify modern style quoting, allowing multi-line content in fields. Fields containing end-of-line characters must be enclosed within double quotes.&lt;/P&gt;
&lt;P class="note"&gt;&lt;/P&gt;
&lt;P class="note"&gt;One limitation of the &lt;SPAN class="Bold"&gt;&lt;STRONG&gt;msq&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;specifier is that single double-quote (") characters appearing as first or last character in field content will be interpreted as start or end of multi-line content, which may lead to unpredicted results in the data set loaded. In this case you should use standard quoting instead, omitting the specifier.&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 06:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070702#M357665</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-25T06:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting from MySQL, importing in QV as flat text</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070703#M357666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MSQ - Modern Style Quotion allows optional quotes probably like your MySQL select statement would produce. However the escape character is not something that QlikView would be able to process automatically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe your tables and the characters in the strings in those tables would not need to be escaped at all - which means that you don't have to worry about &lt;STRONG&gt;ESCAPED BY '\\'&lt;/STRONG&gt;.&amp;nbsp; The double back-slash would probably mean that a single back-slash would be used to indicate that the following character should be read literally and not as a special symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;LINES TERMINATED BY '\n'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Means that each record or row is terminated by a newline which should be the normal thing for QlikView when reading CSV. Although a newline/carriage-return/line-feed inside a double quoted string would be part of the string and not signify a new row/record if you use MSQ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 08:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070703#M357666</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-03-25T08:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting from MySQL, importing in QV as flat text</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070704#M357667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another solution that avoids those horrible file exchange issues altogether is to replicate your MySQL data in a local MySQL database. And then use an ODBC connection to extract data to QlikView. Works flawlessly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The export-import step can be automated using some scripting. Data can be archived/compressed and sent via email or ftp and imported into a local db, thereby avoiding non-MySQL translation issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only requires some scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 09:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070704#M357667</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-03-25T09:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting from MySQL, importing in QV as flat text</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070705#M357668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, that might be a possible solution if:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Installation rights on the machine running Qlikview were a non-issue&lt;/P&gt;&lt;P&gt;- Access rights to the database is a non-issue&lt;/P&gt;&lt;P&gt;- Data would encompass the entire database and not a restricted subset&lt;/P&gt;&lt;P&gt;- Security and data sensitivity is a non-issue (ftp and email are NOT secure)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 09:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070705#M357668</guid>
      <dc:creator />
      <dc:date>2016-03-25T09:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting from MySQL, importing in QV as flat text</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070706#M357669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know (very limited information is available, and I'ld rather not second guess), you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;don't have to install your local copy of MySQL on the same machine that is running QlikView.&lt;/LI&gt;&lt;LI&gt;Data security, data access, data volume and file transfer issues are exactly the same if you export your entire database to csv or xml.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's just that the format issues go away and reliability may go up because of the exclusive MySQL-to-MySQL data exchange. In my experience, exports to foreign text formats (whether csv, xml, fixed, ...) should be avoided&lt;SPAN style="font-size: 13.3333px;"&gt; whenever possible&lt;/SPAN&gt; in enterprise environments. YMMV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 12:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-from-MySQL-importing-in-QV-as-flat-text/m-p/1070706#M357669</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-03-25T12:46:47Z</dc:date>
    </item>
  </channel>
</rss>

