Enter a SQL Query by connecting to a .sql file instead of explicitly typing the SQL. This option would allow a developer the ability to maintain their SQL code in one place (instead of in Power Query and in the .sql file). Currently, it is possible to point to a .sql file and upload, but this requires manipulation of M, and changing the privacy settings to Public. Or via the use of calling the external stored procedure xp_cmdshell which requires database permissions to be granted, and the ability to write a batch script.
3 Comments
- GDPR-aRalAT6CoUNew MemberAgree, need to link to the .Sql or whatever and have the Power BI. This way I can use the same query over and over and only store in one place for updating.
- luke_beaconNew MemberFor the record, anyone curious about the comment "it is possible with manipulation of M," here is one way it can be done: let SqlSource = Table.FromColumns({Lines.FromBinary(File.Contents("C:\Users\user\ExtractQuery_ForPowerBI.sql"), null, null, 1252)}), #"Transposed Table" = Table.Transpose(SqlSource), #"Merged Columns" = Table.CombineColumns(#"Transposed Table",Table.ColumnNames(#"Transposed Table"),Combiner.CombineTextByDelimiter("#(lf)", QuoteStyle.None),"Query"), Source = Sql.Database("server_name_here", "database_name_here", [Query=#"Merged Columns"{0}[Query], CreateNavigationProperties=false]) in Source This works by transposing the rows (since reading a file source brings a well formatted query in as multiple rows), merges them with a linebreak as the delimiter (to avoid issues with comments ruining the code when all on one line), then uses that value as the query source.
- fbcideas_migusrNew MemberStatus added:Needs Votes
Recent ideas
Programmatic point-of-failure recovery for Fabric pipelines
The Fabric monitoring UI already supports Rerun → rerun from failed activity. That capability is only reachable by a human clicking in the portal. Please make point-of-failure recovery available to a...EversonElias2 hours agoRegular VisitorNew2Views0likes0CommentsEnable Managed Private Endpoints Support for Microsoft Fabric Capacities Below F64
Managed Private Endpoints in Microsoft Fabric are currently supported only on F64 and higher capacities. Customers using lower capacities, such as F8, cannot establish private connectivity to Azure s...v-tsindhu4 hours agoMicrosoft EmployeeNew6Views0likes0CommentsAccessibility bug: Notebook cell text becomes invisible under Windows 11 High Contrast mode
Any text written inside a Fabric notebook is invisible when Wndows High contrast mode is enables. This applies to cell text only (not the UI). In addition, auto-complete windows are not respecting t...abigb5 hours agoNew MemberNew3Views0likes0Comments