Development
Context
Each pipeline in Datazone has a context object that provides access to resources and configuration settings.
State
The context object provides a state
attribute that allows you to read and write key-value pairs.
The state is stored in database and can be accessed in any transform function in the pipeline.
Also you can access the state in the next executions of the pipeline.
State Callbacks
You can write your states by various conditions like success
, failure
, now
.
In this example, the state will not be written because the transform function raises an exception.
Resources
PySpark Session
You can access the PySpark session using the pyspark
attribute of the resources
object.