U-SQL Concepts
Summary
U-SQL combines some familiar concepts from a variety of languages: It is a declarative language like SQL, it follows a dataflow-like composition of statements and expressions like Pig and Cascading*,* and provides simple ways to extend the language with user-defined operators, user-defined aggregators and user-defined functions using C#, and provides a SQL database-like metadata object model to manage, discover and secure structured data and user-code.
How does a U-SQL Script process your Data
Currently, Azure Data Lake Analytics provides U-SQL for batch processing. Therefore U-SQL is written and executed in form of a batch script. It follows the following general processing pattern:
Retrieve data from stored locations in rowset format
- Stored locations can be files that will be schematized on read with EXTRACT expressions
- Stored locations can be U-SQL tables that are stored in a schematized format
- Or can be tables provided by other data sources such as an Azure SQL database.
Transform the rowset(s)
- Several transformations over the rowsets can be composed in a data flow format
Store the transformed rowset data
In addition, U-SQL also supports data definition statements such as CREATE TABLE to create metadata artifacts either in separate scripts or sometimes even in combination with the transformation scripts.
U-SQL Scripts can be submitted in a variety of ways. In particular you can submit them directly from within the Azure Data Lake Tools for Visual Studio, from the Azure Portal or programmatically via the Azure Data Lake SDK job submission API or the Azure Powershell extension's job submission command.
Please explore the following concepts introduced in this section: