Press "Enter" to skip to content

Day: May 23, 2023

Opening a Browser in Powershell

Robert Cain starts a process:

As part of my ArcaneBooks Project I described how to use the OpenLibrary Simple API to get book data.

In that post I also showed a way to bring up the webpage for an ISBN. I had a thought, why not build a function to add to the module to do that? This way a user would have an easy way to compare the output of the web API call to what the site holds.

In this post I’ll describe how to use the Start-Process cmdlet to open a target webpage.

Read on for the code to do this.

Comments closed

Contrasting Two Visuals: Stacked Column Charts and Line Charts

Steve Jones performs a comparison:

I ran across an interesting post from Rita Fainshtein that looked at the different types of graphs for a set of data. I thought that was interesting, so I ran my own experiment. I found for my data, a line graph was better, but let me know what you think.

My data set was simple, a few players across a few events and their number of kills. I coach volleyball and I’m always trying to present stats in a useful way. Here was the small set I picked.

Something to keep note of is that line charts generally imply time series data: you are looking at some periodic activity and analyzing changes between periods.

The stacked column (or bar) chart tells you two things: the total and the first event. It’s really hard to discern any other events from a stacked chart comparison, as Steve points out.

If you don’t have periodic data or if you’re more focused on general trends than what happened at a specific event, the Cleveland dot plot (available in custom visuals) could plot each of the events, with the Y axis representing player names and the X axis representing number of kills, and each dot being a specific game. This saves a lot of real estate and gives you an idea of how points cluster, especially if you look at a larger number of games or players.

Comments closed

Comparing Two Objects in Powershell

Patrick Gruenauer sees which of these is not like the others:

In this short blog post, I will show you how to compare two PowerShell objects to find differences between them. I will also give you an example on how to create objects for testing purposes. Let’s dive in.

If you’re familiar with the diff command, you’ll have some idea here. One advantage to Compare-Object, however, is that Powershell is dealing with objects rather than strings, allowing for more complex comparison scenarios assuming your objects are set up for it.

Comments closed

Reusable Power BI Deployment Pipelines

Richard Swinbank re-uses a pipeline:

Implementation of one pipeline per report makes additional demands of a developer when creating a new report. To make this easier to manage, in this post I look how to make pipeline creation as simple as possible, by building each pipeline from a set of reusable components.

Click through to see how this works in Azure DevOps. I’d expect the process to be reasonably similar for GitHub Actions as well.

Comments closed

The Current Status of the Lakehouse Architecture

Paul Turley is happy:

When I first started attending conference and user group sessions about Lakehouse architecture, I didn’t get it at first, but I do now; and it checks all the boxes. As a Consulting Services Director in a practice with over 200 BI developers and data warehouse engineers, I see first-hand how our customers – large and small – are adopting the Lakehouse for BI, Data science and operational reporting.

Read on for Paul’s thoughts. My main concern with the strategy has always been performance, with the expectation that it’d take a few years for lakehouse systems to be ready for prime time. We’re getting close to that few years (back in 2020, I believe I estimated 2024-2025).

Comments closed

Notes on Postgres Backups

Muhammad Ali hits us with it:

Backing up your PostgreSQL database is a critical task for ensuring the safety and availability of your data. In the event of a hardware failure, software error, or other disaster, having a recent backup of your database can mean the difference between a brief outage and a catastrophic data loss. In this blog post, we’ll cover best practices for backing up PostgreSQL database.

Click through for some notes on various backup utilities (pg_dump, pg_dumpall, pg_basebackup), when you might want to use each, and a few more topics.

Comments closed

Capturing Stored Procedure Call Parameters

Greg Dodd has an Extended Events session for that:

Do you ever have a stored procedure that you know is performing badly and needs tuning, but you’re struggling to capture when it is run or what parameters were passed in?
I had this problem recently, I knew that a particular stored procedure was running slowly for some parameters, but figuring out what the bad combination was proved to be very difficult. What if, instead of trying to guess what the parameters were, I just captured all of the time that the stored proc ran, along with the run time?

This isn’t something you’d want to run for everything at all times, I’m sure, but this can be quite important when you’re fighting one poorly-performing stored procedure.

Comments closed