AshCsvInterchange.Export.Orchestrator (AshCsvInterchange v0.1.0)

Copy Markdown View Source

Builds the lazy stream of CSV chunks for an export type.

Errors raised by the read action or a formatter propagate through the stream as exceptions. We do not swallow them mid-stream because a partial CSV is worse than a hard failure.

Summary

Functions

Returns the lazy CSV-chunk stream. The first chunk is the header row; subsequent chunks are serialised batches of records read via the declared read_action. See AshCsvInterchange.stream_export/2 for the :actor, :input and :batch_size options.

Functions

build_stream(resource, type, opts)

@spec build_stream(module(), AshCsvInterchange.Export.Type.t(), keyword()) ::
  Enumerable.t()

Returns the lazy CSV-chunk stream. The first chunk is the header row; subsequent chunks are serialised batches of records read via the declared read_action. See AshCsvInterchange.stream_export/2 for the :actor, :input and :batch_size options.