Press "Enter" to skip to content

Curated SQL Posts

Power BI Model Analysis via INFO Functions in DAX

Reza Rad is leading this interrogation:

There are many DAX functions for covering day-to-day business-related calculations using measures and calculated columns. However, there is also a set of functions that can be helpful to the BI team and developers in gaining insights from the Power BI model itself. The insights can include things such as the number of both-directional relationships, the dependency of the calculations, the list of columns in tables, etc. These functions are in the category of INFO functions in DAX. Let’s see what they are and how they work.

Click through for a list, as well as how you can make use of them.

Leave a Comment

Refreshing SQL Analytics Endpoint Metadata in Fabric

Ancy Philip makes an announcement:

We’re excited to announce that the long-awaited refresh SQL analytics endpoint metadata REST API is now available in preview. You can now programmatically trigger a refresh of your SQL analytics endpoint to keep tables in sync with any changes made in the parent artifact, ensuring that you can keep your data up to date as needed.

Click through to see how it works.

Leave a Comment

Verifying SQL Server Backups via SMO

Stephen Planck does some testing:

Regularly restoring test copies of your databases is the gold-standard proof that your backups work. Between those tests, however, RESTORE VERIFYONLY offers a fast way to confirm that a backup file is readable, that its page checksums are valid, and that the media set is complete. In this post you will see how to run that command from PowerShell by invoking SQL Server Management Objects (SMO), turning a one-off verification into a repeatable step you can schedule across all your servers.

Click through for the script and explanation. I also like dbatools’ Test-DbaLastBackup command, as that can also run RESTORE VERIFYONLY but goes further and allows you to restore the backup and then run DBCC CHECKDB against its contents.

Leave a Comment

Track those SQL Agent Jobs

Kevin Hill satisfies Betteridge’s Law of Headlines:

Too many IT teams treat SQL Server Agent jobs like a coffee timer “Set it and forget it!”

Unfortunately, that mindset only works if everything else is perfect forever. Whether its backup jobs failing silently, index maintenance running on the wrong replica, or nobody getting alerts when things break, unattended SQL Agent jobs are one of the sneakiest ways to rack up technical debt. Let’s dig into what DBAs and non-DBAs alike need to keep an eye on to avoid job-related headaches.

Kevin includes some good tips on monitoring SQL Agent jobs. If you’re feeling paranoid or have a particularly important job to watch, it may also make sense to set up some monitoring alerts around the end results, tracking things like the latest load date (for an ETL job) or some other indicator of doneness, and have a monitoring solution independently verify this.

Leave a Comment

The Role of Padding in Power BI Reports

Elena Drakulevska explains why padding is so important between visuals in Power BI reports:

Now that we’ve all learned to love rounded corners, let’s talk about another quiet champion of good design: padding.

You know, that tiny bit of space inside your visuals that keeps content from being awkwardly pressed right up against the border, with no room to breathe. Yeah. That.

The ideal here is to have densely informative visuals that have sufficient padding to make it easy for a viewer to move between them.

Leave a Comment

Spark Streaming plus Drools

Ram Ghadiyaram builds a tool:

Near real-time decision-making systems are critical for modern business applications. Integrating Apache Spark (Streaming) and Drools provides scalability and flexibility, enabling efficient handling of rule-based decision-making at scale. This article showcases their integration through a loan approval system, demonstrating its architecture, implementation, and advantages.  

Click through for a bit of sample code.

Leave a Comment

Vector Search from Scratch

Kanwai Mehreen does a bit of searching:

In this article, I’ll walk you through every step from generating vector representations to searching using cosine similarity, and we’ll even visualize what’s happening behind the scenes. By the end, you’ll not only understand how vector search works but also have a working implementation you can build on. So, let’s get started.

It’s kind of funny how simple this is, but it is. A lot of the complexity is around data quality operations, as well as optimizing the search process.

Leave a Comment

Reshaping Data with the APPLY Operator

I have a new video:

In this video, I show how we can use the APPLY operator to reshape datasets, allowing us to unpivot tables and also calculate the greatest and least values for a row.

If you look closely at the scripts, you’ll see 08 and 10. In the source control repo, I also have a script 09 that covers splitting strings. Using APPLY to split strings has always been a bit of a niche case, but prior to SQL Server 2016’s introduction of STRING_SPLIT() and SQL Server 2022’s improvement of the function, I could make the case that it sometimes made sense to know how to split strings via APPLY. Today, not so much, which is why I tossed that demo from the video.

Leave a Comment

Standard Developer Edition in SQL Server 2025

Joey D’Antoni explains why this is a big deal:

No, it’s not dark mode for SQL Server Management Studio, though the votes are probably close. (Note: I feel like I’m the only IT pro who doesn’t use dark mode, and it’s because I record/present so much—pro tip: you shouldn’t present in dark mode). It’s also not the enhancements to Always On Availability Groups, but you’ll read more about those either here or over at Redmond in the coming months. The most requested feature in SQL Server 2025 is Standard Developer Edition (which is an unfortunate name, but in my discussions with the product group, there just wasn’t anything better they could come up, and legal wouldn’t approve Standard McDatabaseyface).

My hot take is that I don’t use dark mode either. More people should just have proper task lighting when they’re working.

Leave a Comment

Testing ZSTD Backup Compression in SQL Server 2025

Aaron Bertrand runs some tests:

Whether you are a bank or a hot dog stand, creating backups is a boring but essential part of managing databases. Compressing backups – like other types of data compression – can save time and storage space, at the usually unavoidable cost of CPU. There has been little change in compression throughout SQL Server’s long history, but this year, in SQL Server 2025, there is an exciting change coming.

This set of results from Aaron is a bit different from what we’ve seen from Andy Yun and Anthony Nocentino. That’s a big part of why it’s important to get several data points, and to do your own testing in your own environment with your own equipment.

Leave a Comment