hooks.get_connection(...)

Function used to retrieve adapter's connection class

hooks.get_connection(adapter_name: str)

from prism.task import PrismTask

class SqlTask(PrismTask)

    def run(self, tasks, hooks):
        conn = hooks.get_connection(adapter_name="<ADAPTER_NAME">)
        conn.do_stuff()
        return ...

Last updated