Azure Data Lake – U-SQL – Using C# Code Behind

Azure Data Lake – U-SQL – Using C# Code Behind

Introduction

In this article we are trying to discuss about Using C# Code behind in U-SQL script. As we look that every U-SQL script has a C# code behind.

Now the question is why we are going to use this C# code behind as we can create function, stored procedure and other thing successfully in U-SQL. The answer is quite simple. If we want to use the power of C# and the entire library related to it, we can use the C# code behind.

 For an example, we need to create a complex scalar value function and using C# it is quite easy by using it’s math library inbuilt functionality.


Case Study

 To understand the C# code behind, we are not taking any complex example. Here we have a CSV file, that have “StudentID”, “StidentName” ,“Marks1”, “Marks2” and “Marks3”.

We are going to retrieve information from CSV file and try to put the information to another output CSV file.

We are doing little transformation work by adding “Marks1”, “Marks2” and “Marks3” and give it a “Total Marks”.

We are going to use C# code behind by creating a function name “GetTotalMarks”. It takes three input marks and returns the total of three input marks.

more...

要查看或添加评论,请登录

JOYDEEP DAS的更多文章

社区洞察

其他会员也浏览了