rvrdata.adapters.stdout
Adapter for generating output to stdout.
class RvrdataStdout
This adapter by default if there is no action defined for a given step.
As a result the following step examples are all equivalent:
steps:
- name: output_with_implicit_action
params:
output: "Hello World"
- name: output_with_implicit_adapter
action: output
params:
output: "Hello World"
- name: output_with_explicit_action
action: stdout.output
params:
output: "Hello World"
output()
Output to stdout using print.
- Parameters:
- output (str) – Text to print on the console.
- silent (boolean) – Mutes output to the console (defaults to False).
Example: Display message on console
The output string is stored in the step data. Use this behavior along with silent: True for quiet data caching.
Output Metrics
The following metrics are included in the step results:
- rvrdata.dataflow.action.output.size: Length of the output string (int).
- rvrdata.dataflow.action.output.line_count: Number of newlines in output (int).
One row is added to the metrics each time the action is run.
set()
Set the data property for a step.
- Parameters: data (Any) – Any supplied values including strings, arrays or dictionaries.
This is usually used along with the data caching features of dataflows to transform the data using functions.
Use the format data__ref to provide a context reference string. This is much more efficient since the data is kept in memory and not rendered in the dataflow YAML.
Example: Reference data from another step
steps:
- name: get_some_data
notes: Get data from key 'some_data` under some other step.
action: set
params:
silent: True
data__ref: "steps.other_step.data"
cache:
- compose:
- get: "some_data"
force_pass()
Fake successful action that does nothing.
Used for testing dry-runs or as a placeholder.