Press "Enter" to skip to content

Day: February 15, 2022

A Guide to Dapper

Camilo Reyes shows how to use Dapper:

Dapper is a lightweight shim around ADO.NET for data access via extension methods. To keep this relevant to any real application, there is quite a bit of code, which I won’t be able to show, so I recommend downloading the repo from GitHub. The focus here is to walk through the code API and follow best practices for building a DAL. The set of extension methods can feel overwhelming because there is a lot of functionality to cover.

I recommend general familiarity with LINQ and the List<> generic class in C#. This guide can be used as a reference so you can read one section at a time. At each pause, I encourage you to play with the code and allow the information to sink in.

I tend to like Dapper a lot, as it’s basically a lightweight wrapper around ADO. It’s very efficient as a result and you can also use stored procedures quite easily.

Comments closed

Azure ML and MLOps

I continue a series on Azure ML:

We ended the prior series with model deployment via the Azure ML Studio UI. This is entirely manual and UI-driven. Then, we looked at model deployment via manually-run notebooks. This is still manual but at least offers the possibility of automation as we control the code to run.

From there, we moved to model deployment via the Azure CLI and Python SDK. Now we have the capability to run, train, register, and deploy models via scripts. This leads to the next phase in the process, in which we can perform continuous integration and continuous deployment of models using a tool like Azure DevOps or GitHub Actions. This is where MLOps starts to shine.

Read on for a few thoughts about MLOps and software maturity.

Comments closed

A Bayesian Approach to Pricing

John Cook has some thoughts on an interesting problem:

Suppose you want to determine how to price a product and you initially don’t know what the market is willing to pay. This post outlines some of the things you might think about, and how Bayesian modeling might help.

This post is not the final word on the subject, or even my final word on the subject. It is essentially a reply to a friend’s question turned into a blog post rather than an email.

This is a really interesting problem. Price is ultimately a signal rather than the solution. This is an attempt to understand how you start to build up enough information to start setting effective prices. Over a long enough timeframe, we’ll eventually land on a commonly accepted price but that’s an economist’s way of hand-waving away the process.

Comments closed

Updates on SSIS Framework Manager

Andy Leonard has a progress report for us:

Kent Bradshaw and I continue to update SSIS Framework Manager, the visual tool for managing SSIS Framework Applications. In our parlance, an SSIS Application consists of one or more SSIS Packages (to which we refer in the framework as application packages) configured to execute in a specific order. To date, enterprises using SSIS Frameworks (well, our SSIS Frameworks, at least) have relied on T-SQL for management functionality. We aim to change that with the next release of our SSIS Framework which will include SSIS Framework Manager.

Click through to see what they’re working on.

Comments closed

Backups from Secondary Replicas in SQL Server

Brendan McCaffrey offers up some guidance:

With Availability Groups there has always been a common theme across the industry to offload your database backups to a secondary replica. It sounds great in theory. I know people that have done this. I also know people that “thought” they were doing this. But the question is, should you be doing this?

Your scientists spent so long figuring out if they could that they forgot to ask if they should.

Comments closed

Finding Public IP Addresses in Azure

Werner Rall is looking for public IPs:

Creating Resources in Azure is so simple for IT teams these days but finding all the public endpoints that could be visible to the internet can be challenging. Why do I need to understand which IP’s are exposed to the internet? Without a proper understanding of which Public IPs are available to the internet we cannot fully secure or protect our resources. In this article we will look at using the Azure Native Graph Explorer solution to query not only Virtual Machine Public IP Addresses but other resources containing IP addresses in our Azure Tenant. 

Read on to see how.

Comments closed

INT vs CONVERT in DAX

Marco Russo contrasts two functions for us:

Writing explicit type conversions is unusual in DAX, because most of the time the implicit conversion happening between different data types in an arithmetic expression provides the results you wanted. However, you might want to enforce a type conversion for different reasons: to round a number or to make sure a certain calculation is always approximated the same way. In particular, the conversion to an integer number can be obtained using different techniques – sometimes with small differences which in borderline cases might produce different results.

What we examine in this article is the difference between two techniques to convert a number to an integer: INT and CONVERT

Read on to see the differences, including where things break down for INT.

Comments closed

Overloading Methods in Powershell

Robert Cain continues a series on classes in Powershell:

This is the next installment in our series of advanced techniques for PowerShell classes. In the previous installment we saw how to implement static properties and methods. In this one, we’ll see how to overload your methods.

We’ll take a deeper look at overloading in a moment, but first let me mention that for all of the examples we’ll display the code, then under it the result of our code when applicable. In this article I’ll be using PowerShell Core, 7.2.1, and VSCode. The examples should work in PowerShell 5.1 in the PowerShell IDE, although they’ve not been tested there.

Read on to see how overloading works in .NET.

Comments closed