none
How define body of if statement?

Answers

  • We don't support the IF clause in U-SQL scripts yet. You can use inline C# for conditional operations.

    E.g.

    SELECT Name,
                string.IsNullOrEmpty(StreetAddress) ? "Blank" : StreetAddress AS StreetAddress
                FROM @content;

    If you want to do heavier conditional operations (more than the 1 liner described above), you can use write a user defined function in C#.

    If you have a customer requirement around supporting IF clause in U-SQL, please do file a request in our feedback site (http://aka.ms/adlafeedback) to help us plan and prioritize.

    Wednesday, April 20, 2016 5:02 PM