← All types
Ob Object

ArchiveJobOutput

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.

Fields

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

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

name

String!Non-null

Human-readable name shown in the archive-job list. Required.

Optional free-text note about what this job archives. Max 1000 characters; null if unset.

slug

String!Non-null

URL-safe identifier, unique per tenant, matching [a-z0-9][a-z0-9-]*. Also the {slug} token in the key template — normally the first path segment of the rendered storage key.

TypeID (prefix sbk) of the storage backend each run writes its output object to.

Standard 5-field cron expression driving the schedule. Always a valid expression.

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

What happens when a scheduled tick fires while the previous run is still in progress. Defaults to SKIP, since two concurrent runs would race on the same output key.

Possible values (3)
ALLOW

Allow overlapping CRON executions

SKIP

Skip if previous execution still running

CANCEL

Cancel previous and start new

script

String!Non-null

Lua source executed on each run; it produces the rows that get archived. Never empty.

Template rendered into the destination storage key at run time. Tokens: {slug}, {yyyy}, {mm}, {dd}, {yyyy-MM-dd}, {timestamp} (compact ISO8601), {executionId}. Scripts cannot influence the key. Defaults to {slug}/dt={yyyy-MM-dd}/run-{timestamp}.parquet.

Encoding of the archived output. Defaults to PARQUET.

Possible values (2)
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.

Whether the cron schedule is active. Disabled jobs are never ticked, but can still be run on demand via runArchiveJob. Defaults to true on create.

ISO8601 timestamp of when the job was created.

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

Referenced by (3)
Exact type SDL
"""
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.
"""
type ArchiveJobOutput @iac_resource(name: "archive_job") @iac_ops(create: "createArchiveJob", read: "getArchiveJob", update: "updateArchiveJob", delete: "deleteArchiveJob") {
  """TypeID of this archive job, prefix `arj` (e.g. "arj_01K…")."""
  id: ArchiveJobID! @iac_identity(assignedBy: SERVER) @iac_computed
  """
  TypeID of the owning tenant, prefix `ten`. All lookups are scoped to it.
  """
  tenantId: TenantID! @iac_computed
  """Human-readable name shown in the archive-job list. Required."""
  name: String!
  """
  Optional free-text note about what this job archives. Max 1000 characters; null if unset.
  """
  description: String
  """
  URL-safe identifier, unique per tenant, matching `[a-z0-9][a-z0-9-]*`. Also the `{slug}` token in the key template — normally the first path segment of the rendered storage key.
  """
  slug: String!
  """
  TypeID (prefix `sbk`) of the storage backend each run writes its output object to.
  """
  storageBackendId: StorageBackendID! @iac_ref(resource: "storage_backend")
  """
  Standard 5-field cron expression driving the schedule. Always a valid expression.
  """
  cronExpression: String!
  """
  IANA timezone the cron expression is evaluated in (e.g. "Europe/Berlin"). Null means UTC.
  """
  timezone: String
  """
  What happens when a scheduled tick fires while the previous run is still in progress. Defaults to SKIP, since two concurrent runs would race on the same output key.
  """
  overlapPolicy: OverlapPolicy!
  """
  Lua source executed on each run; it produces the rows that get archived. Never empty.
  """
  script: String! @iac_artifact(language: LUA, testContract: "lua-normal.testing.json")
  """
  Template rendered into the destination storage key at run time. Tokens: `{slug}`, `{yyyy}`, `{mm}`, `{dd}`, `{yyyy-MM-dd}`, `{timestamp}` (compact ISO8601), `{executionId}`. Scripts cannot influence the key. Defaults to `{slug}/dt={yyyy-MM-dd}/run-{timestamp}.parquet`.
  """
  keyTemplate: String!
  """Encoding of the archived output. Defaults to PARQUET."""
  outputFormat: ArchiveOutputFormat!
  """
  Whether the cron schedule is active. Disabled jobs are never ticked, but can still be run on demand via `runArchiveJob`. Defaults to true on create.
  """
  isEnabled: Boolean!
  """ISO8601 timestamp of when the job was created."""
  createdAt: String! @iac_computed
  """
  ISO8601 timestamp of the last change to the job's definition. Equals createdAt if never edited.
  """
  updatedAt: String! @iac_computed
}