<?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: Implementing MySQL (cross-schema) query into Qlik Sense in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2042786#M12014</link>
    <description>&lt;P&gt;I don't quite understand the problem.&lt;/P&gt;
&lt;P&gt;If the connection is a MySQL database, you could directly perform a query of this type without problems:&lt;/P&gt;
&lt;P&gt;[TABLE_A]:&lt;BR /&gt;LOAD&lt;BR /&gt;* ;&lt;/P&gt;
&lt;P&gt;select&lt;BR /&gt;*&lt;BR /&gt;from `schema`.`table_a`;&lt;/P&gt;
&lt;P&gt;and you would have in the Qlik TABLE_A all the data returned by the query.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2023 21:45:07 GMT</pubDate>
    <dc:creator>carlos_molino</dc:creator>
    <dc:date>2023-02-27T21:45:07Z</dc:date>
    <item>
      <title>Implementing MySQL (cross-schema) query into Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2039735#M11997</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Recently, I got a connection to our ERP (MySQL database) from Qlik Sense. The database has a different schema for each of our customers. When I work on the database directly (MySQL Workbench, I have a working query that basically runs cross-schema. So I have one statement that is being executed for all customers without rewriting the same query over and over. See attached file, "Cross Schema Query".&lt;/P&gt;
&lt;P&gt;I know that Qlik Sense can also execute SQL queries, but when I try to run this query (Qlik Sense Cross Schema) I run into multiple issues:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;The "SQL SET SESSION group_concat_max_len = 100000;" doesn't execute as I am only allowed to run SQL Select statements&lt;/P&gt;
&lt;P&gt;2. When I try to run without changing the max_len, I only get 1 row as a result. When I check the result it looks like my query gets cut off at a certain point. So it seems that it is not executing the complete query, maybe because of not having the neccesary max_len?&lt;/P&gt;
&lt;P&gt;At this point I am not exactly sure how to get this working. Our ERP doesn't want us to create views or stored procedures on the database, so I have to get it working within the Qlik environment.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 08:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2039735#M11997</guid>
      <dc:creator>GoosJ</dc:creator>
      <dc:date>2023-02-20T08:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing MySQL (cross-schema) query into Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2042786#M12014</link>
      <description>&lt;P&gt;I don't quite understand the problem.&lt;/P&gt;
&lt;P&gt;If the connection is a MySQL database, you could directly perform a query of this type without problems:&lt;/P&gt;
&lt;P&gt;[TABLE_A]:&lt;BR /&gt;LOAD&lt;BR /&gt;* ;&lt;/P&gt;
&lt;P&gt;select&lt;BR /&gt;*&lt;BR /&gt;from `schema`.`table_a`;&lt;/P&gt;
&lt;P&gt;and you would have in the Qlik TABLE_A all the data returned by the query.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 21:45:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2042786#M12014</guid>
      <dc:creator>carlos_molino</dc:creator>
      <dc:date>2023-02-27T21:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing MySQL (cross-schema) query into Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2042891#M12016</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/218791"&gt;@GoosJ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe start with a simple select as suggested by Carlos.&lt;BR /&gt;For the second part maybe create a list of the schemas you need to extract the data from.&lt;/P&gt;
&lt;P&gt;Then try the following,&lt;/P&gt;
&lt;P&gt;Let vRows = NoOfRows('SchemaList');&lt;BR /&gt;For i = 1 to vRows&lt;BR /&gt;Let vSchema = FieldValue('device_id',$(i));&lt;/P&gt;
&lt;P&gt;You can then pass the schema into your request as a variable,&lt;BR /&gt;after your select / load add&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next i&lt;/P&gt;
&lt;P&gt;This will loop trough your Schemas listed.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 06:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Implementing-MySQL-cross-schema-query-into-Qlik-Sense/m-p/2042891#M12016</guid>
      <dc:creator>williejacobs</dc:creator>
      <dc:date>2023-02-28T06:41:23Z</dc:date>
    </item>
  </channel>
</rss>

