Skip to content

Commit

Permalink
Update (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: nrodriguezmicrofocus <[email protected]>
Co-authored-by: nrodriguezmicrofocus <[email protected]>
  • Loading branch information
3 people authored Dec 22, 2023
1 parent 62d7ea5 commit a6b8662
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions dbt/adapters/vertica/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (

Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion dbt/include/vertica/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ version: 2.0.0
macro-paths: ["macros"]


profile: vpn_samp
profile: vpn_samp
11 changes: 8 additions & 3 deletions dbt/include/vertica/macros/materializations/clone.sql
Original file line number Diff line number Diff line change
@@ -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 %}

0 comments on commit a6b8662

Please sign in to comment.