Prism
v0.1.9rc2
v0.1.9rc2
  • 👋Welcome to Prism!
  • Getting Started
    • Installation
    • Creating your first project
    • Why Prism?
  • Fundamentals
    • Tasks
      • tasks
      • hooks
        • hooks.sql
        • hooks.spark
        • hooks.dbt_ref
    • Targets
      • Multiple targets
    • Config files
      • prism_project.py
        • RUN_ID / SLUG
        • SYS_PATH_CONF
        • THREADS
        • PROFILE_YML_PATH / PROFILE
        • PRISM_LOGGER
        • TRIGGERS_YML_PATH / TRIGGERS
      • Profile YML
      • Triggers YML
    • Jinja
      • __file__ and Path
      • prism_project
      • wkdir
      • parent_dir
      • concat
      • env
  • Adapters
    • Overview
    • sql
      • BigQuery
      • Postgres
      • Redshift
      • Snowflake
      • Trino
    • PySpark
    • dbt
  • Agents
    • Overview
    • Docker
    • EC2
  • CLI
    • Command Line Interface
    • init
    • compile
    • connect
    • create
      • agent
      • task
      • trigger
    • graph
    • run
    • spark-submit
    • agent
      • apply
      • run
      • build
      • delete
  • Advanced features
    • Concurrency
    • Logging
    • Triggers
    • Retries
    • Python Client
  • API Reference
    • prism.task.PrismTask
    • @task(...)
    • @target(...)
    • @target_iterator(...)
    • tasks.ref(...)
    • hooks.sql(...)
    • hooks.dbt_ref(...)
  • Use Cases
    • Analytics on top of dbt
    • Machine Learning
  • Wiki
    • DAGs
Powered by GitBook
On this page
  • Usage
  • Example
  1. CLI

compile

PreviousinitNextconnect

Last updated 1 year ago

Usage

prism compile is used to parse the tasks.ref(...) calls, construct the DAG, and generate the manifest.

Usage: prism compile [-h] [--full-tb] [-l]

Parse the tasks.ref(...) calls, construct the DAG, and generate the manifest

Options:
  -h, --help         show this help message and exit

General Options:
  --full-tb          Display the full traceback for errors in the project; default is False
  -l, --log-level    Log level, must be one of `info`, `warn`, `error`, or `debug`. Default is `info`

Here's what prism compile does under the hood.

  1. Parses the tasks contained in the modules/ folder for tasks.ref(...) calls.

  2. It then takes these function calls and creates the dependency graph. You can visualize this graph using the command.

  3. It stores the project metadata (e.g., the configuration, the tasks.ref(...) calls, the targets, and the ) in a manifest.

Example

Here's what the output will look like in Terminal:

$ prism compile
--------------------------------------------------------------------------------
<HH:MM:SS> | INFO  | Running with prism v0.1.9rc2...
<HH:MM:SS> | INFO  | Found project directory at /Users/my_first_project
 
<HH:MM:SS> | INFO  | RUNNING EVENT 'module DAG'.............................................................. [RUN]
<HH:MM:SS> | INFO  | FINISHED EVENT 'module DAG'............................................................. [DONE in 0.01s]
 
<HH:MM:SS> | INFO  | Done!
--------------------------------------------------------------------------------
prism graph
topological sort