feat: add Vertica adapter support#130
Open
Albayrakengin wants to merge 3 commits into
Open
Conversation
Remove duplicate launch config, fix README formatting, document adapter semantics for quoted columns, and add sqlserver/vertica regression tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Vertica to the supported adapters, mirroring the sqlserver contribution
pattern for adapters whose SQLGlot dialect name differs from the dbt
adapter_type.Why these decisions
postgres. SQLGlot has no native Vertica dialect.dbt-vertica projects emit
adapter_type: "vertica"inmanifest.json, and VerticaSQL/identifier behaviour is close enough to reuse the existing postgres parsing
path.
self.adapter_typeis tracked separately fromself.dialect. For remappedadapters (
sqlserver→tsql,vertica→postgres), quoted-column casesensitivity must follow adapter semantics, not the mapped SQLGlot dialect alone.
_build_quoted_columns_lookuptherefore checksadapter_type.DialectInfo("vertica", "lower", True, "vertica", sqlglot_dialect="postgres"). Vertica uses 3-part identifiers and double-quoted,case-sensitive identifiers like Postgres. Unquoted identifiers are lowercased.
Fixture generation
tests/test_data/vertica/is derived from the existing postgres jaffle_shopfixture with
metadata.adapter_typeset to"vertica". Happy to regenerate from areal
dbt-verticaproject if maintainers prefer native artifacts.Verification
pytest tests/test_extractor.py::test_adapter_type_detection_vertica -qpytest tests/test_extractor.py::test_adapter_type_detection_sqlserver -qpytest tests/test_extractor.py::test_vertica_quoted_columns_preserve_case -qpytest tests/test_dialect_matrix.py -qpytest tests/ -q