Package: dbt-vertica
dbt-verticadbtadapter forVertica. The adapter usesvertica-pythonto connect to your Vertica database.For more information on using dbt with Vertica, consult theVertica-SetupandConfigurationpages.dbt-vertica Versions Testeddbt-vertica has been developed using the following software and versions:Vertica Server 23.4.0-0Python 3.11vertica-python client 1.3.1dbt-core 1.6.0dbt-tests-adapter 1.6.0Supported Featuresdbt Core FeaturesBelow 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.0dbt Core FeaturesSupportedTable MaterializationsYesEphemeral MaterializationsYesView MaterializationsYesIncremental Materializations - AppendYesIncremental Materailizations - MergeYesIncremental Materializations - Delete+InsertYesIncremental Materializations - Insert_OverwriteYesSnapshots - TimestampYesSnapshots - Check ColsNoSeedsYesTestsYesDocumentationYesExternal TablesUntestedYes- 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-verticaYou don't need to install dbt separately. Installingdbt-verticawill also installdbt-coreandvertica-python.Sample Profile Configurationyour-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: devDescription of Profile Fields:PropertyDescriptionRequired?Default ValueExampletypeThe specific adapter to use.YesNoneverticahostThe host name or IP address of any active node in the Vertica Server.YesNone127.0.0.1portThe port to use, default or custom.Yes54335433usernameThe username to use to connect to the server.YesNonedbadminpasswordThe password to use for authenticating to the server.YesNonemy_passworddatabaseThe name of the database running on the server.YesNonemy_dboauth_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.NoNoneVMartconnection_load_balanceA Boolean value that indicates whether the connection can be redirected to a host in the database other than host.Notruetruebackup_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.No23threadsThe number of threads the dbt project will run on.No13labelA session label to identify the connection.NoAn auto-generated label with format of: dbt_usernamedbt_dbadminFor more information on Vertica’s connection properties please refer toVertica-PythonConnection Properties.ChangelogSee thechangelogContributing guidelinesHave a bug or an idea? Please seeCONTRIBUTING.mdfor detailsDevelopRun 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-ceAccess the local Vertica instance like:docker exec -it <docker_image_name> /opt/vertica/bin/vsqlYou need the pytest dbt adapter:pip3 install  dbt-tests-adapter==1.5.0Run tests via:pytest tests/functional/adapter/
# run an individual test 
pytest tests/functional/adapter/test_basic.py