Press "Enter" to skip to content

Day: May 7, 2026

Setting Function Parameters for Debugging in R

Jason Bryer has a function:

I tend to write a lot of functions that create specific graphics implemented with ggplot2. Although I try to pick graphic parameters (e.g. colors, text size, etc.) that are reasonable, I will typically define all relevant aesthetics as parameters to my function. As a result, my functions tend to have a lot of parameters. When I need to debug the function I need to have all those parameters set in the global environment which usually requires me highlighting each assignment and running it. This function automates this process.

Click through to see how it works. H/T R-Bloggers.

Leave a Comment

Database Deployment Variables with SQLCMD

Andy Brownsword changes a variable:

A regular Database Project deployment is static and delivers consistent results regardless of environment. When it comes to schema, that’s usually desired, but data is a different story.

Data is environment specific. You want a Database Project that works across all environments. You want smarter deployments. You need SQLCMD Variables.

These have been the go-to method for handling different environments and other things that change between releases since I started using database projects about 15 years ago. Looks like not a lot has changed on this front, but it’s good to see that they still work as expected.

Leave a Comment

T-SQL Tricks from Recent Versions

Rebecca Lewis has three tricks for us:

Three T-SQL features that have shipped over the last few releases and quietly retired patterns many of us are still using out of habit. Each replaces a stale workaround with one line of code, and in two of three cases it runs much faster, too. Take a look, try them out.

Click through for Rebecca’s list. And if you want a full talk’s worth of these sorts of things, I happen to have one.

Leave a Comment

Against Data Lakes

Christophe Pettus lays out an argument:

If your engineers have told you that you need a data lake, you should be a little suspicious. Most organizations that build data lakes don’t need them, and a substantial fraction of the ones that do build them end up with what the industry — without any irony — calls a “data swamp.” So before we get to what a data lake is, let me say plainly: the right answer is often “not yet, and maybe never.” The interesting question is when “yet” becomes “now.”

I think my level of agreement is about 80%, and I’m glad that Christophe anticipated my “It’s really useful for data science work” argument. If the large majority of your data is relational in nature, then yeah, a data lake seems like overkill. And most of the time, I see companies taking that lake data and then organizing it into a warehouse later.

I’d say the biggest downside to relying on a data warehouse is the latency of requests. I need to get some dataset that includes columns A, B, and C from a table in the relational database but I’m not 100% sure that I really need A, B, and C because I need to train a model first or otherwise work with the data in some significant way. The OLTP DBAs don’t want me writing large-scale analytical queries against this data because of the performance implications. The BI developers/DBAs give me a turnaround time in months on this data, and if it turns out I don’t need it, they’ve wasted a lot of time for nothing.

That kind of scenario, in my mind, is what compels people in organizations to push for data lakes or something similar.

Leave a Comment