dlt-connector
하는 일
이 스킬은 SaaS 서비스를 Wren Engine에 연결하는 방법을 안내합니다. dlt 설치, 자격 증명 설정, DuckDB로의 파이프라인 실행, 시맨틱 프로젝트 생성을 포함합니다. SQL로 업무 도구의 데이터를 조회하려는 데이터 분석가를 위한 스킬입니다.
사용하는 경우
- ✓HubSpot, Stripe, Salesforce 같은 SaaS 도구의 데이터를 데이터베이스로 가져와야 할 때.
- ✓이미 DuckDB 파일이 있고 그 위에 시맨틱 프로젝트만 만들면 될 때.
- ✓Wren을 통해 SaaS 데이터를 SQL로 조회하기 시작하고 싶을 때.
스킬 링크
https://github.com/Canner/WrenAI/blob/main/core/wren/src/wren/skills_content/dlt-connector/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 Stripe 계정을 Wren에 연결하고, 지난달 결제 내역을 DuckDB에 불러온 뒤 조회할 수 있는 프로젝트를 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 네 단계로 진행합니다. dlt 설치, 원본을 DuckDB에 적재, 스키마를 조사해 Wren 프로젝트 만들기, 실제 SQL 쿼리로 검증입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
dlt란 무엇인가요?
API에서 데이터를 가져와 DuckDB 같은 데이터베이스 파일에 넣는 데이터 적재 도구입니다.
검증 쿼리는 왜 실행하나요?
스킬은 파일이 맞아 보이는 것이 아니라, 실제로 쿼리를 실행하는 프로젝트가 있어야 성공이라고 말합니다.
파이썬을 알아야 하나요?
파이프라인이 파이썬을 쓰므로 조금 알면 도움이 되지만, 스킬은 SQL에 익숙한 사용자를 위해 단계를 설명합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 18k
- 순위
- #10724
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
enrich-context
18k에이전트가 단위, 열거형 값, 동의어, 표준 지표처럼 업무 의미를 Wren 데이터 프로젝트에 더하도록 돕습니다.
genbi
18k에이전트가 Wren 데이터 프로젝트를 공유 가능한 브라우저 대시보드로 바꾸고, 사용자의 호스팅 계정에 배포하도록 돕습니다.
generate-mdl
18k에이전트가 데이터베이스 스키마를 탐색하고, 타입을 정리하고, YAML 파일을 생성해 Wren 시맨틱 프로젝트를 만들도록 돕습니다.
onboarding
18k에이전트가 처음부터 Wren Engine을 설정하도록 돕습니다. 환경 확인, 프로젝트 생성, 데이터베이스 연결, 첫 쿼리 실행을 포함합니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.