bijection import reads a local file and stages its rows through the
installation’s archives mount.
The importing principal needs a role admitted by that mount and a live
platform importer grant issued by the installation steward.
Use --help to see all options. The most common flows are described here.
Single table import
.csvfiles must have a header, and each row’s entries are interpreted either as a (floating point) number or a string..jsonlfiles must have a JSON object per line..jsonfiles must be an array of JSON objects.- JSON arrays have a size limit of 16 MiB. To import more data, use CSV or
JSONLines. You can convert json to jsonl with a command like
jq -c '.[]' data.json > data.jsonl
- JSON arrays have a size limit of 16 MiB. To import more data, use CSV or
JSONLines. You can convert json to jsonl with a command like
--append to append the imported facts to the table or --replace to
replace existing data in the table with your import.
The default is your configured installation. Name another installation with --installation <project>:<name>,
as --installation my-app:prod.
Import data from an archive ZIP file
bijection export.
A sealed copy keeps its original fact ID, typed ID references and declared
keys. For another installation, configure managedSources on the destination
mount with the source’s issued relation IDs and their local tables. The
ZIP table path selects the destination table, and the reviewed mapping
resolves the original IDs independently of local table numbers.
Clear imports take declared keys from the rows. For minted-key tables they
allocate fresh IDs and remap references to the imported facts. For physical
recovery, see Backups.
Imports where tables have existing data will fail by default, but you can
specify --replace to replace existing data in tables mentioned in the ZIP
file.
For a hosted archive, the app declares an importer role and passes it in
archives({ allow: { import: [importer], … } }). A caller whose grant can
confer that role issues it to the person importing the archive. Its expiry
must cover confirmation, staging and landing. Use the same signed-in
principal for all three steps. The installation checks the grant again
when it decides whether to land the archive.
Limits
CSV and JSONLines imports have a 16 MiB line limit, including line endings and CSV headers. Quoted multiline CSV values count as a single logical line. For ZIP imports, the limit applies to decompressed lines indocuments.jsonl files.
Imported facts must also meet the
1 MiB fact size limit.
Use cases
- Seed dev installations with sample data.
- Replace the archived tables in an installation from an archive ZIP.
- Seed preview installations with sample data, exported from prod, dev, or
another preview installation. Example for Vercel, seeding data from
seed_data.zipcommitted in the root of the repo.
- Clear a table efficiently with an empty import.
Features
- A table declared with
keytakes its key from the row’s key fields. Use declared fields for the rest of the row. - All import modes publish table changes atomically in one branch landing.
--replaceclears the import’s target tables.--replace-allalso clears the mount’s declared tables that the archive omits.- Use
--libraryto select a subtree other thanarchives. Runbijection import --status <importId>with the same installation selection and mount to inspect an import. - JSON, JSONLines and archive ZIP rows use Bijection wire JSON. Tagged values preserve types such as Int64 and Bytes.
- A sealed File keeps its ID, lifetime and erasure units. The import skips and counts copies whose units have closed. A File disclosed through a clear-copy release receives a new ID, and imported facts refer to that ID.
- Sealed imports require the named recipient and access to original custody.
For a destination outside that authority, re-export with the affected tables
in
excludeor use an authorized clear-copy release. - Re-export sealed packages made before the current portable descriptor cutover.
Warnings
Bijection refuses streaming import, so the Fivetran and Airbyte destination connectors cannot write to a Bijection installation. Use an integration to synchronize an external system, orbijection import to load a file.
- Avoid changing the ZIP file between exporting it with
bijection exportand importing it withbijection import. Some manual changes of the ZIP file may be possible, but remain undocumented. Please share your use case with the Bijection team at contact@bijection.com.