CKAN icon

CKAN

Interact with the CKAN API

Datastore Upsert

AI-generated

Summary

Insert or update rows in an existing CKAN DataStore table. Choose how duplicate or missing rows are handled, and optionally allow writes to active resources or run the request without committing changes.

Inputs

  • CKAN URL (required) — URL of the CKAN instance, such as https://demo.ckan.org.
  • Resource Id (required) — Unique ID of the DataStore resource to write to.
  • Records (required) — JSON array of row objects to write, for example [{"id":1,"temperature":21.3}].
  • Upsert Method — Conflict strategy: insert fails on duplicates, update fails when a row is missing, and upsert inserts or updates. Defaults to upsert.
  • Force — Defaults to false. Set true to allow writing to an active, non-draft resource.
  • Dry Run — Defaults to false. When enabled, CKAN validates and executes the operation, then rolls back without committing changes.

Output shape

One CKAN response item per input item, containing success and data fields.

The data field contains CKAN's result for the upsert request. Requires CKAN API credentials with a token. If Continue On Fail is enabled, failed inputs produce an error field instead.

Links

Discussion