To run your Spark script on Mortar, you'll need to place the script in the
sparkscripts directory of a Mortar project. For the purposes of this tutorial, you may find it most convenient to use Mortar's example project, which contains a finished version of the Spark script that you can run right out of the box or use to check your work as you follow the tutorial. You can get a copy of the example project by running the following command in the terminal, prepending your handle to generate a unique name:
mortar projects:fork email@example.com:mortardata/mortar-examples.git <your-handle>-mortar-examples
The finished, ready-to-run version of the Spark script is available for your reference in the example project’s
(If you haven't yet installed the Mortar Development Framework on your machine, you can get it here.)
Now that you have a project to work with, you're ready to start writing your own Spark script.
ACTION: In your favorite code editor, create a new blank file called text-classifier.py in the
sparkscripts directory of your project.
Now you're ready to write your script.