CurrentRun.conn()

CurrentRun.conn is used to access the connectors that are passed into the PrismProject's instantiation.

Here is the full method definition:

CurrentRun.conn(self, connector_id: str) -> Connector:
    """
    Get the connector object associated with ID `connector_id`. These are defined in
    the client's instantiation.

    args:
        connector_id: ID of task from which to retrieve output
    returns:
        connector object associated with `connector_id`
    raises:
        prism.exception.ConnectorDoesNotExistException if the connector ID is not
        found
    """

This is largely a utility method designed to make your life easier. You could just as easily define your connector within the task itself.

Example

Here's an example project entrypoint:

Tasks within this project can call the SnowflakeConnector instance as follows:

Note that the connector_id argument value is same ID used when creating the SnowflakeConnector instance.

Last updated