Slash Star Comment (U-SQL)

Summary

Indicates user-provided text. The text between /* and */ is not evaluated by the query processor.

Syntax

Slash_Star_Comment :=                                                                                    
     '/*' text_of_comment '*/'.

Remarks

  • text_of_comment
    Is the text of the comment. This is one or more character strings.

A "comment" is a sequence of characters beginning with a forward slash/asterisk combination (/*) that is treated as a single white-space character by the compiler and is otherwise ignored. A comment can include any combination of characters from the representable character set, including newline characters, but excluding the "end comment" delimiter (*/). Comments can occupy more than one line but cannot be nested.

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.

/*
This is a comment.
Another comment on a separate line.
*/
@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]);

@result =
    SELECT *
    FROM @someBooks /* Comments can appear on the same line as a code */
    WHERE [Publication Year] == "2006";
   
OUTPUT @result
TO "/Output/ReferenceGuide/LanguageElements/Comments/exampleB.txt"
USING Outputters.Csv();

See Also