🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

dbt-vertica

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbt-vertica

Official vertica adapter plugin for dbt (data build tool)

1.7.3
PyPI
Maintainers
2

dbt-vertica

PyPI version License

dbt adapter for Vertica. The adapter uses vertica-python to connect to your Vertica database.

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

dbt-vertica Versions Tested

dbt-vertica has been developed using the following software and versions:

  • Vertica Server 23.4.0-0
  • Python 3.11
  • vertica-python client 1.3.1
  • dbt-core 1.6.0
  • dbt-tests-adapter 1.6.0

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 FeaturesSupported
Table MaterializationsYes
Ephemeral MaterializationsYes
View MaterializationsYes
Incremental Materializations - AppendYes
Incremental Materailizations - MergeYes
Incremental Materializations - Delete+InsertYes
Incremental Materializations - Insert_OverwriteYes
Snapshots - TimestampYes
Snapshots - Check ColsNo
SeedsYes
TestsYes
DocumentationYes
External TablesUntested
  • 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 tests have passed, though haven't tested in a production like environment.

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] 
      oauth_access_token: [access token]
      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:

PropertyDescriptionRequired?Default ValueExample
typeThe specific adapter to use.YesNonevertica
hostThe host name or IP address of any active node in the Vertica Server.YesNone127.0.0.1
portThe port to use, default or custom.Yes54335433
usernameThe username to use to connect to the server.YesNonedbadmin
passwordThe password to use for authenticating to the server.YesNonemy_password
databaseThe name of the database running on the server.YesNonemy_db
oauth_access_tokenTo authenticate via OAuth, provide an OAuth Access Token that authorizes a user to the database.No""Default: ""
schemaThe schema to build models into.NoNoneVMart
connection_load_balanceA Boolean value that indicates whether the connection can be redirected to a host in the database other than host.Notruetrue
backup_server_nodeList 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.Nonone['123.123.123.123','www.abc.com',('123.123.123.124',5433)]
retriesThe retry times after an unsuccessful connection.No23
threadsThe number of threads the dbt project will run on.No13
labelA session label to identify the connection.NoAn auto-generated label with format of: dbt_usernamedbt_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.5.0

Run tests via:

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts