Skip to content

Bulk Import -- Relationship Mapping

Bulk Import supports full relationship mapping across all relation types.

Relationships are resolved using relation API names and standard identifier resolution rules.

One-to-One and One-to-Many

Foreign keys are represented directly in the target table using the relation API name.

  • <relation> → resolves using id
  • _<relation> → resolves using _id

Resolution rules:

  • If both are present, id takes precedence
  • If only _id is present, lookup is performed using _id
  • If neither is present, the relation is left unchanged on UPDATE

Many-to-One

Handled identically to one-to-many from the target side:

  • The foreign key is stored on the many-side table
  • Resolution follows the same <relation> / _<relation> rules

Many-to-Many

Many-to-many relations are imported using dedicated link tables.

File Naming

<source-table>-<relation>.csv

Required Columns

  • _operation
  • source
  • _source
  • target
  • _target

Semantics

  • INSERT → creates a relation
  • DELETE → removes a relation
  • UPDATE is not permitted

Each row represents exactly one relation edge.

Resolution Characteristics

  • Relation resolution is non-transactional across files
  • Ordering between files is not guaranteed
  • Failed links do not block unrelated row inserts