# `Lightning.Invocation.Step`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/lightning/invocation/step.ex#L1)

Ecto model for Steps.

A step is part of a run and represents the work initiated for a single
Job with a single `input_dataclip`.

Once completed (successfully) it will have an `output_dataclip` associated
with it as well.

When a step finishes, it's `:exit_reason` is set to one of following strings:

-  `"success"`
-  `"fail"`
-  `"crash"`
-  `"cancel"`
-  `"kill"`
-  `"exception"`
-  `"lost"`

# `t`

```elixir
@type t() :: %Lightning.Invocation.Step{
  __meta__: Ecto.Schema.Metadata.t(),
  credential: term(),
  credential_id: term(),
  error_type: term(),
  exit_reason: String.t() | nil,
  finished_at: term(),
  id: Ecto.UUID.t() | nil,
  input_dataclip: term(),
  input_dataclip_id: term(),
  inserted_at: term(),
  job: Lightning.Workflows.Job.t() | Ecto.Association.NotLoaded.t() | nil,
  job_id: term(),
  log_lines: term(),
  output_dataclip: term(),
  output_dataclip_id: term(),
  runs: term(),
  snapshot: term(),
  snapshot_id: term(),
  started_at: term(),
  updated_at: term()
}
```

# `finished`

# `new`

# `validate`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
