diff --git a/dbt/adapters/vertica/impl.py b/dbt/adapters/vertica/impl.py index c8c6069..e6ed3a4 100644 --- a/dbt/adapters/vertica/impl.py +++ b/dbt/adapters/vertica/impl.py @@ -18,6 +18,8 @@ #from dbt.adapters.vertica import VerticaRelation from dbt.adapters.vertica.column import VerticaColumn from typing import Optional, List, Union, Dict + +from dbt.adapters.capability import CapabilityDict, CapabilitySupport, Support, Capability from dbt.adapters.base import available from dbt.exceptions import ( @@ -60,6 +62,12 @@ class verticaAdapter(SQLAdapter): ConstraintType.foreign_key: ConstraintSupport.NOT_ENFORCED, } + _capabilities: CapabilityDict = CapabilityDict( + { + Capability.SchemaMetadataByRelations: CapabilitySupport(support=Support.Full), + Capability.TableLastModifiedMetadata: CapabilitySupport(support=Support.Full), + } + ) @classmethod def date_function(cls): diff --git a/dbt/include/vertica/dbt_project.yml b/dbt/include/vertica/dbt_project.yml index dae6df4..4dbfb86 100644 --- a/dbt/include/vertica/dbt_project.yml +++ b/dbt/include/vertica/dbt_project.yml @@ -7,4 +7,4 @@ version: 2.0.0 macro-paths: ["macros"] -profile: vpn_samp \ No newline at end of file +profile: vpn_samp diff --git a/dbt/include/vertica/macros/materializations/clone.sql b/dbt/include/vertica/macros/materializations/clone.sql index 3a37bf9..8735b53 100644 --- a/dbt/include/vertica/macros/materializations/clone.sql +++ b/dbt/include/vertica/macros/materializations/clone.sql @@ -1,9 +1,14 @@ + + {% macro vertica__can_clone_table() %} {{ return(True) }} {% endmacro %} - - + + {% macro vertica__create_or_replace_clone(this_relation, defer_relation) %} - SELECT COPY_TABLE ( {{ "'"+defer_relation|replace('"','')+"'"}}, {{ "'"+this_relation|replace('"','')+"'"}} ); + +SELECT COPY_TABLE ( {{ "'"+defer_relation|replace('"','')+"'"}}, {{ "'"+this_relation|replace('"','')+"'"}} ); + + {% endmacro %} \ No newline at end of file