16. Writing Out a Data File with Cascalog
In this chapter we cover writing a data file out of Cascalog.
Assumptions
In this chapter we assume you have Leiningen set up.
Benefits
The benefit of this chapter is understanding and applying the fact that Hadoop is a batch processing system that writes the results of its computation to a data sink somewhere. In this chapter, we’ll write it to a file.
The Recipe—Code
Now we’ll look at reporting the results out of Cascalog to a file.
1. Create a new Leiningen project cascalog-file-output
in your projects directory, and change to that directory:
lein new app cascalog-file-output cd cascalog-file-output
2. Ensure that the following is in your projects.clj
file:
Get Clojure Recipes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.