Process#
- class etl_entities.process.process.Process(*, name: str = None, host: Host = None, dag: DagTaskName = '', task: DagTaskName = '')#
Process representation
- Parameters:
- name
str
, default: current process name Process name
- host
str
, default: current host FQDN Host name. Could be hostname, FQDN or IPv4/IPv6 address
- task
str
, default: empty string Task name
Warning
Can be set only if
dag
set too- dag
str
, default: empty string DAG name
Warning
Can be set only if
task
is set too
- name
Examples
from etl_entities import Process process = Process() process1 = Process(name="myprocess") process2 = Process(name="myprocess", host="myhost") process3 = Process(name="myprocess", task="abc", dag="cde", host="myhost")
- Attributes:
qualified_name
Unique name of process
Methods
copy
(*[, include, exclude, update, deep])Duplicate a model, optionally choose which fields to include, exclude and change.
dict
(*[, include, exclude, by_alias, ...])Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
json
(*[, include, exclude, by_alias, ...])Generate a JSON representation of the model, include and exclude arguments as per dict().
- copy(*, include: AbstractSetIntStr | MappingIntStrAny | None = None, exclude: AbstractSetIntStr | MappingIntStrAny | None = None, update: DictStrAny | None = None, deep: bool = False) Model #
Duplicate a model, optionally choose which fields to include, exclude and change.
- Parameters:
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data
deep – set to True to make a deep copy of the model
- Returns:
new model instance
- dict(*, include: AbstractSetIntStr | MappingIntStrAny | None = None, exclude: AbstractSetIntStr | MappingIntStrAny | None = None, by_alias: bool = False, skip_defaults: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) DictStrAny #
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- json(*, include: AbstractSetIntStr | MappingIntStrAny | None = None, exclude: AbstractSetIntStr | MappingIntStrAny | None = None, by_alias: bool = False, skip_defaults: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = None, models_as_dict: bool = True, **dumps_kwargs: Any) unicode #
Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
- property qualified_name: str#
Unique name of process
- Returns:
- valuestr
Qualified name
Examples
from etl_entities import Process process1 = Process(name="myprocess", host="myhost") assert process1.qualified_name == "currentapp@somehost" process2 = Process(name="myprocess", task="abc", dag="cde", host="myhost") assert process2.qualified_name == "abc.cde.currentapp@somehost"