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
  • Configuration
  • hooks.sql()
  1. Adapters
  2. sql

Trino

PreviousSnowflakeNextPySpark

Last updated 1 year ago

Configuration

Prism relies on the client to connect your project to a Trino cluster. The DBAPI offers several different authentication mechanisms for creating this connection. As of now, Prism only supports .

The configurations required for BasicAuthentication are:

  • autocommit: toggle whether the connection commits changes to the database after executing. The default is True.

  • host: the hostname of Amazon Redshift cluster.

  • port: the port number of the Amazon Redshift cluster.

  • database: the name of the database to which you want to connect.

  • user: the user name to use for authentication.

  • password: the password to use for authentication

profile.yml
<profile name here>:
  adapters:
    <trino adapter name here>: # change this!
      type: trino
      host:
      http_scheme: https
      port:
      user:
      password:
      catalog:
      schema:

Under the hood, Prism takes care of parsing the configuration variables and establishing a connection to your Trino cluster.

hooks.sql()

You can run queries against the Redshift cluster using the hooks.sql function:

def run(self, tasks, hooks):
    df = hooks.sql(
        adapter_name="<trino adapter name>",
        query="SELECT * FROM table"
    )
Trino DBAPI
BasicAuthentication