Skip to content

feat: add Vertica adapter support#2141

Merged
haritamar merged 5 commits intomasterfrom
devin/1773274966-vertica-support
Mar 12, 2026
Merged

feat: add Vertica adapter support#2141
haritamar merged 5 commits intomasterfrom
devin/1773274966-vertica-support

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 12, 2026

feat: add Vertica adapter support

Summary

Adds Vertica as a supported adapter in the elementary CLI, following the same patterns as existing adapters (Snowflake, BigQuery, Postgres, etc.). This is the companion PR to dbt-data-reliability#963 which adds Vertica support to the dbt package (now merged).

Changes:

  • pyproject.tomldbt-vertica >=1.7,<2.0.0 as optional dependency + vertica extra
  • transient_errors.py — Vertica-specific retry patterns (connection timeout, SSL, etc.)
  • docker-compose.yml — Vertica CE container (ghcr.io/ratiopbc/vertica-ce) for local/CI testing
  • profiles.yml.j2 — Vertica dbt profile target + added to elementary profile targets list
  • test-warehouse.yml — Vertica start step, special --no-deps dbt-vertica install (workaround for its dbt-core~=1.8 pin), added to Docker adapter list
  • test-all-warehouses.yml — Added vertica to CI matrix
  • packages.yml / package-lock.yml — Updated dbt-data-reliability revision to the merge commit of [ELE-1257] Support Dremio #963 on master

No SQL macro changes were needed — Vertica uses standard SQL so the existing default__ dispatches should work.

Updates since last revision:

  • dbt-data-reliability#963 has been merged to master. Removed the temporary vertica-compat branch override in test-all-warehouses.yml and updated packages.yml / package-lock.yml to reference the merge commit (2ab66fbe).

Review & Testing Checklist for Human

  • Verify the --no-deps dbt-vertica install doesn't conflict with pip install ".[vertica]" — The workflow does pip install --no-deps dbt-vertica then later pip install "." (without the vertica extra). Confirm the final environment has a working dbt-vertica + latest dbt-core.
  • Third-party Docker imageghcr.io/ratiopbc/vertica-ce is maintained by Ratio PBC, not Vertica/OpenText. This is the same image used in dbt-data-reliability#963. Confirm this is acceptable or switch to an official image (requires Docker Hub auth).
  • Transient error patterns — The error strings in transient_errors.py were inferred, not tested against actual Vertica error output. Verify these match real Vertica error messages.
  • Test end-to-end — Trigger the CI workflow with warehouse-type: vertica to ensure everything works (seed → run → test → monitor → report).

Notes

Summary by CodeRabbit

  • New Features
    • Added Vertica as a supported warehouse with end-to-end integration and adapter handling.
  • Reliability
    • Improved transient error detection to recognize Vertica-specific connection errors.
  • Tests
    • Expanded CI and local test setup to include a Vertica service, profiles, and workflow steps for e2e validation.
  • Chores
    • Added an optional Vertica dependency and new extras to dependency configuration.

- Add dbt-vertica as optional dependency in pyproject.toml
- Add Vertica transient error patterns for automatic retry
- Add Vertica Docker service to e2e test docker-compose
- Add Vertica profile to test profiles template
- Add Vertica to CI workflow matrix (test-warehouse + test-all-warehouses)
- Handle dbt-vertica install with --no-deps (pins dbt-core~=1.8)

Co-Authored-By: Itamar Hartstein <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

👋 @devin-ai-integration[bot]
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3dea9772-297c-4553-b833-b16d0dd703b2

📥 Commits

Reviewing files that changed from the base of the PR and between 09a44a0 and 9b8d85d.

📒 Files selected for processing (1)
  • tests/e2e_dbt_project/macros/vertica_seed_override.sql

📝 Walkthrough

Walkthrough

Adds Vertica support across CI/workflows, dependency extras, test Docker infrastructure and profiles, transient-error detection, and a Vertica-specific dbt seed macro and install/workflow adjustments.

Changes

Cohort / File(s) Summary
CI/CD workflows
/.github/workflows/test-all-warehouses.yml, /.github/workflows/test-warehouse.yml
Added vertica to warehouse matrix/inputs; added Vertica startup step and Vertica-specific dbt install flow; updated Docker-backed adapter detection and profile-writing logic to include Vertica.
Dependencies / Packaging
pyproject.toml
Added optional dbt-vertica (>=1.7,<2.0.0) dependency; added vertica extra and included dbt-vertica in the all extra.
Testing infra (Docker)
tests/e2e_dbt_project/docker-compose.yml
Added vertica service (Vertica CE) with port mapping, env vars, healthcheck, vertica-data volume, and increased ulimits.
Test profiles
tests/profiles/profiles.yml.j2
Added a vertica Docker target and included vertica in the elementary profile targets iteration.
Transient error detection
elementary/clients/dbt/transient_errors.py
Added vertica adapter patterns: "connection timed out", "could not connect to the server", "ssl syscall error" for transient-error matching.
Monitor dependencies
elementary/monitor/dbt_project/packages.yml, elementary/monitor/dbt_project/package-lock.yml
Updated pinned git revision for the dbt-data-reliability dependency and its lock metadata.
dbt seed macro (tests)
tests/e2e_dbt_project/macros/vertica_seed_override.sql
Added macro copy_local_load_csv_rows(model, agate_table) to use per-seed reject tables and avoid "Object already exists" errors during concurrent seeds.

