Skip to main content
Version: 1.26.0 (latest)

dlt._workspace.deployment._job_ref

make_job_ref

def make_job_ref(section: str, name: str) -> TJobRef

View source on GitHub

Build canonical job_ref from section and name.

Arguments:

  • section - Module section (e.g. "batch_jobs"). Empty for module-level jobs.
  • name - Job name (e.g. "backfill").

parse_job_ref

def parse_job_ref(ref: TJobRef) -> Tuple[str, str]

View source on GitHub

Parse a job_ref into (section, name).

Returns:

Tuple of (section, name). Section is empty for 2-part module-level refs.

Raises:

  • InvalidJobRef - If ref is not a valid job_ref.

short_name

def short_name(ref: str) -> str

View source on GitHub

Extract the name (last component) from a job_ref.

format_job_label

def format_job_label(job_ref: str,
expose: Optional[TExposeSpec] = None,
deliver: Optional[TDeliverSpec] = None) -> str

View source on GitHub

Format a job_ref for consistent human-facing display.

Arguments:

  • job_ref str - Canonical job reference (e.g. "jobs.batch.backfill").
  • expose Optional[TExposeSpec] - Optional expose spec for display_name.
  • deliver Optional[TDeliverSpec] - Optional deliver spec for pipeline_name.

Returns:

  • str - Display label suitable for tables, logs, and CLI output.

resolve_job_ref

def resolve_job_ref(ref: str,
job_refs: Optional[Sequence[TJobRef]] = None) -> TJobRef

View source on GitHub

Resolve a user-provided ref to canonical job_ref form.

Accepts:

  • "name" — resolve via job_refs list (raises without it)
  • "section.name" — prepend "jobs."
  • "jobs.section.name" — validate and pass through
  • "jobs.name" — validate and pass through (module-level)

Arguments:

  • ref - User-provided job reference string.
  • job_refs - Optional list of known job refs for bare name resolution.

Raises:

  • InvalidJobRef - If ref format is invalid.
  • JobRefNotFound - If ref not found in job_refs list.
  • AmbiguousJobRef - If bare name matches multiple jobs.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.