add-warehouse-adapter

Implements new warehouse adapters across Lightdash common, backend, warehouse, frontend, CLI, and Docker layers.

6.1k|768|Updated Mar 19, 2021
One-click install
npx skills add https://github.com/lightdash/lightdash --skill add-warehouse-adapter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-warehouse-adapter
Source: https://github.com/lightdash/lightdash/tree/main/.claude/skills/add-warehouse-adapter
Command: npx skills add https://github.com/lightdash/lightdash --skill add-warehouse-adapter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new warehouse connection to Lightdash requires coordinated changes across seven layers of the monorepo, and missing any registration point causes type errors or broken integrations. This Skill provides an exhaustive checklist so no layer is forgotten.

Core Features & Use Cases

  • Layer-by-layer checklist: Covers common types, backend services and migrations, warehouse client implementation, frontend forms, CLI dbt targets, Dockerfile dbt packages, and demo project compatibility.
  • Canonical reference implementations: Points to the Athena adapter (PRs #19751/#19752) and the MotherDuck/DuckDB adapter as proven patterns to follow.
  • Verification commands: Includes the exact pnpm typecheck, lint, test, and code-generation commands to run after each layer.
  • Use Case: When adding support for a new data warehouse such as a cloud SQL engine, follow the checklist to register credential types, implement the WarehouseBaseClient subclass, wire up frontend connection forms, and add the dbt adapter package to the Dockerfile.

Quick Start

Use the add-warehouse-adapter skill to guide me through adding a new warehouse connection for my database to Lightdash.

Frequently Asked Questions about add-warehouse-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new warehouse connection to Lightdash?

Follow the seven-layer checklist: add credential types in packages/common, create a backend migration and service cases, implement a WarehouseBaseClient subclass in packages/warehouses, register frontend forms, add a CLI dbt target, update the Dockerfile, and adjust the demo project.

Which existing Lightdash warehouse adapter should I copy as a reference?

Use the Athena adapter from PRs #19751/#19752 as the canonical example, since it was the first added with this pattern. The MotherDuck/DuckDB adapter is the most recent implementation and shows current conventions.

How are sensitive warehouse credentials handled in Lightdash?

Sensitive fields like tokens and passwords are declared optional, added to the sensitiveCredentialsFieldNames array, and blanked in clearSecretsFromCredentials. Backend dbt profiles pass secrets via envVarReference and envVar patterns rather than raw values.

Does the Lightdash Dockerfile need changes for a new dbt adapter?

Yes, add the dbt-xxx pip package to dbt virtual environments version 1.8 and newer in the Dockerfile. Check PyPI for the package name and whether it tracks dbt-core versions or uses its own versioning scheme.

What verification steps are required after adding a warehouse adapter?

Run pnpm typecheck and lint for common, backend, and frontend packages, plus tests for @lightdash/warehouses. Then run pnpm generate-api, generate and check the chart-as-code schema, and test dbt seed and run against the demo project.