Skip to main content
datasets() returns the catalog client. A ref is name or name@version.

list, get, getActive

The catalog, one dataset with one page of its tasks (default 200, at most 500), or the active version alone. getActive throws NoActiveVersionError when nothing is runnable. A task row carries public fields only; see Task.

getTaskBuild

One task’s build record: its outcome and, on failure, the failing step and log.

preflight

Dry-run a local folder of tasks: only each task’s metadata is sent, nothing is uploaded or written.

publish

Publish a version from one source: { git_url, git_ref, git_path? } (an https:// URL, and a subfolder that exists at the ref), { directory }, { archive_url } or { hub_package }. Returns the import record; follow it with watchImport.onUploadProgress reports sent bytes for a directory source, and onRegistered fires once with the import id when a large upload begins. What is packed is on datasets.

getImport, watchImport, listImports

Read one publish, follow it until the version is READY or FAILED, or list your publishes. watchImport polls every pollIntervalMs (default 2000): onStatus fires on every status change, onProgress on every change of the five-phase progress (extracting, parsing, building, copying, verifying), onVersion on the version’s state. settleTimeoutMs (default 30 minutes) bounds the wait; past it the watch throws ImportSettleError with the last observed state. listImports filters by status and dataset.

download

The original package of a dataset you own: the bytes, the saved file’s path, or a stream. The Buffer and { to } shapes verify the download against the digest the server states and throw EvolveDigestMismatchError on a mismatch; { stream: true } is unverified. A version published before packages were retained answers package_not_retained. Prefer { to } for anything sizeable.

activate, update, delete

Make a READY version the active one (version_not_ready while building, version_not_activatable for FAILED or ARCHIVED), switch automatic import of new upstream versions (upstream_not_watchable without a moving git ref), or delete a dataset you own (dataset_not_owned on a platform dataset, dataset_in_use naming the jobs that reference it).