Wrap a Jupyter notebook in a op.
name (str) – The name of the op.
notebook_path (str) – Path to the backing notebook.
ins (Optional[Mapping[str, In]]) – The op’s inputs.
outs (Optional[Mapping[str, Out]]) – The op’s outputs. Your notebook should
call yield_result()
to yield each of these outputs.
required_resource_keys (Optional[Set[str]]) – The string names of any required resources.
output_notebook_name – (Optional[str]): If set, will be used as the name of an injected output
of type of BufferedIOBase
that is the file object of the executed
notebook (in addition to the AssetMaterialization
that is always
created). It allows the downstream ops to access the executed notebook via a file
object.
asset_key_prefix (Optional[Union[List[str], str]]) – If set, will be used to prefix the asset keys for materialized notebooks.
description (Optional[str]) – If set, description used for op.
tags (Optional[Dict[str, str]]) – If set, additional tags used to annotate op. Dagster uses the tag keys notebook_path and kind, which cannot be overwritten by the user.
Built-in IO Manager that handles output notebooks.
Get a dagstermill execution context for interactive exploration and development.
op_config (Optional[Any]) – If specified, this value will be made available on the
context as its op_config
property.
resource_defs (Optional[Mapping[str, ResourceDefinition]]) – Specifies resources to provide to context.
logger_defs (Optional[Mapping[str, LoggerDefinition]]) – Specifies loggers to provide to context.
run_config (Optional[dict]) – The config dict with which to construct the context.
Yield a dagster event directly from notebook code.
When called interactively or in development, returns its input.
dagster_event (Union[dagster.AssetMaterialization
, dagster.ExpectationResult
, dagster.TypeCheck
, dagster.Failure
, dagster.RetryRequested
]) – An event to yield back to Dagster.
Yield a result directly from notebook code.
When called interactively or in development, returns its input.
value (Any) – The value to yield.
output_name (Optional[str]) – The name of the result to yield (default: 'result'
).
Dagstermill-specific execution context.
Do not initialize directly: use dagstermill.get_context()
.
The job definition for the context.
This will be a dagstermill-specific shim.
The logging tags for the context.
dict
A dynamically-created type whose properties allow access to op-specific config.
collections.namedtuple
The op definition for the context.
In interactive contexts, this may be a dagstermill-specific shim, depending whether an
op definition was passed to dagstermill.get_context
.
The job run for the context.
The run_config for the context.
dict
The run_id for the context.
str