From 7fe5e53e7800b462ff4cc5d013c418acaac33e9d Mon Sep 17 00:00:00 2001 From: Angelika Tarnawa <59344718+angelika233@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:08:47 +0200 Subject: [PATCH] Add extra credentials in SQL base class - `Encrypt` and `TrustServerCertificate` (#1095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Changed possible options for `if_exists` in the `create_table` * 🔥 remove unused code * 🎨 Add append to previous literal * 🔥 revert changes * 🔖 Release viadot `2.1.24` --------- Co-authored-by: angelika233 --- pyproject.toml | 2 +- src/viadot/sources/base.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20e403ac7..62cedba52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "viadot2" -version = "2.1.23" +version = "2.1.24" description = "A simple data ingestion library to guide data flows from some places to other places." authors = [ { name = "acivitillo", email = "acivitillo@dyvenia.com" }, diff --git a/src/viadot/sources/base.py b/src/viadot/sources/base.py index 05443a6fa..4c021ec98 100644 --- a/src/viadot/sources/base.py +++ b/src/viadot/sources/base.py @@ -212,6 +212,14 @@ def conn_str(self) -> str: if "authentication" in self.credentials: conn_str += "Authentication=" + self.credentials["authentication"] + ";" + if "trust_server_certificate" in self.credentials: + conn_str += ( + "TrustServerCertificate=" + + self.credentials["trust_server_certificate"] + + ";" + ) + if "encrypt" in self.credentials: + conn_str += "Encrypt=" + self.credentials["encrypt"] + ";" return conn_str @property