mdbt 0.4.27__tar.gz → 0.4.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mdbt-0.4.27 → mdbt-0.4.28}/PKG-INFO +1 -1
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/core.py +22 -11
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt.egg-info/PKG-INFO +1 -1
- {mdbt-0.4.27 → mdbt-0.4.28}/setup.py +1 -1
- {mdbt-0.4.27 → mdbt-0.4.28}/LICENSE +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/README.md +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/__init__.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/ai_core.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/build_dbt_docs_ai.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/build_unit_test_data_ai.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/cmdline.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/expectations_output_builder.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/lightdash.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/main.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/precommit_format.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/prompts.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/recce.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/sort_yaml_fields.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt/sql_sorter.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt.egg-info/SOURCES.txt +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt.egg-info/dependency_links.txt +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt.egg-info/entry_points.txt +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt.egg-info/requires.txt +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/mdbt.egg-info/top_level.txt +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/setup.cfg +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/tests/test_main.py +0 -0
- {mdbt-0.4.27 → mdbt-0.4.28}/tests/test_sort_yaml_fields.py +0 -0
|
@@ -5,6 +5,8 @@ import subprocess
|
|
|
5
5
|
import sys
|
|
6
6
|
import typing as t
|
|
7
7
|
|
|
8
|
+
from cryptography.hazmat.backends import default_backend
|
|
9
|
+
from cryptography.hazmat.primitives import serialization
|
|
8
10
|
import snowflake.connector as snow
|
|
9
11
|
from dotenv import find_dotenv
|
|
10
12
|
from dotenv import load_dotenv
|
|
@@ -27,18 +29,27 @@ class Core:
|
|
|
27
29
|
self.dbt_execute_command_output = ""
|
|
28
30
|
|
|
29
31
|
def _create_snowflake_connection(self):
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
rsa_key_str = os.environ.get('MAIN__RSA_KEY')
|
|
33
|
+
if not rsa_key_str:
|
|
34
|
+
raise ValueError('MAIN__RSA_KEY environment variable not set')
|
|
35
|
+
# The RSA key from the environment variable may be in single line or multi-line string
|
|
36
|
+
if '\\n' in rsa_key_str:
|
|
37
|
+
rsa_key_str = rsa_key_str.replace('\\n', '\n')
|
|
38
|
+
rsa_key_bytes = rsa_key_str.encode()
|
|
39
|
+
# Load private key object
|
|
40
|
+
private_key = serialization.load_pem_private_key(
|
|
41
|
+
rsa_key_bytes,
|
|
42
|
+
password=None,
|
|
43
|
+
backend=default_backend(),
|
|
44
|
+
)
|
|
34
45
|
self._conn = snow.connect(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
role=os.
|
|
46
|
+
user=os.getenv('MAIN__USER'),
|
|
47
|
+
account=os.getenv('MAIN__ACCOUNT'),
|
|
48
|
+
database=os.getenv('MAIN__DATABASE'),
|
|
49
|
+
private_key=private_key,
|
|
50
|
+
schema=os.getenv('MAIN__SCHEMA'),
|
|
51
|
+
warehouse=os.getenv('MAIN__WAREHOUSE'),
|
|
52
|
+
role=os.getenv('MAIN__ROLE'),
|
|
42
53
|
)
|
|
43
54
|
|
|
44
55
|
self._cur = self._conn.cursor()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|