Prism
v0.3.0
v0.3.0
  • 👋Welcome to Prism!
  • Getting Started
    • Installation
    • Creating your first project
    • Why Prism?
  • Fundamentals
    • PrismProject API
      • PrismProject().run
      • PrismProject().graph
    • Tasks
    • Targets
      • Multiple targets
    • CurrentRun API
      • CurrentRun.ref()
      • CurrentRun.conn()
      • CurrentRun.ctx()
  • Connectors
    • Overview
    • BigQueryConnector
    • PostgresConnector
    • RedshiftConnector
    • SnowflakeConnector
    • TrinoConnector
    • PrestoConnector
  • CLI
    • Command Line Interface
    • graph
    • init
    • run
  • Advanced features
    • Concurrency
    • Logging
    • Callbacks
    • Retries
    • Skipping tasks
  • API Reference
    • prism.task.PrismTask
    • @task(...)
    • @target(...)
    • @target_iterator(...)
    • prism.target.PrismTarget
  • Use Cases
    • Analytics on top of dbt
    • Machine Learning
  • Wiki
    • DAGs
Powered by GitBook
On this page
  1. Fundamentals

CurrentRun API

PreviousMultiple targetsNextCurrentRun.ref()

Last updated 1 year ago

The CurrentRun object is one of the most important objects in the Prism ecosystem. It's impossible to build even moderately complex projects without it.

CurrentRun enables users to access any and all project-related objects. An instance of the CurrentRun class is automatically created any time you run a Prism project, and you can access it via a simple import statement:

from prism.runtime import CurrentRun

For avid Airflow users, this object is similar the context argument that you can pass into your Airflow operators and callables. The biggest difference is that CurrentRun is a class instance, whereas context is a dictionary. This leads to two important differences:

  1. Users can take advantage of the coding ecosystem (especially using modern IDE tools, like Visual Studio) to call the class methods and populate the appropriate arguments.

  2. [[ TO DO ]]

This class has three methods:

  • CurrentRun.conn

  • CurrentRun.ctx

We'll go over each of these in detail next.

CurrentRun.ref