Scripts

Technical Article

T-SQL Table Valued Function to compare Semantic Versions

Semantic versioning (SemVer) is a standardized system for labeling software releases using a three-part number—major, minor, and patch—optionally followed by pre-release labels and build metadata. Comparing semantic versions is complex because it requires handling both numeric and string components, as well as special precedence rules for pre-releases and stable versions. SQL Server’s hierarchyid data type is ideally suited for comparing the numeric parts of semantic versions, enabling efficient and accurate ordering without the pitfalls of string comparison or manual parsing.

You rated this post out of 5. Change rating

2025-05-27

9 reads

Technical Article

Real-Time SQL Server to BigQuery Streaming ETL using CDC

CDC Changes: The script queries the CDC tables in SQL Server to retrieve the changes (inserts, updates, deletes) since the last sync. Each change is processed with a mapped operation type (INSERT, UPDATE, DELETE).
Real-Time Streaming to BigQuery: The captured changes are streamed directly to BigQuery using its real-time insert_rows_json method, avoiding the need for batch uploads via Google Cloud Storage.
Tracking Last Sync Time: The script tracks the last synchronization time and updates it after every successful sync, ensuring no data is missed.
Low Latency: By continuously querying the CDC tables and streaming the changes, the script achieves near real-time data synchronization.

5 (1)

You rated this post out of 5. Change rating

2024-11-13 (first published: )

482 reads

Blogs

Speaking at the TechnoSecurity and Digital Forensics East Conference

By

The Techno Security & Digital Forensics Conference (East) runs from June 3-5, 2025, this...

Techorama 2025 – Slides

By

You can find the slides for my session Building the €100 data warehouse with...

Query Hints and Estimated Plans

By

I’m working on an update to my Query Performance Tuning book for SQL Server...

Read the latest Blogs

Forums

SQL Cookbook: Query Solutions and Techniques for All SQL Users

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SQL Cookbook: Query Solutions and...

SQL Server 2022 Query Performance Tuning

By Grant Fritchey

Comments posted to this topic are about the item SQL Server 2022 Query Performance...

Architecting Power BI Solutions in Microsoft Fabric

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Architecting Power BI Solutions in...

Visit the forum

Question of the Day

CONCAT_WS

What output do the queries produce?

SET CONCAT_NULL_YIELDS_NULL ON;
SELECT CONCAT_WS ('-', NULL, NULL);
SET CONCAT_NULL_YIELDS_NULL OFF;
SELECT CONCAT_WS ('-', NULL, NULL);

See possible answers