dbt-common 1.0.0b2__py3-none-any.whl → 1.0.1__py3-none-any.whl
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.
- dbt_common/__about__.py +1 -1
- dbt_common/constants.py +5 -0
- dbt_common/context.py +7 -2
- dbt_common/ui.py +4 -0
- {dbt_common-1.0.0b2.dist-info → dbt_common-1.0.1.dist-info}/METADATA +1 -1
- {dbt_common-1.0.0b2.dist-info → dbt_common-1.0.1.dist-info}/RECORD +8 -8
- {dbt_common-1.0.0b2.dist-info → dbt_common-1.0.1.dist-info}/WHEEL +1 -1
- {dbt_common-1.0.0b2.dist-info → dbt_common-1.0.1.dist-info}/licenses/LICENSE +0 -0
dbt_common/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = "1.0.
|
1
|
+
version = "1.0.1"
|
dbt_common/constants.py
CHANGED
@@ -1 +1,6 @@
|
|
1
|
+
# Prefix which identifies environment variables which contains secrets.
|
1
2
|
SECRET_ENV_PREFIX = "DBT_ENV_SECRET_"
|
3
|
+
|
4
|
+
# Prefix which identifies environment variables that should not be visible
|
5
|
+
# via macros, flags, or other user-facing mechanisms.
|
6
|
+
PRIVATE_ENV_PREFIX = "DBT_ENV_PRIVATE_"
|
dbt_common/context.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
from contextvars import ContextVar, copy_context
|
2
2
|
from typing import List, Mapping, Optional
|
3
3
|
|
4
|
-
from dbt_common.constants import SECRET_ENV_PREFIX
|
4
|
+
from dbt_common.constants import PRIVATE_ENV_PREFIX, SECRET_ENV_PREFIX
|
5
5
|
|
6
6
|
|
7
7
|
class InvocationContext:
|
8
8
|
def __init__(self, env: Mapping[str, str]):
|
9
|
-
self._env = env
|
9
|
+
self._env = {k: v for k, v in env.items() if not k.startswith(PRIVATE_ENV_PREFIX)}
|
10
10
|
self._env_secrets: Optional[List[str]] = None
|
11
|
+
self._env_private = {k: v for k, v in env.items() if k.startswith(PRIVATE_ENV_PREFIX)}
|
11
12
|
self.recorder = None
|
12
13
|
# This class will also eventually manage the invocation_id, flags, event manager, etc.
|
13
14
|
|
@@ -15,6 +16,10 @@ class InvocationContext:
|
|
15
16
|
def env(self) -> Mapping[str, str]:
|
16
17
|
return self._env
|
17
18
|
|
19
|
+
@property
|
20
|
+
def env_private(self) -> Mapping[str, str]:
|
21
|
+
return self._env_private
|
22
|
+
|
18
23
|
@property
|
19
24
|
def env_secrets(self) -> List[str]:
|
20
25
|
if self._env_secrets is None:
|
dbt_common/ui.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: dbt-common
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.1
|
4
4
|
Summary: The shared common utilities that dbt-core and adapter implementations use
|
5
5
|
Project-URL: Homepage, https://github.com/dbt-labs/dbt-common
|
6
6
|
Project-URL: Repository, https://github.com/dbt-labs/dbt-common.git
|
@@ -1,7 +1,7 @@
|
|
1
|
-
dbt_common/__about__.py,sha256=
|
1
|
+
dbt_common/__about__.py,sha256=_ZEXZ9OcLtIJ-gPvOkMv1OKAzml7W1MzZe1jHAUZeBE,18
|
2
2
|
dbt_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
dbt_common/constants.py,sha256=
|
4
|
-
dbt_common/context.py,sha256=
|
3
|
+
dbt_common/constants.py,sha256=YCCsXl2fBwzh7zqvLg22PhfQQF9TUqHjmvuTbdK62wE,280
|
4
|
+
dbt_common/context.py,sha256=BhgT7IgyvpZHEtIdFVVuBBBX5LuU7obXT7NvIPeuD2g,1760
|
5
5
|
dbt_common/dataclass_schema.py,sha256=R8YBju2Z-qRfy5eJa-jYWedS43rXk9P6E9ttofFc9xU,5282
|
6
6
|
dbt_common/helper_types.py,sha256=jW5Yv0Gwx4M14IEX4RID7k4s0hJiKHIzU8CxACQ1Y7k,3491
|
7
7
|
dbt_common/invocation.py,sha256=Zw8jRPn75oi2VrUD6qGvaCDtSyIfqm5pJlPpRjs3s1E,202
|
@@ -9,7 +9,7 @@ dbt_common/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
dbt_common/record.py,sha256=bQ_1fC5qp_RlQxLXq_wHYl5G37BvkzE0d_F2F39PDUA,7015
|
10
10
|
dbt_common/semver.py,sha256=2zoZYCQ7PfswqslT2NHuMGgPGMuMuX-yRThVoqfDWQU,13954
|
11
11
|
dbt_common/tests.py,sha256=6lC_JuRtoYO6cbAF8-R5aTM4HtQiM_EH8X5m_97duGY,315
|
12
|
-
dbt_common/ui.py,sha256=
|
12
|
+
dbt_common/ui.py,sha256=rc2TEM29raBFc_LXcg901pMDD07C2ohwp9qzkE-7pBY,2567
|
13
13
|
dbt_common/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
14
|
dbt_common/clients/_jinja_blocks.py,sha256=xoJK9Y0F93U2PKfT_3SJbBopCGYCtl7LiwKuylXnrEE,12947
|
15
15
|
dbt_common/clients/agate_helper.py,sha256=n5Q0_gJPbBhFvjd286NGYGlcTtdEExYmIT3968lppyg,9124
|
@@ -55,7 +55,7 @@ dbt_common/utils/encoding.py,sha256=6_kSY2FvGNYMg7oX7PrbvVioieydih3Kl7Ii802LaHI,
|
|
55
55
|
dbt_common/utils/executor.py,sha256=Zyzd1wML3aN-iYn9ZG2Gc_jj5vknmvQNyH-c0RaPIpo,2446
|
56
56
|
dbt_common/utils/formatting.py,sha256=JUn5rzJ-uajs9wPCN0-f2iRFY1pOJF5YjTD9dERuLoc,165
|
57
57
|
dbt_common/utils/jinja.py,sha256=XNfZHuZhLM_R_yPmzYojPm6bF7QOoxIjSWrkJRw6wks,965
|
58
|
-
dbt_common-1.0.
|
59
|
-
dbt_common-1.0.
|
60
|
-
dbt_common-1.0.
|
61
|
-
dbt_common-1.0.
|
58
|
+
dbt_common-1.0.1.dist-info/METADATA,sha256=qyr7n4d7PzsGe1p2WGd3iuDVkQ6qqieDHR_er_aVa2k,5219
|
59
|
+
dbt_common-1.0.1.dist-info/WHEEL,sha256=as-1oFTWSeWBgyzh0O_qF439xqBe6AbBgt4MfYe5zwY,87
|
60
|
+
dbt_common-1.0.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
61
|
+
dbt_common-1.0.1.dist-info/RECORD,,
|
File without changes
|