Skip to content

civex.rows_to_records

Create one new record per table row. Every row produces a new record; use civex.upsert_records instead if you want existing records to be matched and updated rather than duplicated.

Uses pandas, which ships with civex — see civex.parse_table.

Plugin ID: civex.rows_to_records
Category: outputs
Capabilities: create_record

Config

Field Type Required Default Description
schema string yes Name of the schema to create records under. Workflow YAML sets this via the schema: key (the Python field is schema_name).
dataset string no "" Dataset to create records in. Empty string falls back to the trigger record's own dataset.
field_mapping object no Maps table column names to schema field names. Empty means columns are used as schema field names directly.
context_record_id string no "" Parent record ID to attach created records to. Empty string falls back to the workflow's context record.

Inputs

Name Type Required Description
table table yes Rows to insert; columns map to schema fields by name unless field_mapping is set.

Outputs

Name Type Required Description
created number yes Records created.
skipped number yes Rows whose record failed validation.
- id: parse
  plugin: civex.parse_table
  inputs:
    bytes: load.bytes

- id: create
  plugin: civex.rows_to_records
  config:
    schema: Selection
    dataset: field-season-2024
    field_mapping:
      "Begin Time (s)": start_time
      "End Time (s)": end_time
      "Selection": selection_number
  inputs:
    table: parse.table