Skip to documentation
OriginChainDB Docs
Ask AI
Queries
Console guide

Add and import records

Use the current console guide for live instance workflows and availability. Screenshots below illustrate the demo workspace with sample data. In the signed-in console, actions operate on the selected instance when your role and its capabilities allow them.

Validate CSV or JSON imports, add individual records, and verify the result in Data Explorer.

Open Data ExplorerOriginChainDB console
Current console with Data Explorer selected, namespace and table controls, and sample document records. Current console with Data Explorer selected, namespace and table controls, and sample document records.
Demo illustration: inspect table records and structure in the current Data Explorer preview.Current console · Dark theme · Local preview
Open Data Explorer
Current console with Data Explorer selected, namespace and table controls, and sample document records. Current console with Data Explorer selected, namespace and table controls, and sample document records.

Actual local console with sample data. No production database is connected.

1. Open a table and import records

Import recordsOriginChainDB console
Import dialog over the current Data Explorer, with CSV and JSON options and local preview context. Import dialog over the current Data Explorer, with CSV and JSON options and local preview context.
Demo illustration: validate a CSV or JSON batch before importing it into the local preview.Current console · Dark theme · Local preview
Import records
Import dialog over the current Data Explorer, with CSV and JSON options and local preview context. Import dialog over the current Data Explorer, with CSV and JSON options and local preview context.

Actual local console with sample data. No production database is connected.

In Data Explorer → Data, select a table and choose Import. The current dialog accepts CSV or JSON. Choose a file or paste its contents, then select Validate import.

  1. Use field names as CSV headers, or provide a JSON array of records.
  2. Review the validation result and the first records shown in the preview.
  3. Fix any type, required-field, or key errors before importing.
  4. Choose Import records to add the validated batch.

The local preview accepts files up to 2 MB and allows at most 1,000 records per table, including existing rows. It validates the complete batch before changing the local dataset.

2. Resolve validation errors

Check column names, native datatypes, required values, primary keys, and referenced records. Duplicate keys are rejected by the current local catalog. Do not assume that a live write endpoint has the same insert-versus-upsert behavior; check the write API documentation.

Empty optional CSV cells are omitted for native fields and become NULL for legacy fields. JSON integer tokens are parsed losslessly; exact integers export as strings in the local preview. Keep identifiers such as postcodes and zero-padded keys as text when their formatting matters.

3. Add a single record

Use the Record button in the table's toolbar to enter one record. The form validates it against the current table definition. There is no need to use a SQL editor for a local preview record.

The local Workbench's sample SQL is read-only. Use a connected, supported SQL endpoint or row API for production INSERT, UPDATE, and DELETE operations; the engine examples below are preserved for that workflow.

4. Check what was accepted

A refused value should remain an error, rather than being treated as a successful write. Check for a wrong type, a misspelled field, an omitted required value, a duplicate key, or a violated reference. Engine CHECK constraints and endpoint-specific error codes are documented in the error reference.

5. Verify the result

Use the Data view to inspect records, filter fields, sort, or switch to JSON. Open in Workbench prepares a query for the selected table. Review the returned rows and their types; a saved browser record does not prove a production write succeeded.

For a live import, check the response from the ingest endpoint and run a bounded read or count against the target table. Use namespace.table where the API requires a fully qualified name.

Choose the API for larger imports

The 2 MB file and 1,000-record limits above belong to the local console preview. For production batch writes, NDJSON, larger imports, vectors, or scheduled ingestion, use the insert guide and the live endpoint's documented limits.

Do not assume a bulk import is a transaction. If a live upload fails after accepting rows, inspect its response before retrying. Row writes keyed by primary key may replace an existing row; choose an endpoint with the write semantics your application requires. Vector data uses the vector endpoint and its declared dimension and metric.

Original CSV and SQL examples

These examples target shop.orders from the quickstart. They are live-engine examples, separate from the console's local sample parser.

Show CSV, INSERT, response, and verification examples
id,customer,amount_cents,status,notes,placed_ms
ord_3000,cus_481,1200,paid,,1753660800000
ord_A001,cus_9930,2111,paid,gift wrap,1753660801500
ord_H002,cus_2214,3022,paid,,1753660803000
INSERT INTO shop.orders (id, customer, amount_cents, status, notes, placed_ms)
VALUES ('ord_7Q2R', 'cus_481', 15400, 'paid', 'expedited', 1753669000000)
{
  "kind":   "insert",
  "schema": "shop.orders",
  "rows": [
    {
      "id":           "ord_7Q2R",
      "customer":     "cus_481",
      "amount_cents": 15400,
      "status":       "paid",
      "notes":        "expedited",
      "placed_ms":    1753669000000
    }
  ]
}
SELECT COUNT(*) AS orders FROM shop.orders

Next, query your data and inspect the returned records.