Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kudu support #200

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbt/adapters/impala/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ImpalaIncludePolicy(Policy):
class ImpalaRelation(BaseRelation):
quote_policy: ImpalaQuotePolicy = field(default_factory=lambda: ImpalaQuotePolicy())
include_policy: ImpalaIncludePolicy = field(default_factory=lambda: ImpalaIncludePolicy())
quote_character: str = None
quote_character: str = '`'
information: str = None

def __post_init__(self):
Expand Down
9 changes: 9 additions & 0 deletions dbt/include/impala/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
{%- endif %}
{%- endmacro -%}

{% macro ct_option_primary_key(label, required=false) %}
{%- set primaryKey = config.get('primary_key', validator=validation[basestring]) -%}

{%- if primaryKey is not none %}
{{label}} {{primaryKey}}
{%- endif %}
{%- endmacro -%}

{% macro ct_option_stored_as(label, required=false) %}
{%- set storedAs = config.get('stored_as', validator=validation[basestring]) -%}

Expand Down Expand Up @@ -180,6 +188,7 @@
{{ ct_option_row_format(label="row format") }}
{{ ct_option_with_serdeproperties(label="with serdeproperties") }}
{%- if table_type == 'iceberg' -%} STORED BY ICEBERG {%- endif -%}
{{ ct_option_primary_key(label="PRIMARY KEY") }}
{{ ct_option_stored_as(label="stored as") }}
{{ ct_option_location_clause(label="location") }}
{{ ct_option_cached_in(label="cached in") }}
Expand Down