Double Slash Comment (U-SQL)
Summary
Indicates user-provided text. Comments can be inserted on a separate line, nested at the end of a U-SQL command line, or within a U-SQL statement. The query processor does not evaluate the comment.
Syntax
Double_Slash_Comment := '//' text_of_comment.
Remarks
Use two slashes (//
) for single-line or nested comments. Comments inserted with //
are terminated by the newline character. There is no maximum length for comments.
Examples
- The example can be executed in Visual Studio with the Azure Data Lake Tools plug-in.
- The script can be executed locally. An Azure subscription and Azure Data Lake Analytics account is not needed when executed locally.
The following example uses the //
commenting characters.
// simple rowset variable
@someBooks =
SELECT * FROM
( VALUES
("The Book Thief", "Markus Zusak", "2005"),
("The Girl with the Dragon Tattoo", "Stieg Larsson", "2005"),
("The Silver Linings Playbook", "Matthew Quick", "2008"),
("Sarah's Key", "Tatiana de Rosnay", "2006")
) AS T(Books, Author, [Publication Year]);
// return books from 2006
@result =
SELECT *
FROM @someBooks // this is a nested comment
WHERE [Publication Year] == "2006";
OUTPUT @result
TO "/Output/ReferenceGuide/LanguageElements/Comments/exampleA.txt"
USING Outputters.Csv();