# transforms.api.TransformContext ## *class* transforms.api.TransformContext(foundry\_connector, parameters=None, environment={}) {#transforms.api.TransformContext} A context object that can optionally be injected into the compute function of a transform. When a transform is decorated with [`transforms.api.incremental`](../api-incremental/index.md#transforms.api.incremental), the injected context is a [`transforms.api.IncrementalTransformContext`](../api-incrementaltransformcontext/index.md#transforms.api.IncrementalTransformContext), which extends `TransformContext` with incremental-specific functionality. Can be accessed by adding a `ctx` argument to the compute function as shown below: ```python >>> @transform.using(...) ... def compute(ctx, ...): ... ... ``` ### abort\_job() {#transforms.api.TransformContext.abort\_job} Aborts the job and ends execution. This will abort all output transactions. ### *property* auth\_header {#transforms.api.TransformContext.auth\_header} The auth header used to run the transform. * **Type:** [str ↗](https://docs.python.org/3/library/stdtypes.html#str) ### *property* environment {#transforms.api.TransformContext.environment} The list of solved conda packages. * **Type:** List\[[str ↗](https://docs.python.org/3/library/stdtypes.html#str)] ### *property* fallback\_branches {#transforms.api.TransformContext.fallback\_branches} The fallback branches configured when running the transform. * **Type:** List\[[str ↗](https://docs.python.org/3/library/stdtypes.html#str)] ### *property* parameters {#transforms.api.TransformContext.parameters} Transform parameters. * **Type:** [dict ↗](https://docs.python.org/3/library/stdtypes.html#dict) of ([str ↗](https://docs.python.org/3/library/stdtypes.html#str), any) ### *property* spark\_session {#transforms.api.TransformContext.spark\_session} The Spark session used to run the transform. * **Type:** [pyspark.sql.SparkSession ↗](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.SparkSession.html#pyspark.sql.SparkSession)