Import Recollect data from JSONL export files.
Supports importing data exported from any supported database backend (PostgreSQL or libSQL) into the current configured database.
Usage
# Import all data
Recollect.Import.import_all("/path/to/backup.jsonl")
# Import with options
Recollect.Import.import_all("/path/to/backup.jsonl",
batch_size: 500,
on_conflict: :replace,
transform_embeddings: true
)Import Options
:batch_size— Number of rows to insert per transaction (default: 1000):on_conflict— How to handle conflicts::skip,:replace, or:error(default: :skip):transform_embeddings— Re-embed content if embedding model changed (default: false):scope_mapping— Map old scope_ids to new ones (for tenant migration):dry_run— Validate without inserting (default: false)
Summary
Functions
Import all data from a JSONL export file.
Import a specific table from a JSONL file.
Validate an export file without importing.
Functions
Import all data from a JSONL export file.
Example
Recollect.Import.import_all("/tmp/recollect_backup.jsonl")
# {:ok, %{imported: 15432, skipped: 0, errors: []}}
Import a specific table from a JSONL file.
Validate an export file without importing.
Returns metadata about the export file and any validation errors.