Append fields from one source-header section into a datatable.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_header_load_section_to_dt

Purpose

Append fields from one source-header section into a datatable.

Arguments

  • $1 — Source file.
  • $2 — Section name such as Metadata.
  • $3 — Schema for destination rows.
  • $4 — Name of destination table array.

Side effects

Appends section/key/value records to the named table array.

Returns

  • 0 after reading; 1 when a row cannot be appended.

Usage

  header_rows=()
  sgnd_header_load_section_to_dt "$source_file" Metadata "section|key|value" header_rows