Press "Enter" to skip to content

Day: December 19, 2022

An Overview of R7

Nicola Rennie explains the purpose of a new standard for object-oriented programming in R:

The two main OOP systems in R, S3 and S4, both have their advantages and their limitations. For example, in S3 there’s no systematic object validation to make sure an object’s class is correct. In S4, the syntax for defining classes is rather unusual and relies on side effects. Issues such as these mean that, unlike other programming languages, there isn’t a dominant approach to OOP in R.

Now imagine you could take the best bits of S3 and the best bits of S4. That’s where R7 comes in. 

Read on to learn more about how R7 compares to other object-oriented paradigms in R, such as S3, S4, and R6.

Comments closed

MLflow in Action and Responsible AI

Tomaz Kastrun continues an advent of Azure ML. Day 16 shows off MLflow:

Yesterday we have looked into how to start the MLflow configurations and today, let’s put this to the test.

We will create a new notebook and use Heart dataset (link to dataset) to toy around. We will also import xgboost classifier to asses the accuracy of the presence of heart disease in the patient. We will be using a categorical (integer) variable with values from 0 (no presence) to 4 (strong presence) and attempt to classify based on 15+ attributes (out of more than 70 attributes).

Day 17 pivots to using the responsible AI dashboard:

Azure ML has provided users with collection of model and data exploration with the Studio user interface. But it also provides compatible solutions with Azure ML and Python package responsibleai. With the help of widgets, we will create an sample of dashboard to explore the solution with assessing the responsible decisions and actions.

Comments closed

Building Retry Logic for Database Calls

Jose Manuel Jurado Diaz tries and tries again:

Today, I worked on a case that our customer faced an execution command timeout “Msg -2, Level 11, State 0, Line 0 – Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding

As this business process is running over the night and they need to ensure that the execution will be completed, they asked if there is possible to implement an Execution Retry Logic. 

In the similar way that we have for Retry-Logic for Transient Failure We could implement a similar mechanism to retry the operation, the only thing that we need is to change the commandTimeout parameter, for example, in .NET. 

Click through for an example of how you can implement this in code. I’d also recommend Polly, which is a library explicitly built for these sorts of issues.

Comments closed

Reverse File Order and Rename via Powershell

Jana Sattainathan gets things backwards and then forwards:

In the case of this app, I just did “Select All” within the app and moved all the videos over to “Photos”. When I downloaded the content to my computer, I noticed that it downloaded the most recently downloaded video first and the oldest video last. This meant the file names given to the videos were in reverse order of chronological order.

Read on to see how you can use Powershell to sort this all out.

Comments closed

Reducing Child Procedure Temp Table Plan Cache Pollution

Joe Obbish resolves a specific type of plan cache issue involving shared temp tables:

The problem can be observed with a simple repro script. The child stored procedure performs a series of updates on a temp table. The parent procedure creates the temp table, calls the child stored procedure, and returns data from the temp table.

Click through to see an example of the issue, as well as one technique to mitigate the problem.

Comments closed

Fixing Formula.Firewall Issues in Power Query

Imke Feldmann shorts out a firewall issue:

Formula.Firewall issues can hit you when designing your queries or even “out of the blue” when suddenly refreshes in the service are failing due to changes in the query evaluation.
You will find a lot of methods published on the internet which are good and cover different scenarios. But there is also a very quick fix method that I learned from Miguel Escobar that I want to demonstrate in this post. This will basically circumvent the data privacy level, so make sure that you understand the implications (risk of data leakage from one source to another). If not, please read Miguels article first!

After reading Miguel’s post, read on for a fix.

Comments closed

Certifying Content in Power BI

Soheil Bakhshi certifies the quality of this Power BI content:

In the previous post, we discussed that a Power BI administrator must enable certification and grant sufficient rights to the security groups. Therefore, all members of the specified security group are authorised to certify the content. If you are a Power BI administrator, follow these steps to do so:

This post is a step-by-step guide to enabling content certification, as well as how to certify specific types of content.

Comments closed