Creating your first project

The primary interface for creating, manipulating, and executing Prism projects is the command line. The full list of commands are described in detail in the CLI section.

To create your first Prism project, navigate to your folder of choice and run the following command:

$ prism init --project-name my_first_project
--------------------------------------------------------------------------------
<HH:MM:SS> | INFO  | Running with prism v0.1.9rc2...

<HH:MM:SS> | INFO  | Creating project directory...
 
      ______
   ____  __ \_____(_)________ _______
 _____  /_/ / ___/ / ___/ __ `__ \ ____
____ / ____/ /  / (__  ) / / / / / _____
 ___/_/   /_/  /_/____/_/ /_/ /_/  ___

Welcome to Prism, the easiest way to create clean, modular data pipelines
using Python!

To get started, navigate to your newly created project "my_first_project" and try
running the following commands:
    prism compile
    prism run

Consult the documentation here for more information on how to get started.
    docs.runprism.com

Happy building!
--------------------------------------------------------------------------------
$

Again, the CLI section gives a much more comprehensive overview of how to use the command line to manipulate projects. But, if you're itching to get started and you want to execute this project right away, then navigate to that directory and use prism run:

$ cd my_first_project
$ prism run
--------------------------------------------------------------------------------
<HH:MM:SS> | INFO  | Running with prism v0.1.9rc2...
<HH:MM:SS> | INFO  | Found project directory at /my_first_project
 
<HH:MM:SS> | INFO  | RUNNING parsing prism_project.py................................................ [RUN]
<HH:MM:SS> | INFO  | FINISHED parsing prism_project.py............................................... [DONE in 0.03s]
<HH:MM:SS> | INFO  | RUNNING module DAG.............................................................. [RUN]
<HH:MM:SS> | INFO  | FINISHED module DAG............................................................. [DONE in 0.01s]
<HH:MM:SS> | INFO  | RUNNING creating pipeline, DAG executor......................................... [RUN]
<HH:MM:SS> | INFO  | FINISHED creating pipeline, DAG executor........................................ [DONE in 0.01s]
 
<HH:MM:SS> | INFO  | ===================== tasks (vermilion-hornet-Gyycw4kRWG) =====================
<HH:MM:SS> | INFO  | 1 of 1 RUNNING module01.py...................................................... [RUN]
<HH:MM:SS> | INFO  | 1 of 1 FINISHED module01.py..................................................... [DONE in 0.01s]
 
<HH:MM:SS> | INFO  | Done!
--------------------------------------------------------------------------------

The project itself doesn't do much. It only has one task, and this task simply creates a .txt file in the output folder containing the string Hello, World!.

Here's what the Prism graph looks like:

In the next section, we'll add some complexity and learn about tasks and targets.

Last updated