All about U-SQL

In my previous posts, I shared about Getting started with Azure data lake analytics and U-SQL, Basic example for U-SQL, Querying azure sql table using U-SQL.

Those who are familiar with T-SQL, getting used to U-SQL is fairly easy.

U-SQL generic syntax:

FROM "file"
USING Extractors.()

TO "file to Azure data lake store"
USING Outputters.()

We can also create user defined objects - extractors, outputters, processors, appliers, combiners, reducers.

In this post, I am going to share all the U-SQL references. 

We can create U-SQL database, schema and other objects using Data Definition Language (DDL) Statements (U-SQL)

U-SQL currently only provides a limited set of statements that persist data and no statement that directly changes persisted data - Data Modification Language (DML) Statements (U-SQL)

When it comes to U-SQL tables - U-SQL allows a table to be created by specifying a schema, or by specifying a query where the query’s result type implies the table’s schema.

U-SQL provides the ability to create external tables over data (stored in Azure SQL Databases) that is not owned by the U-SQL metadata object itself. 

In U-SQL, in addition to creating procedures, views & functions, there is something which is not available in t-sql and which is well concept in pl/sql is packages.

Other general querying operation using SQL looks similar in syntax along with U-SQL generic syntax:

We can submit a job (execute) U-SQL scripts from visual studio, azure portal and also using powershell command - Submit-AdlJob

U-SQL provides a set of built-in catalog views that describe the content of the U-SQL Catalog for a specific Account and database.We can also use powershell command to get list of catalog items - Get-AdlCatalogItem

We can also embed R and python code in U-SQL script.



See Also: 

No comments: