Skip to content

Bulk Import -- Identifiers & Operations

Bulk Import supports two independent identifier types for row resolution.

Identifier Types

  • id Internal immutable primary key generated by Minyu.
  • _id External mutable reference key supplied by the importing system.

Both identifiers exist on all tables by default.

Resolution Rules

  • If id is present, it is always used as the primary lookup key.
  • If only _id is present, Minyu resolves the row using _id.
  • If both are present, id takes precedence and _id is updated if provided.
  • If neither is present:
    • INSERT is allowed
    • UPDATE and DELETE are rejected and will raise errors

Relationship Identifier Rules

For relations represented as foreign keys in the importing table:

  • <relation> → contains the target row's id value
  • _<relation> → contains the target row's _id value

For many-to-many link files:

  • source / _source
  • target / _target

At least one identifier variant must be supplied per reference.

Operation Semantics

The _operation column defines the mutation applied to each row:

  • INSERT → creates a new row
  • UPDATE → modifies an existing row
  • DELETE → removes an existing row

Constraints

  • UPDATE requires resolvable id or _id
  • DELETE requires resolvable id or _id
  • Many-to-many files only allow INSERT and DELETE