Press "Enter" to skip to content

Curated SQL Posts

Snapshot Testing in R

Jakub Sobolewski drills into a particular form of testing:

Snapshot testing is not about screenshots.

Most people meet it through UI regression tests: render a component, save a picture, fail the build when the picture changes. So the technique gets filed away as “the thing that compares images.” That is one use. But not the only one.

The mechanic underneath is general. Capture some output, save it to a file, and on every later run compare fresh output against the saved copy. The output can be a plot. It can also be console text, a log, a data frame, an error message, or a deeply nested list. Anything you can serialize, you can snapshot.

Read on to see how you can perform snapshot testing, using examples in R to demonstrate. H/T R-Bloggers.

Leave a Comment

Trusting Outputs from Fabric Data Agents

Jens Vestergaard says don’t trust, do verify:

In two previous posts I went down the path of getting a semantic model ready for AI: descriptions on every measure, an instructions file, the schema tidied up enough that a Fabric data agent has something real to read. That work has a satisfying endpoint. The model looks ready.

Ready is not the same as right.

The kind of evaluation Jens is talking about is fundamental to good business intelligence practices, regardless of whether you throw language models into the mix. Where language models do add complexity is the arbitrary scope of questions, how ambiguous people tend to be when writing, and the stochastic nature of answers. All of that makes the problem harder, though at least it isn’t an entirely different class of problem to solve.

Leave a Comment

What’s Common in Regular Expressions

John Cook muses on regular expression libraries:

The most frustrating aspect of regular expressions is that implementations vary. Features supported in one tool may not be supported at all in another tool, or they may be supported with slightly different syntax.

I learned regular expressions in the context Perl, a maximalist regex environment. This led to frustration when features I expect to work are missing [1]. One way around this is to use Perl analogs of other tools, but this is very non-standard. I want to be able to send colleagues and clients code that works out of the box.

Click through for some thoughts about the lowest common denominator for what products tend to support around regex. This is one of several tricky things when working with regular expressions: you may know a great way to solve a specific class of problem, but does the particular engine you’re using actually support that method?

Leave a Comment

An Introduction to Memory Grants in SQL Server

Erik Darling has a new video for us:

Erik monitoring tool mogul darling here with Darling Data. In today’s video, much like I think I foreshadowed in yesterday’s office hours video, we are going to talk about memory grants. We’re going to do a somewhat gentle introduction to them and then in the next video we’ll talk a little bit more about where they get interesting. 

Erik shares his perfectly reasonable take on the nature of strings. I’d probably also get rid of dates as well—too much confusion there for my taste.

Leave a Comment

SQL Formatting in SSMS 22.7

Chad Callihan tries out a new feature:

Code formatting can be a touchy subject. Sometimes there are clear rules to designate right and wrong, and sometimes there’s not. Tabs versus spaces, anyone?

Surprisingly, SQL Server Management Studio has never had a built-in SQL formatter. Users were always left to use third-party tools or format by hand. But with the latest SSMS 22.7, SQL formatting finally comes built-in.

Let’s look at some examples and see how it performs.

Chad also spotted a problem in the formatter as it is in that release.

Leave a Comment

No More RC4 for Kerberos

Mike Lynn provides a heads-up:

In July 2026 Microsoft is making a change that may impact your environment. The change being implemented will make your environment more secure by no longer accepting the RC4 algorithm for the Kerberos protocol by default. The problem though is it could cause authentication failures, services to not start, and Kerberos to stop working. Microsoft has been working to implement this change since January 2026, and July 2026 is the final phase.

Click through to see what this means and what you can do to make sure it doesn’t affect you.

Leave a Comment

Introducing pg_hardstorage

Hans-Jürgen Schönig announces a new open-source project:

PostgreSQL was once primarily deployed on dedicated servers and virtual machines, and now runs across managed database services, Kubernetes platforms, cloud environments, hybrid infrastructures, and everything in between. Many organizations operate several of these models simultaneously, often while supporting growing data volumes and increasingly demanding recovery requirements. As PostgreSQL deployments have evolved, so have the conversations surrounding backup and recovery.

At CYBERTEC, those conversations have been taking place across customer environments, community discussions, architectural reviews, and operational workshops for many years. The result is pg_hardstoragea new open-source community project focused on PostgreSQL backup and recovery.

Click through for a quick overview, as well as links to the project homepage and GitHub repo.

Leave a Comment

VS Code Extension for Availability Group Read-Only Routing

Denny Cherry announces an extension:


Microsoft introduced Read-Only Routing to Always On Availability Groups many versions of SQL Server ago. However, Microsoft never added any sort of UI to SQL Server Management Studio. Years ago, DCAC released a Windows application to manage your Read-Only Routing configuration. We’ve converted our Windows application into a VS Code extension called SQL Always On Read-Only Routing Configuration, which you can download from the website or via VS Code.

Click through to learn a bit more about the extension. You can also view it in the VS Code Marketplace.

Leave a Comment

Implementing IoT-Style Data in Microsoft Fabric

Hristo Hristov takes us through a walkthrough:

Hardware sensors or diverse types of equipment can generate IoT data at a high frequency, e.g., every second. Additionally, IoT data can be messy, semi-structured or just have huge volume and many disparate sources. How to ingest and model IoT data in Microsoft Fabric using the medallion lakehouse architecture?

As I was reading through this, the thing that kept coming to my mind is, if we’re really working with device data at a fairly high periodic frequency (e.g., once a minute or more often), this is probably a job for the Eventhouse and KQL. Though if your devices either don’t collect push information more frequently than, say, hourly, this approach is probably fine.

Leave a Comment

Thoughts on Deploying Fabric Data Agents

Marc Lelijveld performs a deployment:

Over the past year, I’ve frequently blogged about Fabric Data Agents. Alongside myself, many other community members have been sharing their experiences and best practices to get the most out of Data Agents. However, there is one topic I rarely see discussed: deployment of Data Agents.

As Data Agents become part of production-grade solutions, deployment and lifecycle management become increasingly important. Building a Data Agent is one thing, but moving it consistently between Development, Test, and Production environments is a completely different challenge.

In this blog, I will share my current best practices around deploying Fabric Data Agents, including what works today, where the limitations are, and the gaps that still exist.

Read on to see what Marc recommends at this time, with the proviso that some of this will likely change as the product develops further.

Leave a Comment