Press "Enter" to skip to content

Curated SQL Posts

Deployment and Release Strategies for Fabric CI/CD

Marc Lelijveld digs into CI/CD topics:

Recently, I wrote a blog about the new branch-out feature in Git connected Fabric and Power BI workspaces. In this blog, I will continue the topic of Git integration by discussing various setups you could consider in your Git integration, deployment and release strategies as part of your continuous integration and continuous delivery setup.

Will you connect Git only to your development workspace, or to all stages? And how do you handle your deployment? Keep reading to find out the different patterns you can consider!

Hey, I’m the one who’s supposed to tell people to read on to learn more!

Marc does a great job of laying out three patterns, so I’ll just complain a bit instead. The fact that this has been out for a year and still doesn’t support GitHub is annoying. I know that it’s scheduled to come out in Q3 of 2024, so it’s hopefully just a few months away. But it’s still annoying.

Comments closed

Unicode Characters in SQL Queries

Chad Baldwin does some interesting things with Unicode characters:

I don’t want to get too far into the weeds explaining encodings, code points, etc. Mostly because you can just Google it, but also because it’s very confusing. Despite all the hours I’ve spent trying to learn about it, I still don’t get a lot of it. There’s also a lot of nuance regarding encodings when it comes to SQL Server, different collations, and different SQL versions. However, I did come across this blog post that seems to break it down well.

Click through for a few scenarios, including things like tracking progress or marking data in a manner that’s easier to see then “True” and “False” values in columns.

Comments closed

SSMS 20.2 and a Preview of 21

Erin Stellato reaches out:

Hey SQL Tools fans!  We’re halfway through 2024 and due to a confluence of events we have a release of SQL Server Management Studio to announce, version SSMS 20.2.

While we’ve been focused on work for SSMS 21, we made time for a few updates to address known issues that affected your workflows and use of SSMS.  You can read about each update and fix in the release notes, but let’s cover some important fixes here.

Read on to see what’s new in 20.2, as well as some of the major plans in mind for SSMS 21.

Comments closed

Automating R Scripts via taskscheduleR

Steven Sanderson builds a Windows task:

Today, let’s dive into a nifty R package called taskscheduleR that can automate running your R scripts. Whether you need to execute a task every hour or just once a day, taskscheduleR has you covered. This package leverages the Windows Task Scheduler, making it a breeze to schedule and automate repetitive tasks directly from R. Let’s walk through a couple of examples from my new book, “Extending Excel with Python and R”.

Click through for those examples. Also check out Steven’s new book, that came out at the end of April.

Comments closed

Building a Data API (with POST Operations) using Data API Builder

Eduardo Pivaral digs into DAB:

In the previous tip on Data API Builder (DAB) for SQL Server, we discussed how REST APIs provide a secure and platform-agnostic method to share database information using REST or GRAPHQL and how DAB simplifies the process of creating data APIs without the need for extensive coding or third-party tools.

What can we do if we want POST operations? Is it possible to achieve? What other options do we have if we want to implement Data API solutions in our production environments?

Read on to learn more about how this works.

Comments closed

sp_delete_backuphistory Removes Restore History Too

Steve Jones susses out a problem:

I had a customer that was looking to document a restore that had occurred on one of their systems and didn’t see it. They had concerns about SQL Server accurately tracking history across time and noted they hadn’t cleaned any history.

We dug through some of their instance jobs and found one that ran sp_delete_backuphistory. The person didn’t realize this removes restore history as well. This post talks a bit about how this works.

Read on for the full story.

Comments closed

Document Templates in SQL

Sebastiao Pereira fills in the blanks:

In some industries, there is a series of repeated content stored about a specific topic, i.e., contracts, terms and conditions, legal agreements, lease agreements, bills, etc., with only minor differences. With these documents, there is a need to just replace specific keywords. What is the most efficient way to maintain consistency, data accuracy, and optimize storage?

This is a technique I’ve used a few times, and there’s no real trick to it: just pick something as your tag identifier that will never appear in the text itself.

Comments closed

Window and Information Functions in DAX

Nikola Ilic continues a series on getting ready for the DP-600 exam:

If you’re coming from the SQL world, you might have already heard about window functions. However, window functions are relatively new enhancement in the DAX language. Similar to SQL, they aim to provide the possibility to calculate specific expressions over a sorted and partitioned set of rows.

Read on to learn about three window functions in DAX, followed by a discussion of information functions and what they do.

Comments closed

Parquet Files in Pandas

Chris LaGreca works with Parquet files:

Apache Parquet has become one of the defacto standards in modern data architecture. This open source, columnar data format serves as the backbone of many high-powered analytics and machine learning pipelines, supported by many of the worlds most sophisticated platforms and services. AWS, Azure, and Google Cloud all offer built-in support for Parquet while big data tools like Hadoop, Spark, Hive, and Databricks natively support Parquet, allowing seamless data processing and analytics. Parquet is also foundational in data lakehouse formats like Delta Lake, Iceberg, and Hudi, where its features are further enhanced.

Parquet is efficient and has broad industry support. In this post, I will showcase a few simple techniques to demonstrate working with Parquet and leveraging its special features using Pandas.

Pandas does make this rather easy, as Chris shows.

Comments closed

Have a Recovery Strategy

Aaron Bertrand has a public service announcement:

I’ve talked about it before; you shouldn’t have a backup strategy, you should have a recovery strategy. I can’t possibly care if my backups succeed if I’m not bothering to test that they can be restored. And if they can’t be restored then, both technically and practically, I don’t have backups.

In one of the systems I manage, they built a very simple “test restore” process long before I became involved. Every night, it would pull the full backup for each database, restore it on a test system, and run DBCC CHECKDB against it. It would alert on any failure, of course, but the primary purpose was to always be confident that the backups could, in fact, be restored.

Aaron now has a much more robust version of this in place, which you can see in the article.

Comments closed