Run your first job
A short tutorial. You'll save a query, reference it from a job, run the job, and inspect the result. Save SQL once, then run it on demand.
For scheduling, versioning, and debugging, see the Jobs section.
Prerequisites
- A cluster in Running state. See Quickstart.
- A catalog. See Connect a catalog.
1. Save a query
Open Queries in the sidebar and click Create query.
Enter a Name — e.g.
row-count.Pick your Catalog.
Paste a simple statement against a table in your catalog:
sqlSELECT COUNT(*) FROM my_table;Click Save.
You now have a named SQL statement you can reference from jobs. For more on queries (sharing, tags, editing), see Queries.
2. Create a job that runs the query
- Open Jobs in the sidebar and click Create job.
- Enter a Name (e.g.
hello-lakesail) and pick a Team. - Choose SQL as the job type.
- For the source, pick Saved query and select
row-countfrom step 1. - Pick a compute profile (or accept the suggested one) and click Save.
The job now references your query. If you edit the SQL later, the next run picks up the change automatically without a job redeploy.
3. Run it
From the job's detail page, click Run now. A new job run moves through its lifecycle (pending → starting → running → succeeded). On a warm cluster, most runs reach succeeded in under a minute.
4. Inspect the result
Click into the run to see logs, metrics, and the query output. Runs are immutable records. Re-running creates a new run rather than modifying this one.
Next
- Schedule the job so it runs automatically.
- Set up notifications so you hear about failures.
- Read about queries for sharing, tagging, and reuse patterns.
- Read about runs and debugging if a run doesn't behave.