Skip to content

Commit

Permalink
Add extra credentials in SQL base class - Encrypt and `TrustServerC…
Browse files Browse the repository at this point in the history
…ertificate` (#1095)

* 🐛 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 <[email protected]>
  • Loading branch information
angelika233 and angelika233 authored Oct 22, 2024
1 parent 142f528 commit 7fe5e53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]" },
Expand Down
8 changes: 8 additions & 0 deletions src/viadot/sources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fe5e53

Please sign in to comment.