LimitClauseKind.Limit (3) is an enumeration that describes the type of limit clause supported by the SQL dialect used by this data source. It is a member of the LimitClauseKind.Type and specifies that this SQL dialect supports a LIMIT specifier to limit the number of rows returned.
The Odbc.DataSource function lets you connect to various data sources. Within this function, there’s a parameter named
SqlCapabilities. This parameter can be used to specify certain capabilities or modifications to the SQL query being executed.
One of the options you can set within
SqlCapabilities is the
LimitClauseKind. This kind hasn’t been widely documented.
Here’s a simple example to illustrate the use of LimitClauseKind.Limit:
Odbc.DataSource( "dsn = your_dsn", [ HierarchicalNavigation = true, SqlCapabilities = [ LimitClauseKind=LimitClauseKind.Limit ] ] )
By setting the
Limit, you’re instructing the query to use the SQL “LIMIT” clause. This can be particularly useful when you want to limit the number of rows returned from a large dataset.
Generally this is done through the user-interface using the navigation pop-up screen that appears when selecting Odbc.DataSource as method to connect.
Learn more about LimitClauseKind.Limit in the following articles:
- ODBC Data Sources, The SqlCapabilities Option And Power Query/Power BI Data Refresh Performance
The article highlights the impact of the “Supported row reduction clauses” option in Power Query for ODBC data sources on data refresh performance and the efficiency of the Power Query Editor. » Read more
Other related enumerations are:
Here’s a list of functions that work with LimitClauseKind.Type: