Press "Enter" to skip to content

Day: July 13, 2021

OpenSearch 1.0 Released

Andrew Hopp, et al, announce version 1.0 of OpenSearch:

OpenSearch is a community-driven, open source search and analytics suite derived from Apache 2.0 licensed Elasticsearch 7.10.2 & Kibana 7.10.2. It consists of a search engine daemon (OpenSearch), a visualization and user interface (OpenSearch Dashboards), and advanced features from Open Distro for Elasticsearch like security, alerting, anomaly detection and more.

Click through for the full rundown.

Comments closed

Fun with Powershell Strings

Robert Cain shows off some features around strings in Powershell:

PowerShell has some of the best, most flexible string handling of any language I’ve used. In this post we’ll look at some string basics, then some of the features that make it special.

Note in these demos I’m using PowerShell Core 7.1.3 and VSCode. Everything here should also work in the PowerShell 5.1 and the PowerShell IDE.

Read on for types of strings, embedded quotations, string interpolation, and more.

Comments closed

Removing Comments from Code with T-SQL

Tomaz Kastrun is not pleased with these comments:

This procedure will strip all the comments from your T-SQL query and return only the parts, that are uncommented.

Procedure is able to detect and remove the following type of comments (regardless of the position of the code or comment):

– in-line comment ( — comments )

– multiline comment (Slash star /* comments)

– in-line comment block

– comment within a comment (multiline block)

Read on to learn how.

Comments closed

String Splitting with Line Numbers using CTEs

Steve Stedman has an interesting use for common table expressions:

Years ago while working on my CTE presentation for a SQL Saturday I added a blog post called “Using a CTE to Split a String Into Rows“, and since that posting I have used it many times.   But as things go in development, eventually there is a need to do something more.

Doing some complex string building to create files lately I cam across the need to use a CTE to split strings into rows but to also include line numbers.  To accomplish that I first started with the same function that I used last year, but renamed it, and added a second output column called LineNumber, here is what it looked like:

Click through for the script, as well as some additional notes.

Comments closed

Uses for SQL Server Containers

Aaron Bertrand explains two good uses for using SQL Server containers:

I used this technique of “stop, drop, repeat” just the other day while testing some behavior around case-sensitive and binary collations at the instance level. In the old days, I would have had to install a second full-on instance of SQL Server in order to test a specific instance-level collation, then repeat for every collation in my set of tests. Yikes! With containers, this is much easier; I just have to add one additional argument to the docker run command:

Check it out for a quick walkthrough of how to spin up a container and some good uses for it.

Comments closed

Filtering Power BI Slicers Based on Other Slicers

Matt Allington answers a question:

This is a follow up article from my last blog post where I demonstrated how easy it is to use two slicers to compare any two items. In the demo in my article, I specifically showed how you could compare any 2 years of choice, but the principle applies to any two products, any two customers, or any two of anything. At the bottom of that article, there was a comment from Artur asking if there was a way to limit the choices in the comparison slicer to exclude the item selected in the first slicer. E.g.

If I select Year = 2016 in slicer 1 below, then I don’t want to see Year = 2016 in the comparison slicer 2 below.  I thought that was a great question/suggestion and hence that is the topic for today.

Click through for the video in which Matt answers the question.

Comments closed