Skip to content
  • Home
  • About
  • Contact
  • Legal
    • Privacy Policy
    • Cookie Policy

Peter Lalovsky

Keep it simple

Peter Lalovsky

Keep it simple
  • Home
  • About
  • Contact
  • Legal
    • Privacy Policy
    • Cookie Policy

Just a quick note: pay attention when you hash different data types. The result is different. Also the lower/upper case: Keep it simple :-)

Encryption T-SQL

T-SQL: Hash Different Data Types

  • Encryption
  • HASHBYTES()
  • T-SQL
by Peter Lalovsky
Published 2021-11-24

The MERGE statement was introduced in SQL Server 2008 and the developers embraced it immediately. Later a feedback came and the statement was criticized as not very efficient. Aaron Bertrand collected some links about this here. MERGE statement anatomy The MERGE statement joins ‘source’ and ‘target’ tables and runs INSERT, […]

Optimization T-SQL

T-SQL: Avoid MERGE. Write separate statements instead

  • MERGE
  • Optimization
  • T-SQL
by Peter Lalovsky
Published 2021-11-04

Set-based Database Development As database developer, we need to switch our mindsets to “Set-based thinking”. In simple words we need to manipulate the data as a “set”. An example of set-based database development is: JOIN tables Aggregate the result Calculate the portion (%) of a row to the total of […]

Optimization T-SQL

T-SQL: Avoid Cursor. Use WHILE instead

  • CURSOR
  • Optimization
  • T-SQL
  • WHILE
by Peter Lalovsky
Published 2021-11-03

In a few of my previous posts (links at the end of this post), i created Kafka consumer with Python. The same can be done with Azure Function. in this example i show how to pass secrets to the Azure Function with Azure Key Vault. Create Key Vault ‘kv-afkv-test’ in […]

News

Azure: Pass secrets to Azure Function via Key Vault

by Peter Lalovsky
Published 2021-09-21

Download JupyterLab portable from portabledevapps.net: Install and start the app: Open in browser: Add PyPI: Add the code that i posted here and start the development: Related posts: Python: Build JSON Array and keep the last object based on key Keep it simple :-)

Databricks Python

Python: Jupiter Notebooks Development on localhost

1 comment
  • Databricks
  • Jupyter Notebooks
  • Portable Application
  • Python
by Peter Lalovsky
Published 2021-09-15

An ETL that i build recently instigated me to share the following excerpt of python code. The players in this ETL are: Apache Kafka (Source) Azure Data Factory (ETL app) Azure Databricks (Extract and Transform with Python) Azure Data Lake Storage (File storage) Cosmos DB (Destination) In this example i […]

Databricks ETL Python

Python: Build JSON Array and keep the last object based …

2 comments
  • Databricks
  • ETL
  • Python
by Peter Lalovsky
Published 2021-09-09

Let say that we need the following transformation in SSRS report: One of the tools to do this is List. I will explain only the tricky part and will give the .rdl in the end. Drag-and-drop List in the report body: Right click the top left corner of the list […]

SSRS

SSRS: Split Groups with List

  • SSRS
by Peter Lalovsky
Published 2021-08-31

XML is dead, long live JSON! Even before i knew JSON, i thought “XML contains more metadata than data”. Today in my new development, i prefer JSON and avoid using XML, but in some cases we need to fight with XML too. In this quick example i show how to […]

T-SQL XML (SQL Server)

T-SQL: Parse “regular” and XML Column(s) to Table

  • T-SQL
  • XML
by Peter Lalovsky
Published 2021-08-20

This python code can be used to extract two files from Kafka in Azure Datalake (ADLS): extract/kafka/topic/topic_{YYYYMMDD_HHMMSS}.json – no duplicates (PK: parentId|id) extract/kafka/topic_history/topic_{YYYYMMDD_HHMMSS}.json – all the rows (PK: parentId|id|date_created) If case of error, the KafkaException is exported in a file with name error_topic_{YYYYMMDD_HHMMSS}.txt. ADF determines if there is an error, […]

Azure Data Factory Databricks Python

Python: Extract from Kafka with Azure Data Factory (Synapse) and …

2 comments
  • Azure
  • Azure Data Factory (ADF)
  • Azure Data Lake (ADLS)
  • Azure Synapse
  • Databricks
  • JSON
  • Python
by Peter Lalovsky
Published 2021-08-18
Database Model

Entity-Atribute-Value (EAV) data model gives us the flexibility to store the data in a way that we have dynamic number of: tables columns in the simplest EAV we have 3 tables: Entity Attribute Value To simplify the understanding of the model we declare: Table Entity holds the list of the […]

Backend Data Model T-SQL

Data Model: Entity-Atribute-Value (EAV)

  • Data Model
  • EAV
  • T-SQL
by Peter Lalovsky
Published 2021-07-23

Categories

Tags

Aggregate Automation Azure Azure App Service Azure Data Factory (ADF) Azure Data Lake (ADLS) Azure Synapse Backend Built-In Function C# Change Data Capture Change Tracking CSV Databricks Data Warehouse (DW) Dates DBA DDL Deployment Dynamic-SQL ETL fabric framework Good Practice Hints Jupyter Notebooks MariaDB NULL Optimization Performance PIVOT Python REST API Run-Around Running Total Running Value Script Serverless SQLCMD SQL Server SSIS SSRS String T-SQL Training User Defined Function

Posts navigation

  • Newer posts Newer posts
    • 1
    • 2
    • 3
    • …
    • 7
  • Older posts Older posts

© 2026 Peter Lalovsky – All rights reserved

Powered by WP – Designed with the Customizr theme