Press "Enter" to skip to content

Curated SQL Posts

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

A Recap of FabCon Barcelona

Eugene Meidinger covers the news:

There were many announcements last week at FabCon Barcelona. Overall, there was one clear theme: semantic models are as important as ever and have more use cases than ever before.

  • You can do more with Fabric Apps soon. They will be included with Pro and PPU licenses, along with Fabric SQL DBs (up to 1 GB).
  • Microsoft has officially committed to the Apache Ossie format as a vendor-neutral way of defining semantic models. A very early two-way converter is up on GitHub.
  • Semantic meaning will be able to live in your Fabric lakehouse with semantic views. This will make it easier to define business meaning closer to the data.
  • Fabric ontologies can now use DAX measures as explicit metrics and can be created from multiple semantic models.

Additionally, Microsoft has shown a clear and continued commitment to supporting AI agents for Power BI report development, Fabric App development, and semantic modeling. Expect this to continue into the future.

Click through for a dive into some of these topics.

Leave a Comment

Moving the SSMS Status Bar to the Top of the Screen

Hemantgiri Goswami makes a move:

I have a strange preference. I keep my Windows taskbar at the top of the screen, and I have been doing so for years. Anything requiring attention shall be positioned at the TOP.

This isn’t about aesthetics.

When you administer Development, UAT, Pre-Production, and Production databases throughout the day, the SQL syntax doesn’t change. The query window doesn’t change. Sometimes, even the database names don’t change.

I’d never thought to do that before, to be honest.

Leave a Comment

Securing MCP Servers Connected to a Database

Dejan Lukic shares some advice:

AI agents don’t ask permission before every query. Instead, they themselves decide which tools to call and chain together. That’s a fundamentally different risk model than traditional access control – and it’s exactly why MCP (Model Context Protocol) servers connected to databases need their own security playbook.

This guide covers the failure modes to watch for: confused deputy, token passthrough, prompt injection, over-scoped credentials, and session hijacking. Then, how to prevent those failure modes – using authentication, authorization, and least-privilege controls.

Treat them like any other often-confused employee. Which, in many environments, means making them sysadmins.

Leave a Comment

Implicit INNER JOINs from LEFT OUTER JOINS

Dualcore DBA demonstrates how you can turn an outer join into an inner join on accident:

This post is a quick public service announcement to serve as a reminder to be careful with joins in SQL, particularly in queries with a large number of INNER and LEFT JOINs.

An INNER JOIN onto a LEFT JOIN will effectively make that LEFT JOIN an INNER JOIN.

This is a bit different from the other major case: a LEFT OUTER JOIN whose column you use in the WHERE or HAVING clauses.

Leave a Comment