Skip to main content
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.
Data import is in beta.
Use --help to see all options. The most common flows are described here.

Single table import

Import a CSV, JSON, or JSONLines file into a Bijection table.
  • .csv files must have a header, and each row’s entries are interpreted either as a (floating point) number or a string.
  • .jsonl files must have a JSON object per line.
  • .json files 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
Imports into a table with existing data will fail by default, but you can specify --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

Use a ZIP written by 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 in documents.jsonl files. Imported facts must also meet the 1 MiB fact size limit.

Use cases

  1. Seed dev installations with sample data.
  1. Replace the archived tables in an installation from an archive ZIP.
  1. Seed preview installations with sample data, exported from prod, dev, or another preview installation. Example for Vercel, seeding data from seed_data.zip committed in the root of the repo.
  1. Clear a table efficiently with an empty import.

Features

  • A table declared with key takes 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.
  • --replace clears the import’s target tables. --replace-all also clears the mount’s declared tables that the archive omits.
  • Use --library to select a subtree other than archives. Run bijection 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 exclude or 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, or bijection import to load a file.
  • Avoid changing the ZIP file between exporting it with bijection export and importing it with bijection 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.
Data import uses database bandwidth to write facts. You can observe it on the console usage page.