Sequence Diagram(s)

sequenceDiagram
participant CI as CI Workflow
participant Runner as GitHub Runner
participant Docker as Docker Compose
participant Installer as dbt Installer
participant Vertica as Vertica DB

CI->>Runner: trigger workflow (matrix includes vertica)
Runner->>Docker: start containers (incl. vertica service)
Docker->>Vertica: start & run healthcheck
Runner->>Installer: run install steps (conditional vertica flow)
Installer->>Vertica: install/connect (dbt-vertica path)
Runner->>Installer: run dbt commands/tests
Vertica-->>Installer: responses (or transient errors matched)
Runner->>CI: collect and report results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I found a Vertica patch today,
I hopped through workflows, ports, and play.
Docker wakes, dbt learns a new rule,
Seeds skip clashes, tests mind the pool.
A crunchy carrot for one more warehouse, hooray!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "feat: add Vertica adapter support" accurately summarizes the main objective of the pull request, which is to add Vertica as a supported adapter in the elementary CLI. The title is clear, specific, and directly related to the comprehensive set of changes across multiple files that enable Vertica support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1773274966-vertica-support

Comment @coderabbitai help to get the list of available commands and usage tips.

The dbt-vertica package pins dbt-core~=1.8. Installing elementary with
the [vertica] extra would re-resolve dbt-vertica's deps and downgrade
dbt-core, breaking package-lock.yml parsing and protobuf compat.

Fix: install elementary without the adapter extra for Vertica (dbt-vertica
is already present via --no-deps), and explicitly install vertica-python.

Co-Authored-By: Itamar Hartstein <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/test-all-warehouses.yml (1)

89-111: ⚠️ Potential issue | 🟠 Major

Gate the Vertica matrix leg until the companion dbt package ref is available.

This now runs vertica on every PR, but dbt-data-reliability-ref is still empty for the automatic triggers. Per the PR notes, that means this leg will keep checking out a non-Vertica-compatible branch of elementary-data/dbt-data-reliability and fail deterministically until the companion PR merges. Either exclude vertica from automatic PR runs for now, or inject the companion ref by default for this matrix entry.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test-all-warehouses.yml around lines 89 - 111, The vertica
matrix entry is being run on automatic PRs without a companion
dbt-data-reliability-ref; update the warehouse-type matrix to either (A) exclude
'vertica' when github.event_name is 'pull_request' or 'pull_request_target' by
filtering the matrix.list (i.e., conditionally build the warehouse-type array to
omit 'vertica' for automatic PRs), or (B) inject a default companion ref for the
vertica entry by setting dbt-data-reliability-ref to a non-empty default when
matrix.warehouse-type == 'vertica' (use the existing
inputs.dbt-data-reliability-ref or a lookup for vertica-specific default);
adjust the workflow expression that defines warehouse-type and/or the uses:
./.github/workflows/test-warehouse.yml with the dbt-data-reliability-ref input
so the vertica leg is skipped or given a valid ref for automatic PR triggers.
.github/workflows/test-warehouse.yml (1)

201-214: ⚠️ Potential issue | 🔴 Critical

Pin a default dbt-core version for the Vertica path.

When inputs.dbt-version is empty—as it is in the default matrix—Line 208 becomes pip install dbt-core, which pulls version 1.11.5 (latest), but dbt-vertica requires dbt-core==1.8.5 exactly. The --no-deps workaround on Line 207 becomes ineffective, leaving the Vertica test leg with incompatible dependencies. Pin a default version like 1.8.5 on Line 208 to match dbt-vertica's requirement:

Suggested fix
      - name: Install dbt (Vertica)
        if: inputs.warehouse-type == 'vertica'
        run: |
          pip install --no-deps dbt-vertica
-         pip install "dbt-core${{ inputs.dbt-version && format('=={0}', inputs.dbt-version) }}"
+         pip install "dbt-core${{ inputs.dbt-version && format('=={0}', inputs.dbt-version) || '==1.8.5' }}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test-warehouse.yml around lines 201 - 214, The Vertica job
installs dbt-core without a fallback so when inputs.dbt-version is empty it
pulls a too-new version; update the "Install dbt (Vertica)" step to pin a
default dbt-core version (e.g. 1.8.5) when inputs.dbt-version is not provided by
changing the pip install invocation that currently uses inputs.dbt-version
interpolation to use a fallback value (inputs.dbt-version || '1.8.5'); ensure
this change affects the pip install "dbt-core..." call referenced in the
"Install dbt (Vertica)" step so dbt-vertica remains compatible.
🧹 Nitpick comments (1)
tests/e2e_dbt_project/docker-compose.yml (1)

293-321: Pin the Vertica image to a tested tag or digest.

