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

88 some tests fail on exasol 8 due to missing encryption argument #110

Merged
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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,19 @@ OpenID login through access_token or refresh_token instead of user+password
<li><strong>socket_timeout</strong>: defaults to pyexasol default</li>
<li><strong>query_timeout</strong>: defaults to pyexasol default</li>
<li><strong>compression</strong>: default: False</li>
<li><strong>encryption</strong>: default: False</li>
<li><strong>encryption</strong>: default: True</li>
<li><strong>protocol_version</strong>: default: v3</li>
<li><strong>row_separator</strong>: default: CRLF for windows - LF otherwise</li>
<li><strong>timestamp_format</strong>: default: YYYY-MM-DDTHH:MI:SS.FF6</li>
</ul>

# Known isues

## Using encryption in Exasol 7 vs. 8
Starting from Exasol 8, encryption is enforced by default. If you are still using Exasol 7 and have trouble connecting, you can disable encryption in profiles.yaml (see optional parameters).

## Materialized View & Clone operations
In Exasol materialized views and clone operations are note suported. Default behaviour from dbt-core will fail accordingly.
In Exasol materialized views and clone operations are not suported. Default behaviour from dbt-core will fail accordingly.

## Null handling in test_utils null safe handling
In Exasol empty string are NULL. Due to this behaviour and as of [this pull request 7776 published in dbt-core 1.6](https://github.com/dbt-labs/dbt-core/pull/7776),
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/exasol/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ExasolCredentials(Credentials):
socket_timeout: int = pyexasol.constant.DEFAULT_SOCKET_TIMEOUT
query_timeout: int = pyexasol.constant.DEFAULT_QUERY_TIMEOUT
compression: bool = False
encryption: bool = False
encryption: bool = True
## Because of potential interference with dbt,
# the following statements are not (yet) implemented
# fetch_dict: bool
Expand Down
2 changes: 2 additions & 0 deletions test.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ DBT_PASS=.
DBT_TEST_USER_1=dbt_test_role_1
DBT_TEST_USER_2=dbt_test_role_2
DBT_TEST_USER_3=dbt_test_role_3

EXASOL_RELEASE=8
5 changes: 4 additions & 1 deletion tests/functional/adapter/grants/test_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class TestIncrementalGrantsExasol(BaseIncrementalGrants):

class TestInvalidGrantsExasol(BaseInvalidGrants):
def grantee_does_not_exist_error(self):
return "user or role 'INVALID_USER' does not exist"
# Exasol versions have different error messages:
# Exasol 7: "user or role 'INVALID_USER does not exist"
# Exasol 8: "user or role INVALID_USER does not exist"
return "does not exist"

def privilege_does_not_exist_error(self):
return "syntax error, unexpected ON_, expecting ',' or TO_ [line 3, column 34]"
Expand Down
40 changes: 38 additions & 2 deletions tests/functional/adapter/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
from dbt.tests.adapter.basic.test_snapshot_timestamp import BaseSnapshotTimestamp
from dbt.tests.adapter.basic.test_validate_connection import BaseValidateConnection
from test_docs_generate import (BaseDocsGenerate, BaseDocsGenReferences)

from expected_catalog import (
base_expected_catalog,
no_stats,
expected_references_catalog,
)

class TestSimpleMaterializationsExasol(BaseSimpleMaterializations):
pass
Expand Down Expand Up @@ -75,9 +79,25 @@ def dbt_profile_target(self):
"dbname": "DB",
"timestamp_format": "YYYY-MM-DD HH:MI:SS.FF6"
}

@pytest.fixture(scope="class")
def expected_catalog(self, project, unique_schema):
return base_expected_catalog(
project,
role=unique_schema.upper(),
id_type="DECIMAL(18,0)",
text_type="VARCHAR(2000000) UTF8",
time_type="TIMESTAMP(3)" if os.getenv('EXASOL_RELEASE', "8") == "8" else "TIMESTAMP",
view_type="VIEW",
table_type="TABLE",
model_stats=no_stats(),
case=lambda x: x.upper(),
case_columns=True
)



class TestDocsGenReferencesExasol(BaseDocsGenReferences):

@pytest.fixture(scope="class")
def dbt_profile_target(self):
return {
Expand All @@ -89,6 +109,22 @@ def dbt_profile_target(self):
"dbname": "DB",
"timestamp_format": "YYYY-MM-DD HH:MI:SS.FF6"
}

@pytest.fixture(scope="class")
def expected_catalog(self, project, unique_schema):
return expected_references_catalog(
project,
role=unique_schema.upper(),
id_type="DECIMAL(18,0)",
text_type="VARCHAR(2000000) UTF8",
time_type="TIMESTAMP(3)" if os.getenv('EXASOL_RELEASE', "8") == "8" else "TIMESTAMP",
bigint_type="DECIMAL(18,0)",
view_type="VIEW",
table_type="TABLE",
model_stats=no_stats(),
case=lambda x: x.upper(),
case_columns=True
)

class TestBaseIncrementalNotSchemaChangeExasol(BaseIncrementalNotSchemaChange):
pass