Apresentamos como identificar o códido SQL utilizando a consulta nativa do Microsoft Power BI e a ferramenta SQL Server Profiler.
1. Get data from a SQL Server source (GET DATA):
To get data from a SQL Server source in Power BI, you can follow these steps:
2. Understand DATA CONNECTIVITY MODE, STORAGE MODE:
3. Native Query (QUERY FOLDING):
Query Folding refers to Power BI's ability to translate and send some of the query logic to the underlying database for execution, improving performance. This is commonly used in relational data sources such as SQL Server.
Example:
let Source = Sql.Database("YourServer", "YourBank"), SourceQuery = Source{[Schema="dbo",Item="YourTable"]}[Date] In fashion SourceQuery
4. Identify queries by using
Power BI (QUERY REDUCTION):Disabling filters
on visual interactions can be done to optimize report performance. This prevents unnecessary queries from being sent to the database, reducing the load.
DisableRelationshipFilter is used to disable related filters on a specific table Evaluate DisableRelationshipFilter('Table1')
These are basic concepts and examples that may vary depending on the complexity of your environment and the specific requirements of the Power BI report.
Data Scientist and Consultant for Digital and Analytics Solutions
@fabioms