Skip to main content

dbt-vertica

dbt adapter for Vertica. The adapter uses vertica-python to connect to your Vertica database. The adapter is forward compatible with newer versions of dbt-core but it is not backward compatible with dbt-core versions earlier than v1.3.0.

For more information on using dbt with Vertica, consult the Vertica-Setup and Configuration pages.

Supported Features

dbt Core Features

Below is a table for what features the current Vertica adapter supports for dbt. This is constantly improving and changing as both dbt adds new functionality, as well as the dbt-vertica driver improves. This list is based upon dbt 1.3.0

dbt Core Features Supported
Table Materializations Yes
Ephemeral Materializations Yes
View Materializations Yes
Incremental Materializations - Append Yes
Incremental Materailizations - Merge Yes
Incremental Materializations - Delete+Insert Yes
Incremental Materializations - Insert_Overwrite Yes
Snapshots - Timestamp Yes
Snapshots - Check Cols No
Seeds Yes
Tests Yes
Documentation Yes
External Tables Untested
  • Yes - Supported, and tests pass.
  • No - Not supported or implemented.
  • Untested - May support out of the box, though hasn't been tested.
  • Passes Test -The testes have passed, though haven't tested in a production like environment

Vertica Features

Below is a table for what features the current Vertica adapter supports for Vertica. This is constantly improving and changing as both dbt adds new functionality, as well as the dbt-vertica driver improves.

Vertica Features Supported
Created/Drop Schema Yes
Analyze Statistics No
Purge Delete Vectors No
Projection Management No
Primary/Unique Keys No
Other DDLs No

Installation

$ pip install dbt-vertica

You don't need to install dbt separately. Installing dbt-vertica will also install dbt-core and vertica-python.

Sample Profile Configuration

your-profile:
  outputs:
    dev:
      type: vertica # Don't change this!
      host: [hostname]
      port: [port] # or your custom port (optional)
      username: [your username] 
      password: [your password] 
      database: [database name] 
      schema: [dbt schema] 
      connection_load_balance: True
      backup_server_node: [list of backup hostnames or IPs]
      retries: [1 or more]
      threads: [1 or more] 
  target: dev

Description of Profile Fields:

Property Description Required? Default Value Example
type The specific adapter to use. Yes None vertica
host The host name or IP address of any active node in the Vertica Server. Yes None 127.0.0.1
port The port to use, default or custom. Yes 5433 5433
username The username to use to connect to the server. Yes None dbadmin
password The password to use for authenticating to the server. Yes None my_password
database The name of the database running on the server. Yes None my_db
schema The schema to build models into. No None VMart
connection_load_balance A Boolean value that indicates whether the connection can be redirected to a host in the database other than host. No true true
backup_server_node List of hosts to connect to if the primary host specified in the connection (host, port) is unreachable. Each item in the list should be either a host string (using default port 5433) or a (host, port) tuple. A host can be a host name or an IP address. No none ['123.123.123.123','www.abc.com',('123.123.123.124',5433)]
retries The retry times after an unsuccessful connection. No 2 3
threads The number of threads the dbt project will run on. No 1 3
label A session label to identify the connection. No An auto-generated label with format of: dbt_username dbt_dbadmin

For more information on Vertica’s connection properties please refer to Vertica-Python Connection Properties.

Changelog

See the changelog

Contributing guidelines

Have a bug or an idea? Please see CONTRIBUTING.md for details

Develop

Run a local Vertica instance like:

docker run -p 5433:5433 \
           -p 5444:5444 \
           -e VERTICA_DB_NAME=docker \
           -e VMART_ETL_SCRIPT="" \
           -e VMART_ETL_SQL="" \
           vertica/vertica-ce

Access the local Vertica instance like:

docker exec -it <docker_image_name> /opt/vertica/bin/vsql

You need the pytest dbt adapter:

pip3 install  dbt-tests-adapter==1.3.0

Run tests via:

pytest tests/functional/adapter/
# run an individual test 
pytest tests/functional/adapter/test_basic.py

Release files for dbt-vertica 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbt-vertica 1.3.0
File Size Uploaded
dbt-vertica-1.3.0.tar.gz 27.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dbt-vertica 1.3.0
File Interpreter ABI Platform
dbt_vertica-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.2 kB

Release files / dbt-vertica-1.3.0.tar.gz

Download URL dbt-vertica-1.3.0.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dbc0b18ae0519703a1c4cba307a0c76eef19a68710dca47cd2fa1ea6ceff1acb
BLAKE2b-256 checksum
How to use checksums
683b5ec904c99b1959f00dc5edab9a80ab7dc2cb7a880d0da98ccbe8279a8dc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / dbt_vertica-1.3.0-py3-none-any.whl

Download URL dbt_vertica-1.3.0-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d93b47a5d7db56290c9a06736ef3e936b826197b848b274a2fb4764978e1f94
BLAKE2b-256 checksum
How to use checksums
b2c5ea4cca0f21bf1a275a2bc08c520f07f98d8d9b039cbcabdefde2563d1138
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

1.8.6

2 release files

1.8.5

2 release files

1.7.3

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.4

2 release files

This release

1.3.0 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.18.2

2 release files

0.18.0

2 release files

0.15.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page