Press "Enter" to skip to content

Curated SQL Posts

Tips on Logging in R Packages

Jamie Owen continues a series on building a package around an API:

Part 1 of this series laid out some ideas for how one might structure a {plumber} application as an R package, inspired by solutions such as {golem} and {leprechaun} for {shiny}. In this installment of the series we look at adding some functions to our package that will take care of logging as our application runs. If you haven’t already, we recommend reading the first installment of this series as the example package created for that post will form the basis of the starting point for this one.

Read the whole thing.

Comments closed

Parameter Reloading in RMarkdown

Thomas Williams wants to improve the user experience:

Recently I needed to reload a parameter, without reloading the page. The parameter was bound to a data frame, where end-users selected a value and then I looked up other fields in the data frame further down the page (for example, a name was selected, but I wanted the identifier from the same record). It wasn’t exactly intuitive, so here’s how I did it.

Click through for code and explanation.

Comments closed

Maximizing Productivity in a Meeting-Filled World

Andy Levy just wants to get things done:

We need to have these meetings. They’re where consensus is reached on cross-team projects and decisions are made about timelines. They’re where we communicate to people outside our teams what’s happening. And sometimes, they’re critical for transferring knowledge to others. These are all part of the job. For better or worse, they are a nontrivial portion of The Work.

Read on for some of Andy’s tips around scheduling meetings.

Comments closed

Power BI Naming Conventions

Nicky van Vroenhoven asks, what’s in a name?

But I think it’s much broader than using only programming naming conventions these days.

In the context of Power BI, you can use naming conventions in (literally) all things that need a name, like gateways, workspaces, apps, etc.

Read on to understand why, as well as some thoughts on what makes sense for naming different Power BI-related objects.

Comments closed

Rebuilding a Dedicated SQL Pool via Azure DevOps

Sarath Sasidharan clones an Azure Synapse Analytics dedicated SQL pool:

There are many scenarios where you want to create a new Synapse dedicated SQL pool environment based on an existing Synapse dedicated SQL pool environment. This may be required when you need to create a development or test environment based on your production environment by copying complete schemas and without copying data.

Note that this process won’t move the data itself—given that you’re starting with terabytes for an effective dedicated SQL pool, trying to create a bacpac would be an exercise in misery.

Comments closed

Improving SQL Server Backup Performance

Glenn Berry makes some recommendations:

Does making your SQL Server database backups twice as fast sound interesting? SQL Server 2022 has new options to help you improve SQL Server database backup performance. If you are on an older version of SQL Server, you still have options for Improving SQL Server Database Backup Performance.

In order to improve your database backup performance, you need to understand what is happening during a database backup and what your bottleneck(s) are.

Read on for an overview of the key considerations.

Comments closed

Parameterizing Stored Procedures from Power Query

Soheil Bakhshi calls a stored procedure:

From time to time, Excel users require to get the data from a SQL Server stored procedure. The stored procedures usually accept some input parameters and return the results. But how can we dynamically pass values to the stored procedures from cells in Excel to SQL Server?

Read on for two approaches to the problem. Like Soheil, I think the second approach is much smoother, in part because it isn’t 30-something steps long.

Comments closed

Survival Analysis Model Explanations with survex

Mikolaj Spytek promotes an R package:

You can learn about it in this blog, but long story short, survival models (most often) predict a survival function. It tells us what is the probability of an event not happening until a given time t. The output can also be a single value (e.g., risk score) but these scores are always some aggregates of the survival function and this naturally leads to a loss of information included in the prediction.

The complexity of the output of survival models means that standard explanation methods cannot be applied directly.

Because of this, we (I and the team: Mateusz KrzyzińskiHubert Baniecki, and Przemyslaw Biecek) developed an R package — survex, which provides explanations for survival models. We hope this tool allows for more widespread usage of complex machine learning survival analysis models. Until now, simpler statistical models such as Cox Proportional Hazards were preferred due to their interpretability — vital in areas such as medicine, even though they were frequently outperformed by complex machine learning models.

Read on to dive into the topic. H/T R-Bloggers.

Comments closed

The Bullet Chart

Amy Esselman explains what bullet charts are and when they are useful:

A bullet graph, or a bullet chart, is a variation of a bar chart, typically consisting of a primary bar layered on top of a secondary stack of less-prominent bars. Bullet graphs are best used for making comparisons, such as showing progress against a target or series of thresholds. For example, an organization may want to measure the current year’s sales against a goal, while contrasting it with the performance of the prior year. 

Bullet graphs leverage our familiarity with bar graphs to deliver a lot of information in a compact space. If you want to display metric performance against a goal or reference point, a bullet graph offers a nicely consolidated design. 

Read on for examples and alternatives.

Comments closed