ghcr.io/ratiopbc/vertica-ce is currently floating on the registry default tag, so CI behavior can change underneath this workflow and the third-party dependency review is hard to reproduce. Please lock this to the exact image version/digest you validated.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/e2e_dbt_project/docker-compose.yml` around lines 293 - 321, The Vertica
service is using an unpinned image reference causing non-reproducible CI runs;
update the vertica service's image field (the "image" property under the vertica
service) to a specific, tested tag or immutable digest (e.g.,
ghcr.io/ratiopbc/vertica-ce:<tested-tag> or
ghcr.io/ratiopbc/vertica-ce@sha256:<digest>) and commit that change in
docker-compose.yml so CI pulls the exact validated image; optionally add a short
comment noting the tested tag/digest and verification date.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@elementary/clients/dbt/transient_errors.py`:
- Around line 123-128: The Vertica transient-patterns tuple in the transient
error mapping contains an incorrect entry "no transaction in progress" that
should be removed; edit the mapping keyed by "vertica" in transient_errors.py
(the tuple currently with "connection timed out", "could not connect to the
server", "ssl syscall error", "no transaction in progress") and delete the
fourth element so the tuple only includes the three real transient patterns,
ensuring any substring-matching logic that uses this mapping (e.g., the
transient error checker that references the "vertica" key) will no longer treat
transaction-state notices as retryable.

---

Outside diff comments:
In @.github/workflows/test-all-warehouses.yml:
- Around line 89-111: The vertica matrix entry is being run on automatic PRs
without a companion dbt-data-reliability-ref; update the warehouse-type matrix
to either (A) exclude 'vertica' when github.event_name is 'pull_request' or
'pull_request_target' by filtering the matrix.list (i.e., conditionally build
the warehouse-type array to omit 'vertica' for automatic PRs), or (B) inject a
default companion ref for the vertica entry by setting dbt-data-reliability-ref
to a non-empty default when matrix.warehouse-type == 'vertica' (use the existing
inputs.dbt-data-reliability-ref or a lookup for vertica-specific default);
adjust the workflow expression that defines warehouse-type and/or the uses:
./.github/workflows/test-warehouse.yml with the dbt-data-reliability-ref input
so the vertica leg is skipped or given a valid ref for automatic PR triggers.

In @.github/workflows/test-warehouse.yml:
- Around line 201-214: The Vertica job installs dbt-core without a fallback so
when inputs.dbt-version is empty it pulls a too-new version; update the "Install
dbt (Vertica)" step to pin a default dbt-core version (e.g. 1.8.5) when
inputs.dbt-version is not provided by changing the pip install invocation that
currently uses inputs.dbt-version interpolation to use a fallback value
(inputs.dbt-version || '1.8.5'); ensure this change affects the pip install
"dbt-core..." call referenced in the "Install dbt (Vertica)" step so dbt-vertica
remains compatible.

---

Nitpick comments:
In `@tests/e2e_dbt_project/docker-compose.yml`:
- Around line 293-321: The Vertica service is using an unpinned image reference
causing non-reproducible CI runs; update the vertica service's image field (the
"image" property under the vertica service) to a specific, tested tag or
immutable digest (e.g., ghcr.io/ratiopbc/vertica-ce:<tested-tag> or
ghcr.io/ratiopbc/vertica-ce@sha256:<digest>) and commit that change in
docker-compose.yml so CI pulls the exact validated image; optionally add a short
comment noting the tested tag/digest and verification date.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 40998330-3203-4356-b4b4-4c5fd2f6b77d

📥 Commits

Reviewing files that changed from the base of the PR and between 13a4e0a and 4446231.

📒 Files selected for processing (6)
  • .github/workflows/test-all-warehouses.yml
  • .github/workflows/test-warehouse.yml
  • elementary/clients/dbt/transient_errors.py
  • pyproject.toml
  • tests/e2e_dbt_project/docker-compose.yml
  • tests/profiles/profiles.yml.j2

devin-ai-integration bot and others added 3 commits March 12, 2026 00:34
- Remove 'no transaction in progress' from Vertica transient patterns
  (it's a transaction-state notice, not a transient connection error)
- Hardcode dbt-data-reliability-ref to 'vertica-compat' for the Vertica
  matrix entry until PR #963 merges into master

Co-Authored-By: Itamar Hartstein <[email protected]>
PR #963 has been merged to master (2ab66fbe). Update:
- packages.yml/package-lock.yml: point to merge commit on master
- test-all-warehouses.yml: remove vertica-compat branch override

Co-Authored-By: Itamar Hartstein <[email protected]>
…lision)

dbt-vertica's COPY command hardcodes 'seed_rejects' as the reject table
name for every seed, causing 'Object already exists' errors when dbt seed
processes more than one file. This override (same as in dbt-data-reliability
integration tests) uses per-seed reject table names.

Co-Authored-By: Itamar Hartstein <[email protected]>
@haritamar haritamar merged commit 4566cc2 into master Mar 12, 2026
23 checks passed
@haritamar haritamar deleted the devin/1773274966-vertica-support branch March 12, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant