mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-16 16:52:34 +00:00
This PR is part of the documentation revamp. Once the full set of PRs is merged, we’ll publish the combined site to staging for review before updating docs.lancedb.com. The curation, SQL and operations pages contain outdated claims and examples that do not reliably work as written. This corrects those pages against the reviewed SDK and local server evidence, including prepared statements, background jobs, cleanup and monitoring. Integration guides are grouped with their examples in #4533. Function and Secret-object documentation stays unpublished until its release. The two Function pages are listed in `.mintignore` and left out of the navigation, and the sections about them on other pages are MDX comments. Stacked on #4533. Each MDX file has one PR owner. Rebase onto main after #4533 is squash-merged. Local assembly, Mint validation and link checks pass, and the assembled site shows no Function or Secret-object content. A local release rehearsal that uncomments the drafts and restores the navigation also passes. Hold publication until this PR and lancedb/sophon#8688 are on `main`.
91 lines
2.4 KiB
Plaintext
91 lines
2.4 KiB
Plaintext
---
|
|
title: "Job"
|
|
sidebarTitle: "Job"
|
|
description: "SHOW JOBS, SHOW ERRORS, and controlling a running job with PAUSE, RESUME and CANCEL."
|
|
icon: hourglass-half
|
|
keywords: ["show jobs", "show errors", "pause job", "resume job", "cancel job", "sql"]
|
|
---
|
|
|
|
<Badge color="red">Enterprise</Badge> [SQL runs in LanceDB Enterprise.](/sql)
|
|
|
|
A [job](/basics/jobs) is not a catalog object -- it has no schema and is not
|
|
namespaced -- but it has its own SQL statements, grouped here the same way the
|
|
catalog objects are.
|
|
|
|
## SHOW JOBS {#show}
|
|
|
|
```sql
|
|
SHOW JOBS
|
|
```
|
|
|
|
Every job the server knows about -- id, type, state, creation time. The SQL
|
|
counterpart of `list_jobs`.
|
|
|
|
## SHOW ERRORS {#errors}
|
|
|
|
```sql
|
|
SHOW ERRORS ON <table> [FOR JOB '<job-id>'] [LIMIT <n>]
|
|
```
|
|
|
|
```sql
|
|
SHOW ERRORS ON documents
|
|
SHOW ERRORS ON documents FOR JOB 'job-abc' LIMIT 100
|
|
```
|
|
|
|
Why rows failed. Reach for this when a [refresh](/sql/dml/refresh) reports
|
|
fewer filled rows than you expected.
|
|
|
|
**Errors and limits**
|
|
|
|
| | |
|
|
| --- | --- |
|
|
| `LIMIT` | must be between 1 and 100,000 |
|
|
| Failed jobs scanned without `FOR JOB` | 32 most recent |
|
|
| Tables the server does not open directly | not supported |
|
|
|
|
Without `FOR JOB` this surveys recent failures and stops at 32 jobs. When the
|
|
listing stops at your `LIMIT`, the message says so -- narrow with `FOR JOB`
|
|
rather than raising the limit blindly.
|
|
|
|
## PAUSE JOB {#pause}
|
|
|
|
```sql
|
|
PAUSE JOB 'j-ci-abc-def'
|
|
```
|
|
|
|
## RESUME JOB {#resume}
|
|
|
|
```sql
|
|
RESUME JOB 'j-ci-abc-def'
|
|
```
|
|
|
|
## CANCEL JOB {#cancel}
|
|
|
|
```sql
|
|
CANCEL JOB 'j-ci-abc-def'
|
|
```
|
|
|
|
The job id is always a quoted string literal. All three take exactly one and
|
|
nothing after it -- a second token on the line is a syntax error rather than
|
|
being ignored.
|
|
|
|
<Note>
|
|
Cancellation is a request, matching the SDK's
|
|
[`cancel()`](/basics/jobs#managing): it does not guarantee the job stops before
|
|
doing more work, and asking twice or cancelling a finished job does nothing.
|
|
`CANCEL JOB` itself can be unavailable on an Enterprise cluster with no job registry
|
|
configured, which is a deployment condition rather than something you can work
|
|
around from SQL.
|
|
</Note>
|
|
|
|
## What to read next {#next}
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Query and job" icon="hourglass-half" href="/basics/jobs">
|
|
The handle these statements are the SQL view of.
|
|
</Card>
|
|
<Card title="Background jobs" icon="gears" href="/maintenance/background-jobs">
|
|
Job types you did not start yourself.
|
|
</Card>
|
|
</CardGroup>
|