DirectQuery dataset queries

For DirectQuery datasets, every M query is folded to exclusively utilize the resources of the single data source. Therefore, certain M functions and query logic that lack an equivalent SQL expression for the given data source, such as Oracle or Teradata, are not supported. In these scenarios, the dataset designer can develop alternative M queries that produce the same target data structure and are supported by the source system or implement the necessary logic within the layer of SQL views supporting the dataset. 

An additional and fundamental limitation to the scope of M queries for DirectQuery datasets is the impact on query performance and user experience. Since the SQL statements representing M queries must be executed by the source system during report viewing sessions, common transformations such as converting data types and sorting tables can cause significant performance degradation.

Additionally, a high volume of sub-optimal SQL queries passed from Power BI reports can quickly drive up the resource usage of the source system. Therefore, although it's often technically possible to implement similar data transformation logic in the SQL views and M queries of DirectQuery datasets as with import mode datasets, the performance and resource implications of these transformations frequently prove unacceptable.

Dataset designers of DirectQuery datasets should document the SQL statements generated by their M queries. As shown in the Query folding section later in this chapter, these queries can be accessed from the View Native Query command within the Applied Steps pane of the Power Query Editor in Power BI Desktop. Sharing and reviewing these queries with the data source owner, or a subject matter expert on the data source can often lead to new ideas to improve performance or data quality. For example, the data source owner can analyze the indexes of the source fact table and determine whether the WHERE clause of the query can take advantage of existing indexes. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.123