ETL/SSIS/Azure Data Factory

Technical Article

Python 3 Script for Generating SQL Insert Statements from CSV Data

  • Script

This Python 3 script is designed to take CSV file data pasted into the csv_data variable and generate SQL insert statements that can be used to insert the data into a MySQL database. The script is easy to use and can save you a lot of time when working with large amounts of data.

You rated this post out of 5. Change rating

2023-05-08 (first published: )

5,019 reads

SQLServerCentral Article

The Art of Data Ingestion - Part 1

  • Article

Data movement is a fundamental piece of a data engineer’s duties, and recently I’ve been thinking about the art of data movement. What are some of the most important pieces that a data engineer needs to think about when confronted with data ingestion? There is of course data exporting as well, and in that case, […]

5 (8)

You rated this post out of 5. Change rating

2022-11-11

5,922 reads

Blogs

SQL Server Time Bombs

By

Common Reasons for Emergency SQL calls If you are a production DBA (or Accidental...

Book Review: A Radical Enterprise

By

I grabbed this book over the 2024 holiday season as it was on sale...

Advice I Like: Investing and Growing Rich

By

Investing small amounts of money over a long time works miracles, but no one...

Read the latest Blogs

Forums

What is time?

By Louis Davidson (@drsql)

Comments posted to this topic are about the item What is time?

KB5046856 fails to install

By webrunner

Hello experts, The following SQL update is failing to install on some of our...

where to find information about xE sqlserver.databases_bulk_copy_throughput

By Johan Bijnens

where to find information about xE sqlserver.databases_bulk_copy_throughput ? I'm searching for de description of...

Visit the forum

Question of the Day

Rows estimation with OPENJSON

Consider the following script for a Sql Server database with Compatibility Level at least 130 (Sql Server 2016):

create table tjson (
id int primary key,
j1 varchar(max),
j2 varchar(max),
j3 varchar(max));

insert into tjson (id, j1, j2, j3) 
values 
(1,
'[{"c11":"value11A", "c12":"value12A"},{"c11":"value11B", "c12":"value12B"}]',
'[{"c21":"value21A", "c22":"value22A"},{"c21":"value21B", "c22":"value22B"}]',
'[{"c31":"value31A", "c32":"value32A"},{"c31":"value31B", "c32":"value32B"}]');
How many rows does the Query Optimizer estimate for the following query?
select id, c1.c11, c2.c21, c2.c22, c3.c31, c3.c32
from tjson
cross apply openjson(j1) with(
c11 varchar(50) '$.c11',
c12 varchar(50) '$.c12') c1
cross apply openjson(j2) with(
c21 varchar(50) '$.c21',
c22 varchar(50) '$.c22') c2
cross apply openjson(j3) with(
c31 varchar(50) '$.c31',
c32 varchar(50) '$.c32') c3;
 

See possible answers