Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 10. Programming with Pig > Working with scripts

10.7. Working with scripts

Writing Pig Latin scripts is largely about packaging together the Pig Latin statements that you’ve successfully tested in Grunt. Pig scripting does have a few unique topics though. They’re comments, parameter substitution, and multiquery execution.

10.7.1. Comments

As you’ll reuse your Pig Latin script, it’s obviously a good idea to leave comments for other people (or yourself) to understand it in the future. Pig Latin supports two forms of comments, single-line and multiline. You start the single-line comment by a double hyphen and the comment ends at the end of the line. You enclose the multiline comment by the /* and */ markers, similar to multiline comments in Java. For example, a Pig Latin script with comments can look like


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial