dlt-connector
Fungsinya
Skill ini memandu penghubungan layanan SaaS ke Wren Engine: memasang dlt, mengatur kredensial, menjalankan pipeline ke DuckDB, dan membuat proyek semantik. Skill ini untuk analis data yang ingin mengkueri data dari alat bisnis dengan SQL.
Kapan dipakai
- βSaat Anda ingin menarik data dari alat SaaS seperti HubSpot, Stripe, atau Salesforce ke dalam basis data.
- βSaat Anda sudah punya berkas DuckDB dan hanya memerlukan proyek semantik di atasnya.
- βSaat Anda ingin mulai mengkueri data SaaS Anda dengan SQL melalui Wren.
Link skill
https://github.com/Canner/WrenAI/blob/main/core/wren/src/wren/skills_content/dlt-connector/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βHubungkan akun Stripe saya ke Wren, muat pembayaran bulan lalu ke DuckDB, dan siapkan proyek yang bisa saya kueri.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini berjalan melalui empat fase: memasang dlt, memuat sumber ke DuckDB, memeriksa skema untuk membangun proyek Wren, lalu memverifikasi dengan kueri SQL nyata.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
wren-dlt-connector
Reference docs (
dlt_sources) and theintrospect_dltscript are bundled. Pull references withwren skills get dlt-connector --full; fetch a script withwren skills get dlt-connector --script <name>.
Connect SaaS data to Wren Engine for SQL analysis β from zero to a verified, queryable project in one conversation.
Who this is for
Data analysts who know SQL and some Python, but may not have used dlt or Wren before. Explain concepts briefly when they first appear, but don't over-explain things a SQL-literate person would already know.
Overview
This skill walks through a four-phase workflow:
- Extract β Use dlt (data load tool) to pull data from a SaaS API into a local DuckDB file
- Model β Introspect the DuckDB schema and auto-generate a Wren semantic project (YAML models, relationships, profile)
- Build & Verify β Build the project and run actual SQL queries to confirm everything works end-to-end
- Handoff β Show the user their data and next steps
The user might enter at any phase. Ask which phase they're starting from β they may already have a .duckdb file and just need phases 2β4.
The goal is a project that actually queries successfully, not just files that look correct. Always run the verification step before declaring success.
Critical: DuckDB catalog naming
When wren engine connects to a DuckDB file, it ATTACHes it using the filename (without .duckdb extension) as the catalog alias:
ATTACH DATABASE 'stripe_data.duckdb' AS "stripe_data" (READ_ONLY)
This means every model's table_reference.catalog must equal the DuckDB filename stem. If the file is hubspot.duckdb, the catalog is hubspot. If it's my_pipeline.duckdb, the catalog is my_pipeline.
Getting this wrong causes "table not found" errors at query time. The introspect_dlt.py script handles this automatically.
Critical: Type normalization
Column types must be normalized using wren SDK's type_mapping.parse_type() function, which uses sqlglot to convert database-specific types (like DuckDB's HUGEINT, TIMESTAMP WITH TIME ZONE) into canonical SQL types that wren-core understands. Do not hardcode type mappings β always delegate to parse_type(raw_type, "duckdb").
The introspect_dlt.py script does this automatically when wren SDK is installed.
Phase 1: Extract β dlt Pipeline Setup
Step 1: Pick the SaaS source
Ask the user which SaaS service they want to connect. Read dlt_sources for a list of popular verified sources and their auth requirements. If the source isn't listed, check whether dlt has a verified source for it by searching dlthub.com/docs/dlt-ecosystem/verified-sources.
Step 2: Install dlt
pip install "dlt[duckdb]" --break-system-packages
Step 3: Write the pipeline script
Create a Python script that:
- Imports the dlt source function for the chosen SaaS
- Configures the pipeline with
destination='duckdb'and a local file path - Runs the pipeline with
pipeline.run(source)
Here's the general pattern β adapt it per source (check dlt_sources for source-specific templates):
import dlt
pipeline = dlt.pipeline(
pipeline_name="<source>_pipeline",
destination="duckdb",
dataset_name="<source>_data",
)
# Source-specific: check the dlt_sources reference for auth patterns
source = <source_function>(api_key=dlt.secrets.value)
info = pipeline.run(source)
print(info)
Step 4: Set up credentials
dlt reads credentials from environment variables or .dlt/secrets.toml. The simplest approach for a one-time run:
# Set the credential as an environment variable
# The exact variable name depends on the source β check the dlt_sources reference
export SOURCES__<SOURCE>__API_KEY="the-actual-key"
Ask the user for their API key or token. Remind them:
- Never commit credentials to git
- Environment variables are the simplest way for a one-time run
- For repeated use, they can create
.dlt/secrets.toml
Step 5: Run the pipeline
python <pipeline_script>.py
After the run, confirm:
- The pipeline completed without errors
- A
.duckdbfile was created (usually at<pipeline_name>.duckdb) - Print discovered tables and their column counts
import duckdb
con = duckdb.connect("<pipeline_name>.duckdb", read_only=True)
for row in con.execute("""
SELECT table_schema, table_name,
(SELECT COUNT(*) FROM information_schema.columns c
Pertanyaan umum
Apa itu dlt?
Itu adalah alat pemuatan data yang menarik data dari API ke dalam berkas basis data, seperti DuckDB.
Mengapa perlu menjalankan kueri verifikasi?
Skill ini menyatakan keberhasilan berarti proyek yang benar-benar menjalankan kueri, bukan sekadar berkas yang tampak benar.
Apakah saya perlu bisa Python?
Sedikit Python membantu karena pipeline memakainya, tetapi skill ini menjelaskan langkah-langkahnya untuk pengguna yang sudah paham SQL.
Detail
Deskripsi asli dari pembuat
Connect SaaS data (HubSpot, Stripe, Salesforce, GitHub, Slack, etc.) to Wren Engine for SQL analysis. Guides the user through the full flow: install dlt, pick a SaaS source, set up credentials, run the data pipeline into DuckDB, then auto-generate a Wren semantic project from the loaded data. Use this skill whenever the user mentions: connecting SaaS data, importing data from an API, dlt pipelines, loading HubSpot/Stripe/Salesforce/GitHub/Slack data, querying SaaS data with SQL, or setting up a new data source from a REST API. Also trigger when the user already has a dlt-produced DuckDB file a
repo: Canner/WrenAI
Popularitas
- Bintang GitHub
- 18k
- Peringkat
- #10724
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
enrich-context
18kMembantu agent Anda menambahkan makna bisnis ke proyek data Wren, seperti satuan, nilai enum, sinonim, dan metrik standar.
genbi
18kMembantu agent Anda mengubah proyek data Wren menjadi dasbor peramban yang bisa dibagikan dan men-deploy-nya ke akun hosting Anda sendiri.
generate-mdl
18kMembantu agent Anda membuat proyek semantik Wren dengan menjelajahi skema basis data, menormalkan tipe, dan menghasilkan berkas YAML.
onboarding
18kMembantu agent Anda menyiapkan Wren Engine dari awal: memeriksa lingkungan, membuat proyek, menghubungkan basis data, dan menjalankan kueri pertama.
Skill serupa
discrawl
394kMemungkinkan agent Anda mencari dan merangkum arsip pesan Discord lokal yang tersimpan, memeriksa seberapa baru arsipnya, dan membaca pesan langsung.
clickhouse-io
280kMembantu agent Anda mengoptimalkan query dan skema di database ClickHouse dengan praktik terbaik analitik berperforma tinggi. Gunakan saat query analitik terlalu lambat.
scientific-db-pubmed-database
280kMembantu agent Anda mencari artikel ilmiah di bidang biomedis. Berguna untuk riset yang membutuhkan informasi medis spesifik.