Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts

Thursday, 10 September 2026

Structured Streaming in Spark

Structured Streaming is the stream "processing engine" in Spark, designed for scalability and fault tolerance.  

It is build on the Spark SQL engine. Pause. This has implications to the programming model.

The "weird element" in Structured Streaming (following on from our comment on SQL engine above) is that streaming computations are expressed like queries on SQL tables (check).


A crazy case study is presented below.

Suppose you want to maintain a running word count of text data from a data server listening on a TCP socket.  This can be expressed in structured streaming!

Ironically, the most concise representation for this is in R which is least best supported language in Spark.

This is what the Python looks like.

import [STUFF]  ---> from pyspark.sql import SparkSession

spark = SparkSession(  ... .appName("WordCount") ..)

Now we create a streaming DataFrame representing text data received from the server listening on localhost:9999 and transform the DataFrame to word counts.

A quick word on port 9999. Why use this?  It is easy to remember and avoids conflicts with standard ports. Java apps sometimes use it for debugging.

(To check if it is being used: netstat -ano | find "9999").

Wednesday, 14 August 2024

How does Snowflake store data?

There are many "big data" technologies out there one of them being Snowflake. Snowflake lets you run SQL queries on data which is stored in Snowflake's internal columnar format optimized for cloud storage.

Saturday, 24 August 2019

Bug Fixed in SSIS in Visual Studio 2019 Update 16.2.3

A bug in loading SSIS packages has been fixed in the latest update of Visual Studio 2019. SSIS refers to SQL Server Integration Services, an upgrade of Data Transformation Services, or DTS.

Friday, 8 February 2013

Storing C# Strings in an Oracle Database

This is not an Oracle blog, and Windows Joe has no intention of turning it into such. However, since Oracle coding is occasionally required by the Windows programmer, occasional clarifications on the aforementioned technology are sometimes warranted.

In addition, such posts may be of interest to database enthusiasts wanting to refresh the basics.

One such, is the popular newbie question (and also asked by experienced bods who haven't touched Oracle in a long time) is what datatype to use for string data?

VARCHAR - not to be used. Why - because Oracle says so. It may work, but is not recommended.
VARCHAR2 - the recommended way to store strings (or more precisely, VARIABLE LENGTH character strings).
CHAR - for fixed length character strings.Using this type to store variable length strings is a waste of space.

So in 95% of cases, you need a VARCHAR2 to represent strings in an Oracle database.

Tuesday, 25 May 2010

Limitations of Sql Server Express

The key limitation of Sql Server Express is:

1. Maximum 4 GB database size.

Other limitations: uses only one CPU at a time even on a multi-core machine, maximum buffer size 1GB, data/import export feature disabled.