← All resources

Resource

archive_job

A scheduled, Lua-driven archive job: it runs a script on a cron schedule and writes the resulting rows to a storage backend under a rendered key.

GraphQL reference →

Configuration

nameString!Required

Human-readable name for the job. Required.

descriptionStringOptional

Optional free-text note about what the job archives. Max 1000 characters.

slugString!Required

URL-safe identifier matching [a-z0-9][a-z0-9-]*, unique per tenant, and used as the {slug} token of the key template.

storageBackendIdStorageBackendID!Required

TypeID (prefix sbk) of the storage backend to write to. Must already exist for the tenant.

References storage_backend

cronExpressionString!Required

Standard 5-field cron expression for the schedule. Rejected if it does not parse.

timezoneStringOptional

IANA timezone the cron expression is evaluated in (e.g. "Europe/Berlin"). Omit for UTC.

overlapPolicyOverlapPolicy!Optional

What to do when a tick fires while the previous run is still going. Defaults to SKIP.

Allowed values

ALLOW — Allow overlapping CRON executions

SKIP — Skip if previous execution still running

CANCEL — Cancel previous and start new

scriptString!Required

Lua source producing the rows to archive. Required and must be non-empty.

keyTemplateString!Optional

Storage key template; supports {slug}, {yyyy}, {mm}, {dd}, {yyyy-MM-dd}, {timestamp}, {executionId}. Defaults to {slug}/dt={yyyy-MM-dd}/run-{timestamp}.parquet.

outputFormatArchiveOutputFormat!Optional

Encoding of the archived output. Defaults to PARQUET.

Allowed values

PARQUET — Apache Parquet — typed, columnar, DuckDB-friendly. Default.

CSV — RFC 4180 CSV with UTF-8 BOM. For Excel / Power BI. Schema must be scalars only.

isEnabledBoolean!Optional

Whether the cron schedule starts out active. Defaults to true.

Read-only values

Show values
idArchiveJobID!Read only

TypeID of this archive job, prefix arj (e.g. "arj_01K…").

computed by the platform

tenantIdTenantID!Read only

TypeID of the owning tenant, prefix ten. All lookups are scoped to it.

computed by the platform

createdAtString!Read only

ISO8601 timestamp of when the job was created.

computed by the platform

updatedAtString!Read only

ISO8601 timestamp of the last change to the job's definition. Equals createdAt if never edited.

computed by the platform

Lifecycle

The CLI can create this resource. The platform assigns its id.

When replacement is needed, the existing resource is removed before its replacement is created.