Press "Enter" to skip to content

Day: October 27, 2025

Using Dygraphs in R

Thomas Williams builds a chart:

I also wanted to get a little interactive with my analysis, and came across Dygraphs for R https://rstudio.github.io/dygraphs/ which wraps the “venerable” (according to creator Dan Vanderkam https://github.com/danvk) javascript charting library of the same name, first released in 2006.

I used Dygraphs in an R script file (it can work equally well in R Markdown) to quickly chart my time series data, loaded from the CSV file. Dygraphs were simple to use, are a solid pick among other charting libraries and very functional for being free and open source.

Read on for a few examples of charts, as well as the entirety of Thomas’s code.

Leave a Comment

Star Schemas and Keys

Chris Barber provides a primer on the types of keys that are critical for a star schema:

Keys are a core component of star schema modelling; relationships between tables are built using the keys. This article covers:

  1. The main key types
  2. Star Schema diagrams
  3. Best practices when using Keys

An understanding of keys become increasingly important with more complex solutions. Not only do you need to understand them from a modelling perspective, but a common vernacular is required to communicate with team members.

It’s easier to think of the keys Chris describes in two separate classes rather than four unique items. Surrogate and natural keys are descriptors of a primary key (or any other unique/alternate key), after all.

Leave a Comment

Decimal Precision and Rounding in SQL Server

Jiri D. provides a warning:

Do you ever worry about how you declare NUMERIC or DECIMAL data types in SQL?
Do you sometimes “add a bit more” precision—just to be safe?
Have you considered how that small decision could actually change your arithmetic results?

I ran into this recently when comparing data between two environments that should have produced identical results. One calculated field was slightly off — and the culprit turned out to be a difference in numeric data type declarations.

Read on to see what happened. The differences weren’t massive, but if you were expecting an exact match, seeing a difference, even at the 7th or 8th spot after the decimal, could be jarring.

Leave a Comment

Installing SQL Server 2025 Standard Developer Edition on Linux

Rajendra Gupta tries out a new edition available in SQL Server 2025:

In the article “Install SQL Server 2025 Standard Developer Edition,” we explored the installation of SQL Server 2025 Standard Developer Edition on the Windows platform. SQL Server 2025 (Preview) also works on Linux editions, and it is equally important to cover the installation steps. Let’s see how we can install it on an AWS EC2 instance running Ubuntu.

The first half of the article covers spinning up an EC2 instance. Interestingly, the prompt to choose your edition of SQL Server was only partially updated—it still asks for you to choose an option between 1 and 10, but there are now 11 options available and I’m now curious if the conditional logic in the script to choose your edition works if you want to use Enterprise Core. Rajendra does note an error message that pops up around licensing, but that could be a release candidate thing.

Leave a Comment

Adding Commas to Numeric Output in SQL Server

Andy Yun is speaking my language:

One thing that’s always driven me crazy is when I have large numbers in my resultsets and the lack of commas for readability. For a lot of different things I do, the more commas a number has, the more attention I want to give to a given value.

Andy shows examples of formatting to two and zero spots after the decimal, respectively. In a talk I give on analyzing business data with T-SQL, I also demonstrate how to show currency-based results:

FORMAT(SUM(o.Quantity * sih.LastCostPrice), N'$0,###.##') AS TotalCost

This starts each cost record with a dollar sign, ensures you have commas in the thousands spots, and have a two-digit decimal value. That would return back a result like $31,409,113.00, which is a lot easier to read than 31409113.

Leave a Comment

Linux and NUMA

Chris Travers provides an overview of NUMA:

This entry in the series focuses on the low-level hows and whys of Non-Uniform Memory Access so that it is possible to understand the solutions and recommendations later with a focus on conceptual details.  Unfortunately in many details this requires focusing on technical details as often the concepts without the details are confusing at best.

Read on for a quick history of NUMA and what options are available in the Linux kernel.

Leave a Comment