Skip to main content
Version: devel View Markdown

Initialize a pipeline

This guide walks you through creating and initializing a dlt pipeline in dltHub Workspace—whether manually, with agentic help, or from one of the verified sources maintained by dltHub team.

Overview​

A dlt pipeline moves data from a source (like an API or database) into a destination (like DuckDB, Snowflake, or Iceberg). Initializing a pipeline is the first step in the data workflow. You can create one in two CLI-based ways:

MethodCommandBest for
Manualdlthub pipeline init <source> <destination>Developers who prefer manual setup
Verified sourcedlthub pipeline init <verified_source> <destination>Prebuilt, tested connectors from the community and dltHub team

Outside of a workspace (plain OSS dlt), the same scaffold is reachable as dlt init <source> <destination>. Inside a dltHub workspace, dlthub pipeline init is the canonical entry point—it adds the pipeline to the current workspace.

Step 0: Install dlt with workspace support​

Before you start, make sure you followed the installation instructions and have a dltHub workspace initialized. The fastest way is:

uvx dlthub-init@latest

This scaffolds a workspace with .dlt/.workspace already set, the AI toolkits vendored, and dlt[hub] synced. See the installation guide for the alternative paths (adding to an existing project, or enabling workspace mode by hand).

dltHub Workspace is a unified environment for developing, running, and maintaining data pipelines—from local development to production.

More about dlt Workspace

Step 1: Initialize a custom pipeline​

Manual setup (standard workflow)​

A lightweight, code-first approach ideal for developers comfortable with Python.

dlthub pipeline init <source> duckdb

for example:

dlthub pipeline init my_github_pipeline duckdb

It scaffolds the pipeline template—a minimal starter project with a single Python script that shows three quick ways to load data into DuckDB using dlt:

  • fetch JSON from a public REST API (chess.com as an example) with requests,
  • read a public CSV with pandas, and
  • pull rows from a SQL database via SQLAlchemy.

The file also includes an optional GitHub REST client example (a @dlt.resource + @dlt.source) that can use a token from .dlt/secrets.toml, but will work unauthenticated at low rate limits. It’s meant as a hands-on playground you can immediately run and then adapt into a real pipeline.

Learn how to build you own dlt pipeline with dlt Fundamentals course.

Agentic setup​

A collaborative AI-human workflow that integrates dlt with AI editors and agents like:

Start with the /find-source skill to describe your data source in natural language—the assistant identifies a verified source or researches the API, then chains into pipeline scaffolding.

Read more about running a pipeline

Update verified source​

dlthub pipeline init copies the code of a verified source into your workspace. dlthub pipeline init --list-sources shows the core sources and the verified sources. Verified sources with a version come first. dlthub ai status and dlthub local info list the verified sources in your workspace.

To see which verified sources in your workspace have a newer version:

dlthub pipeline update -l
jira: 2.0.0 -> 2.1.0 (update available)
pipedrive: a1b2c3d (2026-03-01) (up to date)

A source with a version has an update only when the newest version is different. Sources without a version show the commit of the verified sources repository they were copied from. To update verified source to the newest version:

dlthub pipeline update jira

The command updates only the files of the source. Your config, secrets and pipeline scripts do not change. The command prints the dependencies of the newest version.

dlt detects your modifications to the source files and tries to merge them with the newest version. Files that the newest version does not have are deleted. Files that you added stay.

If dlt cannot merge your modifications, the command asks what to do with the conflicting files. Without a prompt, for example in an agent session, you choose with --on-conflict:

  • keep-current (the default): the conflicting files stay as they are and all other files are updated. The command shows the folder with the newest version, so you can merge the incoming changes yourself. The next update does not report these files again.
  • keep-incoming: the conflicting files are replaced with the newest version and your modifications are lost.
  • skip: no files change and the command fails.
dlthub pipeline update jira --on-conflict keep-incoming

To overwrite all files of the source and drop your modifications, add --reinstall:

dlthub pipeline update jira --reinstall

dlthub pipeline init does not add a verified source that is already in your workspace. To add the source again, delete its folder.

Next steps: Deploy and scale​

Once your pipeline runs locally:

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.