Press "Enter" to skip to content

Curated SQL Posts

Apache Kafka 4.3 Now Available

Mickael Maison makes an announcement:

We are proud to announce the release of Apache Kafka® 4.3. This release contains many new features and improvements. This blog post will highlight some of the more prominent ones. For a full list of changes, be sure to check the release notes.

With 25 KIPs and over 600 commits since 4.2.0, this release introduces many new features, improvements and bug fixes to all the components.

Read on to see what’s new, as well as what’s deprecated in the product.

Leave a Comment

Digging into Fabric Apps

Kurt Buhler explains a new capability:

For years, the Power BI community has been clamoring to have native support for visuals-as-code; the ability to create visuals, pages, or even entire dashboards with libraries like Vega, and D3.js. This is now possible in Microsoft Fabric with Fabric Apps, specifically, using a data app.

Fabric App is a new item type that lets you create and distribute any interactive experiences in Fabric, rather than pre-defined reports, dashboards, and data agents. These are web applications (or webapps). A webapp is any program that runs in a browser (like YouTube, Facebook, or Microsoft Word’s online editor) instead of one that you install on your computer (like Power BI Desktop or Microsoft Word).

Read on to see how you can build Fabric Apps, as well as what they are and aren’t.

Leave a Comment

An Introduction to Contained Availability Groups

John Morehouse takes us through contained availability groups:

Availability Groups have been one of the best high availability and disaster recovery options in SQL Server for a long time. They let us move a group of user databases together, keep replicas synchronized, offload some read-only workloads, and give applications a listener instead of a single server name.

That works great until the application needs more than just the user databases.

What about the logins? SQL Agent jobs? Permissions? Objects that live in master or msdb? In a traditional Availability Group, those objects are still tied to each SQL Server instance. That means DBAs have to keep them synchronized manually across replicas. Miss one login, job, credential, or permission and the failover might technically succeed while the application still has a very bad day.

Read on to see how contained availability groups can help resolve these problems.

Leave a Comment

Finding the Windows Groups for a SQL Server Login

Greg Low looks for an answer:

I saw a question on a SQL Server mailing list about how to determine the Windows groups for a given SQL Server login.

That’s actually easy for a sysadmin login, as they have IMPERSONATE permission for other logins/users.

It does require the ability to impersonate, as Greg mentions. If you don’t have that ability and you’re dealing with an Active Directory user, I could recommend: net user /domain {ActiveDirectoryUserName} in a command prompt to start.

Leave a Comment

A First Look at KQL

Andy Brownsword takes a look:

Someone drops a KQL query in your lap and says “you know SQL right?”. Honestly, it’s different enough to trip you up, but similar enough that you’ll pick it up quickly.

In this post I want to touch on what KQL is, why it matters, and show how familiar (or different) it is compared to our beloved SQL.

I’m a pretty big fan of KQL. If you’re at all familiar with Splunk’s querying language, the semantics are quite similar. If you aren’t, Andy provides a comparison to T-SQL.

Leave a Comment

Building Automated Tests in Power BI

John Kerski has a use for user-defined functions:

Reuse is a very important term in DataOps. It is defined as the practice of leveraging existing components, code, or processes across multiple projects to reduce redundancy and improve consistency.

However, when it comes to Power BI, reusing DAX measures across projects was a difficult ‘copy and paste’ job. For my teams, we used DAX measures to help with testing our semantic models, but ensuring consistent testing conventions (and standard schemas of the tests) required lots of manual review.

Thankfully, that changed in late 2025 when Microsoft introduced User Defined Functions (UDFs) for Power BI. In this article, I’ll demonstrate how to use UDFs for testing, plus how to standardize the way teams test their models.

Click through to see how.

Leave a Comment

Hosting an Local Embedding Service for SQL Server 2025

Greg Low has a demo:

Instead of working directly with text, images, or other rich content, an embedding represents that content as a set of numbers that capture semantic relationships learned by a model. This lets systems work with meaning in a mathematical way rather than relying on concepts like text matching.

Embeddings are the output of trained text-based AI models. One possibly surprising concept is that they’re used for similarity, as opposed to facts – and for relative closeness instead of exact matches.

SQL Server is not designed to host or execute those models. This isn’t a limitation; it is a design choice. While it would be possible to run code within SQL Server to generate embeddings, it just wouldn’t be a good idea.

Note that SQL Server can already run machine learning models directly, and use the PREDICT statement to make predictions. We don’t want to be doing that with the language models we need for embeddings, though.

There are also some really good local embedding models, and between that and the vector similarity functionality in SQL Server, you can perform semantic search without needing to reach out to an online service.

Leave a Comment

Choosing between ORMs vs Raw SQL

Jamal Hansen embraces the power of “and”:

At the beginning of this series, I promised that even if you know how to use an Object Relational Mapper (ORM) to interact with a database, knowing SQL would make you a better developer. Now that we have covered everything from SELECT to parameterized queries, it is time to answer the question that every Python developer eventually asks: when should I use an ORM, and when should I just write SQL?

I think there’s a reasonable split between the two, though the choice of ORM matters a lot as well. The heavier the ORM (nHibernate and Entity Framework, I’m looking at you), the more performance you’re trading off. By contrast, a micro-ORM like Dapper has a much slimmer profile, and if you combine that with judicious use of stored procedures for non-trivial work, the outcome is usually good.

Leave a Comment

Removing Filters from the Filter Context in DAX

Marco Russo and Alberto Ferrari compare a few techniques:

Computing values in DAX is all about understanding how to manipulate the filter context to obtain the desired output. DAX offers a wide variety of functions to manipulate the filter context, including a rich set designed to remove filters. Among the many, four are used the most: ALLALLSELECTEDALLEXCEPT, and REMOVEFILTERS. Choosing the right one can be tough.

In this article, we do not want to dive into too many details; the goal is to let our readers understand when to use which function. Whenever needed, we provide links to deepen your knowledge about specific topics. Make sure to read the additional content if you want to know more about some specific behaviors.

Click through for demonstrations and a contrast of these different techniques.

Leave a Comment

GraphQL Deployment Error due to dm_exec_describe_first_result_set()

Koen Verbeeck troubleshoots an issue:

A while ago we suddenly had an error while trying to deploy one Fabric workspace to another using fabric-cicd. The issue was with a GraphQL object and the following error was returned:

Failed to publish GraphQLApi ‘my_graphql’: Operation failed. Error Code: DatasourceInvalidStoredProcedure. Error Message: Only those stored procedures whose metadata for the first result set described by sys.dm_exec_describe_first_result_set are supported.

Read on for Koen’s diagnosis and resolution for this issue.

Leave a Comment