From 4df22f6dd55930f5d09fdb43c3bc15facfaf6c31 Mon Sep 17 00:00:00 2001 From: Leo Rudczenko Date: Tue, 26 Nov 2024 09:42:58 +0000 Subject: [PATCH 1/2] Use 'oracle+oracledb://' --- etlhelper/db_helpers/oracle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etlhelper/db_helpers/oracle.py b/etlhelper/db_helpers/oracle.py index a481370..1e9abbe 100644 --- a/etlhelper/db_helpers/oracle.py +++ b/etlhelper/db_helpers/oracle.py @@ -66,5 +66,5 @@ def get_sqlalchemy_connection_string(self, db_params, password_variable): Returns connection string for SQLAlchemy engine. """ password = self.get_password(password_variable) - return (f'oracle://{db_params.user}:{password}@' + return (f'oracle+oracledb://{db_params.user}:{password}@' f'{db_params.host}:{db_params.port}/{db_params.dbname}') From 6ac4ecd919589eba807827f8483b7429abb6f955 Mon Sep 17 00:00:00 2001 From: Leo Rudczenko Date: Tue, 26 Nov 2024 09:46:47 +0000 Subject: [PATCH 2/2] Apply change to test --- test/unit/test_db_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/test_db_helpers.py b/test/unit/test_db_helpers.py index 4426822..6f20346 100644 --- a/test/unit/test_db_helpers.py +++ b/test/unit/test_db_helpers.py @@ -90,7 +90,7 @@ def test_connect(monkeypatch, db_params, driver, expected): @pytest.mark.parametrize('db_params, expected', [ - (ORACLEDB, 'oracle://testuser:mypassword@server:1521/testdb'), + (ORACLEDB, 'oracle+oracledb://testuser:mypassword@server:1521/testdb'), (MSSQLDB, 'mssql+pyodbc://testuser:mypassword@server:1521/testdb?driver=test+driver'), # NOQA