In this demo, I will be working with U-SQL where I will be querying in a TSV file on Azure Data Lake Store.
Tips
You should hold an Azure Data Lake Store account, Azure Data Lake Analytics account; and a TSV files should have been added in your Azure Data Lake store account. Click here to work on this stuff.
About U-SQL
U-SQL is a language created by Microsoft that combines traditional SQL Data Definition Language (DDL) and Data Manipulation Language (DML) constructed with expressions, functions, and operators based on the popular C# programming language. It marries the benefits of SQL with the power of expressive code. And, it is supported natively in Azure Data Lake Analytics.
Demo
Log into your Azure Portal using this link.

Open up your Data Analytics account that you have created. Here, I have it as dlanalyticsnaju, as shown below.

Click on "New job" in your Azure Data Lake Analytics account.

Paste the below query into the empty query blade.
- // here we define the schema for the imported posts.tsv file
- @posts = EXTRACT id int, [type] string,
- acceptedanswerid int ? ,
- parentquestionid int ? ,
- creationdate string,
- score int,
- views int,
- ownerid int,
- title string,
- body string,
- tags string,
- answers int,
- comments int
- FROM "posts.tsv"
- USING Extractors.Tsv();
- // here we transform the imported data using various aggregate functions
- @results = SELECT
- ownerid AS userid,
- SUM(score) AS totalscore,
- COUNT( * ) AS totalposts
- FROM @posts
- GROUP BY ownerid;
- // finally we output the transformed data for further analysis or visualization
- OUTPUT @results
- TO "totalscores.csv"
- ORDER BY totalscore DESC
- USING Outputters.Csv();








Join the conversation! Your thoughts help the community grow.