<?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: MySQL ODBC Direct Query Custom Connector in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1914411#M30098</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/190146"&gt;@Marco_Iac&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MySQL connector and ODBC connector are either currently not supported Direct Query.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/desktop-directquery-data-sources" target="_self" rel="nofollow noopener noreferrer"&gt;You can see a list of all currently supported data sources&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for Power BI that can be used with Direct Query here.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 910px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/538340iE520161E16D5E123/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I found some blogs for enale direct query for custom ODBC, hope they could help you.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://community.powerbi.com/t5/Integrations-with-Files-and/Enabling-direct-query-for-a-data-source-via-an-odbc-driver/td-p/195171" target="_self"&gt;Enabling direct query for a data source via an odbc driver&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/odbc" target="_self" rel="nofollow noopener noreferrer"&gt;Enabling Direct Query for an ODBC based connector&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Your demand is a good idea, while it is not supported to implement in Power BI currently.&lt;BR /&gt;You can vote up this idea for this function：&lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19054735-direct-query-with-mysql-databases" target="_self" rel="nofollow noopener noreferrer"&gt;Direct Query MySQL support here&lt;/A&gt;.&lt;BR /&gt;Or you can submit a new idea to improve the Power BI.&lt;BR /&gt;It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 09:48:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-06-22T09:48:16Z</dc:date>
    <item>
      <title>MySQL ODBC Direct Query Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1903899#M30018</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i create a MySql ODBC Direct Query Custom Connector following Microsoft Instruction&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/DataConnectors/tree/master/samples/ODBC/SqlODBC" target="_self"&gt;https://github.com/microsoft/DataConnectors/tree/master/samples/ODBC/SqlODBC&lt;/A&gt;&lt;/P&gt;&lt;P&gt;here the VisualStudio code, in RED the piece of code i think generate the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// This file contains your Data Connector logic&lt;BR /&gt;section MySql_ODBC_DQ;&lt;BR /&gt;&lt;BR /&gt;[DataSource.Kind="MySql_ODBC_DQ", Publish="MySql_ODBC_DQ.Publish"]&lt;BR /&gt;shared MySql_ODBC_DQ.Contents = (dsn as text) as table =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;ConnectionString = [&lt;BR /&gt;Dsn = dsn&lt;BR /&gt;],&lt;BR /&gt;Credential = Extension.CurrentCredential(),&lt;BR /&gt;CredentialConnectionString =&lt;BR /&gt;if (Credential[AuthenticationKind]?) = "UsernamePassword" then &lt;BR /&gt;[ UID = Credential[Username], PWD = Credential[Password] ]&lt;BR /&gt;else if (Credential[AuthenticationKind]?) = "Windows" then&lt;BR /&gt;[ Trusted_Connection="Yes" ]&lt;BR /&gt;else&lt;BR /&gt;..., &lt;BR /&gt;OdbcDatasource = Odbc.DataSource(ConnectionString, [&lt;BR /&gt;&lt;BR /&gt;ClientConnectionPooling = true,&lt;BR /&gt;HierarchicalNavigation = true,&lt;BR /&gt;TolerateConcatOverflow = true,&lt;BR /&gt;HideNativeQuery = true,&lt;BR /&gt;SoftNumbers = true,&lt;BR /&gt;SqlCapabilities = [&lt;BR /&gt;SupportsTop = false,&lt;BR /&gt;Sql92Conformance = 8,&lt;BR /&gt;GroupByCapabilities = 4, // () 0, 1, 2, 3, 4 (SQL_GB_NO_RELATION)&lt;BR /&gt;SupportsNumericLiterals = true,&lt;BR /&gt;SupportsStringLiterals = true,&lt;BR /&gt;SupportsOdbcDateLiterals = true,&lt;BR /&gt;SupportsOdbcTimeLiterals = true,&lt;BR /&gt;SupportsOdbcTimestampLiterals = true,&lt;BR /&gt;&lt;BR /&gt;SupportsDerivedTable = true,&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;LimitClauseKind = LimitClauseKind.None&lt;/FONT&gt;&lt;BR /&gt;],&lt;BR /&gt;SQLGetFunctions = [&lt;BR /&gt;SQL_API_SQLBINDPARAMETER = false,&lt;BR /&gt;SQL_CONVERT_FUNCTIONS = 0x2&lt;BR /&gt;]&lt;BR /&gt;])&lt;BR /&gt;in&lt;BR /&gt;OdbcDatasource;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// Data Source Kind description&lt;BR /&gt;MySql_ODBC_DQ = [&lt;BR /&gt;Authentication = [&lt;BR /&gt;Windows = [],&lt;BR /&gt;UsernamePassword = []&lt;BR /&gt;],&lt;BR /&gt;Label = Extension.LoadString("DataSourceLabel")&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// Data Source UI publishing description&lt;BR /&gt;MySql_ODBC_DQ.Publish = [&lt;BR /&gt;Beta = true,&lt;BR /&gt;Category = "Other",&lt;BR /&gt;ButtonText = { Extension.LoadString("ButtonTitle"), Extension.LoadString("ButtonHelp") },&lt;BR /&gt;LearnMoreUrl = "https://powerbi.microsoft.com/",&lt;BR /&gt;SourceImage = MySql_ODBC_DQ.Icons,&lt;BR /&gt;SourceTypeImage = MySql_ODBC_DQ.Icons,&lt;BR /&gt;SupportsDirectQuery = true&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;MySql_ODBC_DQ.Icons = [&lt;BR /&gt;Icon16 = { Extension.Contents("MySql_ODBC_DQ16.png"), Extension.Contents("MySql_ODBC_DQ20.png"), Extension.Contents("MySql_ODBC_DQ24.png"), Extension.Contents("MySql_ODBC_DQ32.png") },&lt;BR /&gt;Icon32 = { Extension.Contents("MySql_ODBC_DQ32.png"), Extension.Contents("MySql_ODBC_DQ40.png"), Extension.Contents("MySql_ODBC_DQ48.png"), Extension.Contents("MySql_ODBC_DQ64.png") }&lt;BR /&gt;];&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The connector work fine but it generate a DAX query with a TOPN 501 clause, so scrolling for example a table when pass 501 row power bi generate error.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The strange thing is that in power query all rows are loaded&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here the query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// DAX Query&lt;BR /&gt;DEFINE&lt;BR /&gt;VAR __DS0Core = &lt;BR /&gt;DISTINCT('aziende'[idazienda])&lt;BR /&gt;&lt;BR /&gt;VAR __DS0PrimaryWindowed = &lt;BR /&gt;TOPN(501, __DS0Core, 'aziende'[idazienda], 1)&lt;BR /&gt;&lt;BR /&gt;EVALUATE&lt;BR /&gt;__DS0PrimaryWindowed&lt;BR /&gt;&lt;BR /&gt;ORDER BY&lt;BR /&gt;'aziende'[idazienda]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone know a way to extend the TOPN row limit?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_________________________________________________________&lt;BR /&gt;Marco Iacaruso&lt;BR /&gt;iacaruso.marco2@outlook.it&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/marco-iacaruso&amp;nbsp;" target="_self"&gt;www.linkedin.com/in/marco-iacaruso&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 10:41:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1903899#M30018</guid>
      <dc:creator>Marco_Iac</dc:creator>
      <dc:date>2021-06-22T10:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: MySQL ODBC Direct Query Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1908712#M30055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/190146"&gt;@Marco_Iac&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LimitClauseKind:&lt;/P&gt;
&lt;P&gt;A number value that controls how SQL is generated for Table.FirstN and Table.Skip. Because SQL-92 didn't specify this functionality, there's a lot of variation between different SQL dialects. When not set, these functions are not folded to the ODBC source. LimitClauseKind currently has four variations, which generate SQL text as follows.&lt;/P&gt;
&lt;P&gt;LimitClauseKind.Top: `SELECT TOP 100 * FROM table`&lt;/P&gt;
&lt;P&gt;LimitClauseKind.Limit: `SELECT * FROM table LIMIT 100`&lt;/P&gt;
&lt;P&gt;LimitClauseKind.LimitOffset: `SELECT * from table LIMIT 100 OFFSET 200`&lt;/P&gt;
&lt;P&gt;LimitClauseKind.AnsiSql2008: `SELECT * from table OFFSET 200 ROWS FETCH FIRST 100 ROWS ONLY`&lt;/P&gt;
&lt;P&gt;Default: LimitClauseKind.None&lt;/P&gt;
&lt;P&gt;LimitClauseKind = LimitClauseKind.None should be no limite in TopN. The restriction may not be caused by this code.&lt;/P&gt;
&lt;P&gt;Power BI has specific MySQL connector, you can try it to connect to your data source.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-query/connectors/mysqldatabase" target="_self"&gt;MySQL database&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 09:46:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1908712#M30055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-18T09:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: MySQL ODBC Direct Query Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1908724#M30056</link>
      <description>&lt;P&gt;HI, thanks for your reply,&lt;/P&gt;&lt;P&gt;unfortunately for the moment the microsoft connector for MySql does not support direct query mode.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;The problem is the TOPN(501) which is generated automatically in the DAX Query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 09:53:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1908724#M30056</guid>
      <dc:creator>Marco_Iac</dc:creator>
      <dc:date>2021-06-18T09:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: MySQL ODBC Direct Query Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1914411#M30098</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/190146"&gt;@Marco_Iac&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MySQL connector and ODBC connector are either currently not supported Direct Query.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/desktop-directquery-data-sources" target="_self" rel="nofollow noopener noreferrer"&gt;You can see a list of all currently supported data sources&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for Power BI that can be used with Direct Query here.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 910px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/538340iE520161E16D5E123/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I found some blogs for enale direct query for custom ODBC, hope they could help you.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://community.powerbi.com/t5/Integrations-with-Files-and/Enabling-direct-query-for-a-data-source-via-an-odbc-driver/td-p/195171" target="_self"&gt;Enabling direct query for a data source via an odbc driver&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/odbc" target="_self" rel="nofollow noopener noreferrer"&gt;Enabling Direct Query for an ODBC based connector&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Your demand is a good idea, while it is not supported to implement in Power BI currently.&lt;BR /&gt;You can vote up this idea for this function：&lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19054735-direct-query-with-mysql-databases" target="_self" rel="nofollow noopener noreferrer"&gt;Direct Query MySQL support here&lt;/A&gt;.&lt;BR /&gt;Or you can submit a new idea to improve the Power BI.&lt;BR /&gt;It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 09:48:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1914411#M30098</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-22T09:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: MySQL ODBC Direct Query Custom Connector</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1914476#M30100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks for your reply&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The table refers to standard microsoft connectors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I built a custom sql odbc connector following the Micrsoft code example on github:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;A href="https://github.com/microsoft/DataConnectors/blob/master/samples/ODBC/SqlODBC/SqlODBC.pq" target="_self"&gt;https://github.com/microsoft/DataConnectors/blob/master/samples/ODBC/SqlODBC/SqlODBC.pq&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This type of connector should allow for direct query mode,&lt;/P&gt;&lt;P class="tw-data-text tw-text-large XcVN5d tw-ta"&gt;&lt;SPAN class="Y2IQFc"&gt;here the piece of code:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;// Data Source UI publishing description&lt;BR /&gt;MySql_ODBC_DQ.Publish = [&lt;BR /&gt;Beta = true,&lt;BR /&gt;Category = "Other",&lt;BR /&gt;ButtonText = { Extension.LoadString("ButtonTitle"), Extension.LoadString("ButtonHelp") },&lt;BR /&gt;LearnMoreUrl = "https://powerbi.microsoft.com/",&lt;BR /&gt;SourceImage = MySql_ODBC_DQ.Icons,&lt;BR /&gt;SourceTypeImage = MySql_ODBC_DQ.Icons,&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;SupportsDirectQuery = true&lt;/FONT&gt;&lt;BR /&gt;];&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, the connector is functional and returns up to 501 rows&lt;/SPAN&gt;&lt;SPAN class="Y2IQFc"&gt;, so direct mode works partially.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Marco Iacaruso&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 10:05:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/MySQL-ODBC-Direct-Query-Custom-Connector/m-p/1914476#M30100</guid>
      <dc:creator>Marco_Iac</dc:creator>
      <dc:date>2021-06-22T10:05:01Z</dc:date>
    </item>
  </channel>
</rss>

