Press "Enter" to skip to content

Curated SQL Posts

Power Query Linting for Code Coverage

John Kerski has an update to pql-test:

Several years ago, I wrote a blog article introducing the concept of code coverage for semantic models: Part 8: Bringing DataOps to Power BI. With the state of Power BI technology at the time, the bridge was a little far and implementation was quite arduous.

That has changed. With Power BI Project files and User-Defined Functions becoming generally available in 2026, we now have detailed inspection possibilities with what tests exist, what specifically is being tested, and where the gaps in testing live.

I’m happy to announce that version 0.1.18 of pql-test introduces our first attempt at code coverage for semantic models: pql-test code-coverage.

Click through to see what’s new, as well as links to pql-test and more.

Leave a Comment

Working with Classes in PowerShell

Patrick Greunauer creates a class:

With PowerShell 5.0 and later, PowerShell supports object‑oriented programming by allowing you to create and use classes. Classes help you structure code, model real‑world entities, and reuse logic more effectively.

Click through for an example. Just as with most things, as soon as PowerShell starts moving from scripting to proper .NET work, it’s clear just how much less typing C# and F# require for the same thing.

Leave a Comment

SQL Copilot “Read-Only” Mode Wasn’t

Rebecca Lewis reads a CVE:

I was in Italy for a month. While I was gone, somebody got sysadmin out of SQL Copilot with a variable.

The vulnerability is CVE-2026-65669, the SSMS 22 Copilot bug I wrote about early September. The full write-up went public on September 30th, and the detail that stuck with me is how Copilot’s ‘read-only mode’ was enforced. It wasn’t a permission. It was a regex blocklist.

That blocklist is the same control we have watched fail against SQL injection for twenty years. Before I get to Copilot, let’s build one here and see it fail.

These sorts of blacklists almost never work against a committed attacker because, unless you fully enumerate the possible domain, there’s an opportunity for someone to slip through, and that’s exactly what happened here.

Leave a Comment

The Basics of GROUP BY

Louis Davidson gets back to basics:

For a while now, I really have wanted to learn the Windowing Functions in great detail. I know them well enough to make it through a lot of needs, but there are a lot of intricacies that are hard to remember. As I noted in my very first Blogging for Programmers post, writing for your own future needs is some of the best and easiest writing you will do.

When I wrote my “SQL Techniques you should know” presentation, the topic that took the longest was Window Functions. Because of their similarity to GROUP BY, I figured this was the best place to start.

Read on as Louis works through the concept.

Leave a Comment

Thoughts on the Shared SQL Server Database

Kendra Little shares some thoughts:

For more than 20 years, many small and medium SaaS companies have built products with complicated business logic and a flexible user experience on the .NET stack using an architecture with a shared SQL Server database. This approach has kept the production environment relatively simple.

These companies have new incentives to move away from this architecture because agentic development lands new business rules on the shared database fast enough to painfully cut velocity and add significant risk to deployments.

I’m not sold on the idea, but I think Kendra’s post is definitely worth the read and some noodling.

Leave a Comment

Package and Environment Managers in R

Isabella Velasquez surveys the field:

I don’t want to/can’t pass judgement on which is the best or which I recommend, because I honestly haven’t had the opportunity to explore all of them fully (a very diplomatic way of saying that I haven’t yet used all of them in a real-world context), but I would love to hear everybody else’s opinions on which they think is the best tool because I imagine people have them! 😀

Even so, this is a nice primer on what’s available and how you might want to use them. H/T R-Bloggers.

Leave a Comment

Bad Data in the Silver Layer

Andy Brownsword answers a question:

When combining and curating data in your Silver layer it’s not uncommon to find entries don’t always fit quite right. It could be missing references, incomplete data, or broken validation rules.

Should that bad data be allowed into your carefully crafted Silver layer? And if not, where should that data go?

Let’s look at some options for handling the bad data and how they compare.

This is a harder question to answer than it would first appear. In a perfect world, you’ve applied all of the data cleansing logic and you have pristine data with no errors. Also, you ride unicorns to work in the Fields of Elysium.

Leave a Comment

Working with Deployment Plans in Microsoft Fabric

Kevin Chant digs into a new announcement:

To clarify, deployment plans are a new type of Microsoft Fabric item that lets you control deployment order and automate actions as part of the deployment. For example, you can define a plan that first creates a Lakehouse and then runs a notebook afterwards to insert it with data.

Deployment plans are not another deployment option. Instead, they enrich the deployment options that are already available. At this moment in time they work with Git integration, Deployment Pipelines and supported REST APIs.

Read on to learn more about these.

Leave a Comment

Developing DAX Contracts

Marco Russo and Alberto Ferrari redline a few things:

Contract. As a DAX developer, you will use this term frequently; indeed, when developing code with an AI assistant, defining the contract is the most important task you need to complete to obtain a useful semantic model.

First things first: what is a contract? In simple terms, it is a text that identifies the rules at work in a specific semantic model. It is not just an algorithm definition: a contract can define multiple measures and multiple algorithms at the same time. However, it is not even a vague description of the model in terms of entities and relationships. It sits somewhere between the two: documentation that defines how to perform calculations in a specific model.

Read on to understand what they mean by a contract in this sense, and what has changed with the proliferation of language models generating DAX code.

Leave a Comment