Using sempy to get SQL query CU cost from the Fabric Capacity Metrics app

Download the notebook used in this post from my GitHub account here: Get SQL query CUs from Capacity Metrics.ipynb A frequent inquiry from customers goes something like this: “I ran a query on the [data warehouse or SQL analytics endpoint] and now I want to know how much that query cost me.” On the surface that seems easy enough. Afterall, the Capacity Metrics app tracks the usage for...

List Parameters for a Python Function

As someone who is newer to the world of Python I have a lot of questions. I mean a LOT. I know my way around SQL really well, but when I come to write some PySpark code I often need to dissect things to better understand what is going on and how to use different functions. Which leads me to today’s question…how do I get a list of all the parameters for a Python function? In...

Bradley Schacht

Bradley Schacht is a Principal Program Manager on the Microsoft Fabric product team based in Jacksonville, FL. Bradley is a former consultant, trainer, and has authored 5 SQL Server and Power BI books, most recently the Microsoft Power BI Quick Start Guide. As a member of the Microsoft Fabric product team, Bradley works directly with customers to solve some of their most complex data problems and helps shape the future of Microsoft Fabric. He frequently presents at community events around the country, is a contributor to sites such as, and is a member of the Jacksonville SQL Server User Group (JSSUG).

Follow Me