When working with code generated solutions we often need to convert datasets from SQL Server (T-SQL) data types to Azure Data Lake Analytics (U-SQL) data types. As you probably know U-SQL has a hybrid syntax of T-SQL and C# which Read More …
Month: May 2020
Part 9: Extending U-SQL
There are 5 kinds of User-Defined entities in U-SQL User-Defined Functions (UDFs)User-Defined Types (UDTs)User-Defined Aggregators (UDAggs)User-defined Operators (UDOs)User-Defined Appliers All of them are defined by .NET code. C# is not required. Any .NET language will work. User-Defined Functions User defined functions are normal static methods on a .NET Class. Read More …
Part 8: Set operations and Joins
Set operations are a way of merging rowsets together based on set theoretic operations such as union (UNION). intersection (INTERSECT), complement (EXCEPT). Sample data Let’s define two RowSets: @a and @b. Notice that both RowSets have duplicate rows. UNION UNION combines two rowsets. UNION Read More …
Part 7: Window Functions
Window functions were introduced to the ISO/ANSI SQL Standard in 2003. U-SQL adopts a subset of window functions as defined by the ANSI SQL Standard. Window functions are used to do computation within sets of rows called windows. Windows are defined Read More …
Part 6: The U-SQL Catalog and Assemblies
The U-SQL Catalog is the way U-SQL organizes data and code for re-use and sharing. Catalog organization Every ADLA account has a single U-SQL catalog. The catalog cannot be deleted.Each U-SQL catalog contains one or more U-SQL databases.Every catalog has Read More …
Part 5: Working with FileSets
Reading and Writing Files: Built-in Extractors U-SQL has three built-in extractors that handle text Extractors.Csv() reads comma-separated value (CSV)Extractors.Tsv() reads tab-separated value (TSV)Extractors.Text() reads delimited text files. Extractors.Csv and Extractors.Tsv are the same as Extractors.Text but they default to a specific delimiter appropriate for the format they support. Read More …
Part 4: U-SQL Expressions
Overview Clauses such as SELECT, WHERE, and HAVING (among others) allow you to enter U-SQL expressions. An expression in a programming language is a combination of explicit values, constants, variables, operators, and functions that are interpreted according to the particular rules of precedence and Read More …
Part 3: Parameters and Data Types
The DECLARE statement allows us to define parameters to store values for things that aren’t RowSets. We’ll start with this snippet DECLARE can assign constant values to a name. In this case we can assign the input file to a parameter. Parameter values Read More …
Part 2: Transforming RowSets
In this chapter you’ll focus on the fundamental ways in which rowsets can be created and modified. Creating a RowSet from another RowSet Effectively this script just copies the data without transforming it. However, if you look at the output Read More …
Part 1: Introduction to U-SQL
In this blog you will master the mechanics of running U-SQL on your own box with Visual Studio. You will also get familiar with basic U-SQL concepts. If you come from a SQL background, you’ll notice that U-SQL queries look Read More …