# dlt

> **Beta:**
>
> dlt tasks are available in beta. Their setup and behavior may change as the implementation evolves.

A **dlt task** loads data from an external source into an Altertable catalog. [Ask Altertable](/docs/agents/ask.md) can prepare the pipeline and schedule recurring loads for you.

You need a writable [catalog](/docs/lakehouse/catalogs.md) and [permission](/docs/administration/access-control.md) to create and edit tasks, and to manage catalogs in the environment.

## Create a task with Agent

Open **Agent** in the sidebar. Describe the source, what to load, the destination catalog and schema, and the schedule. For example:

```text
Create a dlt task to load Attio contacts into the raw schema of my lakehouse
catalog every day at 09:00 UTC. Inspect the supported source and destination
schema, and confirm the destination table and incremental behavior. Show the
pipeline and schedule for review before saving. Use Secrets needed for
credentials; do not ask me to paste them in chat. Validate the generated
pipeline, report the rows loaded and any errors, and confirm whether the
schedule is active.
```

Replace the source and destination with yours, then:

1. Confirm the proposed task and destination when the agent asks.
2. If the source requires credentials, enter them in the **Secrets needed** fields and select **Save securely**. Values are encrypted and kept out of the agent conversation. Do not paste credentials into a chat message.
3. Wait while the agent generates and tests the pipeline. This can take several minutes.

The task starts paused during setup. After successful validation, the agent saves the pipeline and activates its schedule. If validation is blocked, it explains what is needed and leaves the task paused.

Validation uses a temporary schema. Actual task runs load the destination you chose.

## Check and manage runs

Open the task from **Tasks**. For an active task, select **Run now** from its menu to start a load immediately. Open **Run history**, select a run, and check **Run output** for its result or error. Verify the loaded tables in your catalog.

Change **Schedule** in the task's **Settings**. Schedule times use UTC. Use **Pause** to stop scheduled runs and **Resume** to restart them.

If a run fails, share its error with [Ask Altertable](/docs/agents/ask.md) and ask it to repair the task.

## Use an existing pipeline

For a pipeline you already maintain, open **Tasks → New task** and choose **dlt task** under **Set up manually**. Select the destination **Catalog** and **Schema**, then choose a source:

- **Inline script**: choose **Python** and paste your pipeline.
- **Repository**: select a repository, optionally set **Git ref** and **Working directory**, and enter the **Command** to run after checkout. For example, use `python import.py` with `jobs` as the working directory for `jobs/import.py`.

If the source needs credentials, add them under **Advanced options → Environment variables**. Values are encrypted and cannot be viewed after saving.

Keep **Schedule** set to **Manually** for a first run, then select **Create task**.

The runtime includes [dlt-altertable](https://github.com/altertable-ai/dlt-altertable) and supplies destination credentials. See the adapter documentation for pipeline configuration and running dlt outside Altertable.