Search documentation
karat

+

K

User Documentation ↗

transforms.api.TransformContext

class transforms.api.TransformContext(foundry_connector, parameters=None, environment={})

A context object that can optionally be injected into the compute function of a transform.

Can be accessed by adding a ctx argument to the compute function as shown below:

Copied!
1 2 3 >>> @transform.using(...) ... def compute(ctx, ...): ... ...

abort_job()

Aborts the job and ends execution. This will abort all output transactions.

property auth_header

The auth header used to run the transform.

property environment

The list of solved conda packages.

property fallback_branches

The fallback branches configured when running the transform.

property parameters

Transform parameters.

property spark_session

The Spark session used to run the transform.