recce-nightly 1.10.0.20250625__py3-none-any.whl → 1.30.0.20251221__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.
Potentially problematic release.
This version of recce-nightly might be problematic. Click here for more details.
- recce/VERSION +1 -1
- recce/__init__.py +5 -0
- recce/adapter/dbt_adapter/__init__.py +343 -245
- recce/apis/check_api.py +20 -14
- recce/apis/check_events_api.py +353 -0
- recce/apis/check_func.py +5 -5
- recce/apis/run_func.py +32 -3
- recce/artifact.py +76 -3
- recce/cli.py +705 -82
- recce/config.py +2 -2
- recce/connect_to_cloud.py +1 -1
- recce/core.py +3 -3
- recce/data/404/index.html +2 -0
- recce/data/404.html +2 -22
- recce/data/__next.@lineage.!KHNsb3Qp.__PAGE__.txt +7 -0
- recce/data/__next.@lineage.!KHNsb3Qp.txt +4 -0
- recce/data/__next.__PAGE__.txt +6 -0
- recce/data/__next._full.txt +32 -0
- recce/data/__next._head.txt +8 -0
- recce/data/__next._index.txt +14 -0
- recce/data/__next._tree.txt +8 -0
- recce/data/_next/static/chunks/025a7e3e3f9f40ae.js +1 -0
- recce/data/_next/static/chunks/0ce56d67ef5779ca.js +4 -0
- recce/data/_next/static/chunks/1a6a78780155dac7.js +48 -0
- recce/data/_next/static/chunks/1de8485918b9182a.css +2 -0
- recce/data/_next/static/chunks/1e4b1b50d1e34993.js +1 -0
- recce/data/_next/static/chunks/206d5d181e4c738e.js +1 -0
- recce/data/_next/static/chunks/2c357efc34c5b859.js +25 -0
- recce/data/_next/static/chunks/2e9d95d2d48c479c.js +1 -0
- recce/data/_next/static/chunks/2f016dc4a3edad2e.js +2 -0
- recce/data/_next/static/chunks/313251962d698f7c.js +1 -0
- recce/data/_next/static/chunks/3a9f021f38eb5574.css +1 -0
- recce/data/_next/static/chunks/40079da8d2b8f651.js +1 -0
- recce/data/_next/static/chunks/4599182bffb64661.js +38 -0
- recce/data/_next/static/chunks/4e62f6e184173580.js +1 -0
- recce/data/_next/static/chunks/5c4dfb0d09eaa401.js +1 -0
- recce/data/_next/static/chunks/69e4f06ccfdfc3ac.js +1 -0
- recce/data/_next/static/chunks/6b206cb4707d6bee.js +1 -0
- recce/data/_next/static/chunks/6d8557f062aa4386.css +1 -0
- recce/data/_next/static/chunks/7fbe3650bd83b6b5.js +1 -0
- recce/data/_next/static/chunks/83fa823a825674f6.js +1 -0
- recce/data/_next/static/chunks/848a6c9b5f55f7ed.js +1 -0
- recce/data/_next/static/chunks/859462b0858aef88.css +2 -0
- recce/data/_next/static/chunks/923964f18c87d0f1.css +1 -0
- recce/data/_next/static/chunks/939390f911895d7c.js +48 -0
- recce/data/_next/static/chunks/99a9817237a07f43.js +1 -0
- recce/data/_next/static/chunks/9fed8b4b2b924054.js +5 -0
- recce/data/_next/static/chunks/b6949f6c5892110c.js +1 -0
- recce/data/_next/static/chunks/b851a1d3f8149828.js +1 -0
- recce/data/_next/static/chunks/c734f9ad957de0b4.js +1 -0
- recce/data/_next/static/chunks/cdde321b0ec75717.js +2 -0
- recce/data/_next/static/chunks/d0f91117d77ff844.css +1 -0
- recce/data/_next/static/chunks/d6c8667911c2500f.js +1 -0
- recce/data/_next/static/chunks/da8dab68c02752cf.js +74 -0
- recce/data/_next/static/chunks/dc074049c9d12d97.js +109 -0
- recce/data/_next/static/chunks/ee7f1a8227342421.js +1 -0
- recce/data/_next/static/chunks/fa2f4e56c2fccc73.js +1 -0
- recce/data/_next/static/chunks/turbopack-1fad664f62979b93.js +3 -0
- recce/data/_next/static/media/favicon.a8d38d84.ico +0 -0
- recce/data/_next/static/media/montserrat-cyrillic-800-normal.d80d830d.woff2 +0 -0
- recce/data/_next/static/media/{montserrat-cyrillic-800-normal.bd5c9f50.woff → montserrat-cyrillic-800-normal.f9d58125.woff} +0 -0
- recce/data/_next/static/media/montserrat-cyrillic-ext-800-normal.076c2a93.woff2 +0 -0
- recce/data/_next/static/media/montserrat-latin-800-normal.cde454cc.woff2 +0 -0
- recce/data/_next/static/media/{montserrat-latin-800-normal.fc315020.woff → montserrat-latin-800-normal.d5761935.woff} +0 -0
- recce/data/_next/static/media/montserrat-latin-ext-800-normal.40ec0659.woff2 +0 -0
- recce/data/_next/static/media/{montserrat-latin-ext-800-normal.2e5381b2.woff → montserrat-latin-ext-800-normal.b671449b.woff} +0 -0
- recce/data/_next/static/media/{montserrat-vietnamese-800-normal.20c545e6.woff → montserrat-vietnamese-800-normal.9f7b8541.woff} +0 -0
- recce/data/_next/static/media/montserrat-vietnamese-800-normal.f9eb854e.woff2 +0 -0
- recce/data/_next/static/nX-Uz0AH6Tc6hIQUFGqaB/_buildManifest.js +11 -0
- recce/data/_next/static/nX-Uz0AH6Tc6hIQUFGqaB/_clientMiddlewareManifest.json +1 -0
- recce/data/_not-found/__next._full.txt +24 -0
- recce/data/_not-found/__next._head.txt +8 -0
- recce/data/_not-found/__next._index.txt +13 -0
- recce/data/_not-found/__next._not-found.__PAGE__.txt +5 -0
- recce/data/_not-found/__next._not-found.txt +4 -0
- recce/data/_not-found/__next._tree.txt +6 -0
- recce/data/_not-found/index.html +2 -0
- recce/data/_not-found/index.txt +24 -0
- recce/data/auth_callback.html +1 -1
- recce/data/checks/__next.@lineage.__DEFAULT__.txt +7 -0
- recce/data/checks/__next._full.txt +39 -0
- recce/data/checks/__next._head.txt +8 -0
- recce/data/checks/__next._index.txt +14 -0
- recce/data/checks/__next._tree.txt +8 -0
- recce/data/checks/__next.checks.__PAGE__.txt +10 -0
- recce/data/checks/__next.checks.txt +4 -0
- recce/data/checks/index.html +2 -0
- recce/data/checks/index.txt +39 -0
- recce/data/index.html +2 -27
- recce/data/index.txt +32 -8
- recce/data/lineage/__next.@lineage.__DEFAULT__.txt +7 -0
- recce/data/lineage/__next._full.txt +39 -0
- recce/data/lineage/__next._head.txt +8 -0
- recce/data/lineage/__next._index.txt +14 -0
- recce/data/lineage/__next._tree.txt +8 -0
- recce/data/lineage/__next.lineage.__PAGE__.txt +10 -0
- recce/data/lineage/__next.lineage.txt +4 -0
- recce/data/lineage/index.html +2 -0
- recce/data/lineage/index.txt +39 -0
- recce/data/query/__next.@lineage.__DEFAULT__.txt +7 -0
- recce/data/query/__next._full.txt +37 -0
- recce/data/query/__next._head.txt +8 -0
- recce/data/query/__next._index.txt +14 -0
- recce/data/query/__next._tree.txt +8 -0
- recce/data/query/__next.query.__PAGE__.txt +9 -0
- recce/data/query/__next.query.txt +4 -0
- recce/data/query/index.html +2 -0
- recce/data/query/index.txt +37 -0
- recce/event/CONFIG.bak +1 -0
- recce/event/__init__.py +9 -8
- recce/event/collector.py +6 -2
- recce/event/track.py +10 -0
- recce/github.py +1 -1
- recce/mcp_server.py +725 -0
- recce/models/check.py +433 -15
- recce/models/types.py +61 -2
- recce/pull_request.py +1 -1
- recce/run.py +37 -17
- recce/server.py +216 -21
- recce/state/__init__.py +31 -0
- recce/state/cloud.py +644 -0
- recce/state/const.py +26 -0
- recce/state/local.py +56 -0
- recce/state/state.py +119 -0
- recce/state/state_loader.py +174 -0
- recce/summary.py +25 -3
- recce/tasks/dataframe.py +63 -1
- recce/tasks/query.py +40 -3
- recce/tasks/rowcount.py +4 -1
- recce/tasks/schema.py +4 -1
- recce/tasks/utils.py +147 -0
- recce/tasks/valuediff.py +85 -57
- recce/util/api_token.py +11 -2
- recce/util/breaking.py +10 -1
- recce/util/cll.py +1 -2
- recce/util/cloud/__init__.py +15 -0
- recce/util/cloud/base.py +115 -0
- recce/util/cloud/check_events.py +190 -0
- recce/util/cloud/checks.py +242 -0
- recce/util/io.py +2 -2
- recce/util/lineage.py +19 -18
- recce/util/perf_tracking.py +85 -0
- recce/util/recce_cloud.py +254 -5
- recce/util/startup_perf.py +121 -0
- recce/yaml/__init__.py +2 -2
- {recce_nightly-1.10.0.20250625.dist-info → recce_nightly-1.30.0.20251221.dist-info}/METADATA +91 -71
- recce_nightly-1.30.0.20251221.dist-info/RECORD +183 -0
- {recce_nightly-1.10.0.20250625.dist-info → recce_nightly-1.30.0.20251221.dist-info}/WHEEL +1 -2
- recce/data/_next/static/abCX3x3UoIdRLEDWxx4xd/_buildManifest.js +0 -1
- recce/data/_next/static/chunks/181-acc61ddada3bc0ca.js +0 -43
- recce/data/_next/static/chunks/1bff33f1-1ef85cf5e658a751.js +0 -1
- recce/data/_next/static/chunks/217-879a84d70f7a907c.js +0 -2
- recce/data/_next/static/chunks/29e3cc0d-60045b2e47aa3916.js +0 -1
- recce/data/_next/static/chunks/36e1c10d-8e7be4a6c1f6ab2d.js +0 -1
- recce/data/_next/static/chunks/3998a672-03adacad07b346ac.js +0 -1
- recce/data/_next/static/chunks/3a92ee20-1081c360214f9602.js +0 -1
- recce/data/_next/static/chunks/42-cd3c06533f5fd47c.js +0 -9
- recce/data/_next/static/chunks/450c323b-fd94e7ffaa4a5efa.js +0 -1
- recce/data/_next/static/chunks/47d8844f-929aed9b1c73a905.js +0 -1
- recce/data/_next/static/chunks/608-3b079b544e5d5f5e.js +0 -15
- recce/data/_next/static/chunks/6dc81886-adbfa45836061d79.js +0 -1
- recce/data/_next/static/chunks/7a8a3e83-edf6dc64b5d5f0a5.js +0 -1
- recce/data/_next/static/chunks/7f27ae6c-d5f0438edd5c2a5b.js +0 -1
- recce/data/_next/static/chunks/86730205-cfb14e3f051bab35.js +0 -1
- recce/data/_next/static/chunks/8d700b6a.8bb140898499c512.js +0 -1
- recce/data/_next/static/chunks/92-607cd1af83c41f43.js +0 -1
- recce/data/_next/static/chunks/9746af58-a42b7d169cacadf0.js +0 -1
- recce/data/_next/static/chunks/a30376cd-de84559016d7e133.js +0 -1
- recce/data/_next/static/chunks/app/_not-found/page-01ed58b7f971d311.js +0 -1
- recce/data/_next/static/chunks/app/layout-177a410a97e0d018.js +0 -1
- recce/data/_next/static/chunks/app/page-da6e046a8235dbfc.js +0 -1
- recce/data/_next/static/chunks/b63b1b3f-4282bdcf459e075c.js +0 -1
- recce/data/_next/static/chunks/bbda5537-9ec25eb1dd62348a.js +0 -1
- recce/data/_next/static/chunks/c132bf7d-08cb668a789d6afd.js +0 -1
- recce/data/_next/static/chunks/ce84277d-2e5d1d46910cf052.js +0 -1
- recce/data/_next/static/chunks/febdd86e-c6b525341634b860.js +0 -54
- recce/data/_next/static/chunks/fee69bc6-2dbccaf9b90474e6.js +0 -1
- recce/data/_next/static/chunks/framework-ded83d71b51ce901.js +0 -1
- recce/data/_next/static/chunks/main-app-39061b0166c47f55.js +0 -1
- recce/data/_next/static/chunks/main-b5b3ae20a1405261.js +0 -1
- recce/data/_next/static/chunks/pages/_app-437c455677d62394.js +0 -1
- recce/data/_next/static/chunks/pages/_error-e7650df18ca04bde.js +0 -1
- recce/data/_next/static/chunks/webpack-7b49d5ba7e3a434d.js +0 -1
- recce/data/_next/static/css/17a96168e3a9db13.css +0 -1
- recce/data/_next/static/css/1b121dc4d36aeb4d.css +0 -3
- recce/data/_next/static/css/35c6679a098e1e34.css +0 -1
- recce/data/_next/static/css/951e2e0eea2d4a5b.css +0 -14
- recce/data/_next/static/media/montserrat-cyrillic-800-normal.22628180.woff2 +0 -0
- recce/data/_next/static/media/montserrat-cyrillic-ext-800-normal.94a63aea.woff2 +0 -0
- recce/data/_next/static/media/montserrat-latin-800-normal.6f8fa298.woff2 +0 -0
- recce/data/_next/static/media/montserrat-latin-ext-800-normal.013b84f9.woff2 +0 -0
- recce/data/_next/static/media/montserrat-vietnamese-800-normal.c0035377.woff2 +0 -0
- recce/data/_next/static/media/reload-image.79aabb7d.svg +0 -4
- recce/state.py +0 -786
- recce_nightly-1.10.0.20250625.dist-info/RECORD +0 -154
- recce_nightly-1.10.0.20250625.dist-info/top_level.txt +0 -2
- tests/__init__.py +0 -0
- tests/adapter/__init__.py +0 -0
- tests/adapter/dbt_adapter/__init__.py +0 -0
- tests/adapter/dbt_adapter/conftest.py +0 -17
- tests/adapter/dbt_adapter/dbt_test_helper.py +0 -298
- tests/adapter/dbt_adapter/test_dbt_adapter.py +0 -25
- tests/adapter/dbt_adapter/test_dbt_cll.py +0 -384
- tests/adapter/dbt_adapter/test_selector.py +0 -202
- tests/tasks/__init__.py +0 -0
- tests/tasks/conftest.py +0 -4
- tests/tasks/test_histogram.py +0 -129
- tests/tasks/test_lineage.py +0 -55
- tests/tasks/test_preset_checks.py +0 -64
- tests/tasks/test_profile.py +0 -397
- tests/tasks/test_query.py +0 -151
- tests/tasks/test_row_count.py +0 -135
- tests/tasks/test_schema.py +0 -122
- tests/tasks/test_top_k.py +0 -77
- tests/tasks/test_valuediff.py +0 -85
- tests/test_cli.py +0 -133
- tests/test_config.py +0 -43
- tests/test_connect_to_cloud.py +0 -82
- tests/test_core.py +0 -29
- tests/test_dbt.py +0 -36
- tests/test_pull_request.py +0 -130
- tests/test_server.py +0 -104
- tests/test_state.py +0 -134
- tests/test_summary.py +0 -65
- /recce/data/_next/static/chunks/{polyfills-42372ed130431b0a.js → a6dad97d9634a72d.js} +0 -0
- /recce/data/_next/static/media/{montserrat-cyrillic-ext-800-normal.e6e0d8d0.woff → montserrat-cyrillic-ext-800-normal.a4fa76b5.woff} +0 -0
- /recce/data/_next/static/{abCX3x3UoIdRLEDWxx4xd → nX-Uz0AH6Tc6hIQUFGqaB}/_ssgManifest.js +0 -0
- {recce_nightly-1.10.0.20250625.dist-info → recce_nightly-1.30.0.20251221.dist-info}/entry_points.txt +0 -0
- {recce_nightly-1.10.0.20250625.dist-info → recce_nightly-1.30.0.20251221.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
from recce.adapter.dbt_adapter import DbtAdapter
|
|
2
|
-
from recce.models.types import CllData
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def assert_column(result: CllData, node_name, column_name, transformation_type, depends_on):
|
|
6
|
-
column_id = f"{node_name}_{column_name}"
|
|
7
|
-
entry = result.columns.get(column_id)
|
|
8
|
-
assert entry is not None, f"Column {column_id} not found in result"
|
|
9
|
-
assert (
|
|
10
|
-
entry.transformation_type == transformation_type
|
|
11
|
-
), f"Column {column_name} type mismatch: expected {transformation_type}, got {entry.transformation_type}"
|
|
12
|
-
parents = result.parent_map.get(column_id)
|
|
13
|
-
|
|
14
|
-
assert len(parents) == len(depends_on), "depends_on length mismatch"
|
|
15
|
-
for i in range(len(depends_on)):
|
|
16
|
-
node, column = depends_on[i]
|
|
17
|
-
parent_column_id = f"{node}_{column}"
|
|
18
|
-
|
|
19
|
-
assert parent_column_id in parents, f"Column {parent_column_id} not found in {column_id}'s parent list"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def assert_model(result: CllData, node_name, depends_on):
|
|
23
|
-
assert result.nodes.get(node_name) is not None, f"Node {node_name} not found in result"
|
|
24
|
-
parent_map = result.parent_map.get(node_name)
|
|
25
|
-
assert parent_map is not None, f"Parent map {node_name} not found in result"
|
|
26
|
-
# assert len(parent_map) == len(depends_on), "depends_on length mismatch"
|
|
27
|
-
for i in range(len(depends_on)):
|
|
28
|
-
node, column = depends_on[i]
|
|
29
|
-
column_id = f"{node}_{column}"
|
|
30
|
-
|
|
31
|
-
assert column_id in parent_map, f"Parent map {node_name} does not contain {column_id}"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def test_cll_basic(dbt_test_helper):
|
|
35
|
-
dbt_test_helper.create_model(
|
|
36
|
-
"model1", unique_id="model.model1", curr_sql="select 1 as c", curr_columns={"c": "int"}
|
|
37
|
-
)
|
|
38
|
-
dbt_test_helper.create_model(
|
|
39
|
-
"model2",
|
|
40
|
-
unique_id="model.model2",
|
|
41
|
-
curr_sql='select c from {{ ref("model1") }} where c > 0',
|
|
42
|
-
curr_columns={"c": "int"},
|
|
43
|
-
depends_on=["model.model1"],
|
|
44
|
-
)
|
|
45
|
-
dbt_test_helper.create_model(
|
|
46
|
-
"model3",
|
|
47
|
-
unique_id="model.model3",
|
|
48
|
-
curr_sql='select c from {{ ref("recce_test", "model1") }} where c > 0',
|
|
49
|
-
curr_columns={"c": "int"},
|
|
50
|
-
depends_on=["model.model1"],
|
|
51
|
-
)
|
|
52
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
53
|
-
|
|
54
|
-
result = adapter.get_cll("model.model2", no_filter=True)
|
|
55
|
-
assert_model(result, "model.model2", [("model.model1", "c")])
|
|
56
|
-
assert_column(result, "model.model2", "c", "passthrough", [("model.model1", "c")])
|
|
57
|
-
|
|
58
|
-
result = adapter.get_cll("model.model3", no_filter=True)
|
|
59
|
-
assert_model(result, "model.model3", [("model.model1", "c")])
|
|
60
|
-
assert_column(result, "model.model3", "c", "passthrough", [("model.model1", "c")])
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def test_cll_table_alisa(dbt_test_helper):
|
|
64
|
-
def patch_node(node):
|
|
65
|
-
node["alias"] = "model1_alias"
|
|
66
|
-
|
|
67
|
-
dbt_test_helper.create_model(
|
|
68
|
-
"model1", unique_id="model.model1", curr_sql="select 1 as c", curr_columns={"c": "int"}, patch_func=patch_node
|
|
69
|
-
)
|
|
70
|
-
dbt_test_helper.create_model(
|
|
71
|
-
"model2",
|
|
72
|
-
unique_id="model.model2",
|
|
73
|
-
curr_sql='select c from {{ ref("model1") }}',
|
|
74
|
-
curr_columns={"c": "int"},
|
|
75
|
-
depends_on=["model.model1"],
|
|
76
|
-
)
|
|
77
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
78
|
-
result = adapter.get_cll("model.model1", no_filter=True)
|
|
79
|
-
assert_column(result, "model.model2", "c", "passthrough", [("model.model1", "c")])
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def test_seed(dbt_test_helper):
|
|
83
|
-
csv_data_curr = """
|
|
84
|
-
customer_id,name,age
|
|
85
|
-
1,Alice,30
|
|
86
|
-
2,Bob,25
|
|
87
|
-
3,Charlie,35
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
dbt_test_helper.create_model(
|
|
91
|
-
"seed1",
|
|
92
|
-
unique_id="seed.seed1",
|
|
93
|
-
curr_csv=csv_data_curr,
|
|
94
|
-
curr_columns={"customer_id": "varchar", "name": "varchar", "age": "int"},
|
|
95
|
-
resource_type="seed",
|
|
96
|
-
)
|
|
97
|
-
dbt_test_helper.create_model(
|
|
98
|
-
"model1",
|
|
99
|
-
unique_id="model.model1",
|
|
100
|
-
curr_sql='select customer_id from {{ ref("seed1") }} where age > 0',
|
|
101
|
-
curr_columns={"customer_id": "varchar"},
|
|
102
|
-
depends_on=["seed.seed1"],
|
|
103
|
-
)
|
|
104
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
105
|
-
|
|
106
|
-
result = adapter.get_cll("model.model1", no_filter=True)
|
|
107
|
-
assert_model(result, "seed.seed1", [])
|
|
108
|
-
assert_column(result, "seed.seed1", "customer_id", "source", [])
|
|
109
|
-
assert_model(result, "model.model1", [("seed.seed1", "age")])
|
|
110
|
-
assert_column(result, "model.model1", "customer_id", "passthrough", [("seed.seed1", "customer_id")])
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
def test_python_model(dbt_test_helper):
|
|
114
|
-
def python_node(node):
|
|
115
|
-
node["language"] = "python"
|
|
116
|
-
|
|
117
|
-
csv_data_curr = """
|
|
118
|
-
customer_id,name,age
|
|
119
|
-
1,Alice,30
|
|
120
|
-
2,Bob,25
|
|
121
|
-
3,Charlie,35
|
|
122
|
-
"""
|
|
123
|
-
dbt_test_helper.create_model(
|
|
124
|
-
"model1", curr_csv=csv_data_curr, curr_columns={"customer_id": "varchar", "name": "varchar", "age": "int"}
|
|
125
|
-
)
|
|
126
|
-
dbt_test_helper.create_model(
|
|
127
|
-
"model2",
|
|
128
|
-
curr_csv=csv_data_curr,
|
|
129
|
-
curr_columns={"customer_id": "varchar", "name": "varchar", "age": "int"},
|
|
130
|
-
depends_on=["model1"],
|
|
131
|
-
patch_func=python_node,
|
|
132
|
-
)
|
|
133
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
134
|
-
assert not adapter.is_python_model("model1")
|
|
135
|
-
assert adapter.is_python_model("model2")
|
|
136
|
-
|
|
137
|
-
result = adapter.get_cll("model1", no_filter=True)
|
|
138
|
-
assert_column(result, "model2", "customer_id", "unknown", [])
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
def test_source(dbt_test_helper):
|
|
142
|
-
csv_data_curr = """
|
|
143
|
-
customer_id,name,age
|
|
144
|
-
1,Alice,30
|
|
145
|
-
2,Bob,25
|
|
146
|
-
3,Charlie,35
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
dbt_test_helper.create_source(
|
|
150
|
-
"source1",
|
|
151
|
-
"table1",
|
|
152
|
-
unique_id="source.source1.table1",
|
|
153
|
-
curr_csv=csv_data_curr,
|
|
154
|
-
curr_columns={"customer_id": "varchar", "name": "varchar", "age": "int"},
|
|
155
|
-
)
|
|
156
|
-
dbt_test_helper.create_model(
|
|
157
|
-
"model1",
|
|
158
|
-
unique_id="model.model1",
|
|
159
|
-
curr_sql='select customer_id from {{ source("source1", "table1") }}',
|
|
160
|
-
curr_columns={"customer_id": "int"},
|
|
161
|
-
depends_on=["source.source1.table1"],
|
|
162
|
-
)
|
|
163
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
164
|
-
result = adapter.get_cll("source.source1.table1", no_filter=True)
|
|
165
|
-
assert_column(result, "source.source1.table1", "customer_id", "source", [])
|
|
166
|
-
result = adapter.get_cll("model.model1", no_filter=True)
|
|
167
|
-
assert_column(result, "model.model1", "customer_id", "passthrough", [("source.source1.table1", "customer_id")])
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
def test_parse_error(dbt_test_helper):
|
|
171
|
-
dbt_test_helper.create_model("model1", curr_sql="select 1 as c", curr_columns={"c": "int"})
|
|
172
|
-
dbt_test_helper.create_model("model2", curr_sql="this is not a valid sql", curr_columns={"c": "int"})
|
|
173
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
174
|
-
result = adapter.get_cll("model2", no_filter=True)
|
|
175
|
-
assert_column(result, "model2", "c", "unknown", [])
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
def test_model_without_catalog(dbt_test_helper):
|
|
179
|
-
dbt_test_helper.create_model("model1", curr_sql="select 1 as c")
|
|
180
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
181
|
-
result = adapter.get_cll("model1", no_filter=True)
|
|
182
|
-
assert not result.nodes["model1"].columns
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
def assert_lineage_model(cll_data: CllData, nodes):
|
|
186
|
-
assert len(nodes) == len(cll_data.nodes), "Model count mismatch"
|
|
187
|
-
for node in nodes:
|
|
188
|
-
assert node in cll_data.nodes, f"Model {node} not found in lineage"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
def assert_lineage_column(cll_data: CllData, columns):
|
|
192
|
-
assert len(columns) == len(cll_data.columns), "Column count mismatch"
|
|
193
|
-
for column in columns:
|
|
194
|
-
column_key = f"{column[0]}_{column[1]}"
|
|
195
|
-
assert column_key in cll_data.columns, f"Column {column} not found in lineage"
|
|
196
|
-
assert column[0] == cll_data.columns[column_key].table_id, f"Column {column[0]} node mismatch"
|
|
197
|
-
assert column[1] == cll_data.columns[column_key].name, f"Column {column[1]} name mismatch"
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
def test_cll_column_filter(dbt_test_helper):
|
|
201
|
-
dbt_test_helper.create_model(
|
|
202
|
-
"model1", unique_id="model.model1", curr_sql="select 1 as c", curr_columns={"c": "int"}
|
|
203
|
-
)
|
|
204
|
-
dbt_test_helper.create_model(
|
|
205
|
-
"model2",
|
|
206
|
-
unique_id="model.model2",
|
|
207
|
-
curr_sql='select c, 2025 as y from {{ ref("model1") }}',
|
|
208
|
-
curr_columns={"c": "int", "y": "int"},
|
|
209
|
-
depends_on=["model.model1"],
|
|
210
|
-
)
|
|
211
|
-
dbt_test_helper.create_model(
|
|
212
|
-
"model3",
|
|
213
|
-
unique_id="model.model3",
|
|
214
|
-
curr_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
215
|
-
curr_columns={"c": "int"},
|
|
216
|
-
depends_on=["model.model2"],
|
|
217
|
-
)
|
|
218
|
-
dbt_test_helper.create_model(
|
|
219
|
-
"model4",
|
|
220
|
-
unique_id="model.model4",
|
|
221
|
-
curr_sql='select y from {{ ref("model2") }}',
|
|
222
|
-
curr_columns={"y": "int"},
|
|
223
|
-
depends_on=["model.model2"],
|
|
224
|
-
)
|
|
225
|
-
|
|
226
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
227
|
-
|
|
228
|
-
result = adapter.get_cll("model.model2", "c")
|
|
229
|
-
assert_lineage_model(result, [])
|
|
230
|
-
assert_lineage_column(result, [("model.model1", "c"), ("model.model2", "c"), ("model.model3", "c")])
|
|
231
|
-
|
|
232
|
-
result = adapter.get_cll("model.model2", "y")
|
|
233
|
-
assert_lineage_model(result, ["model.model3"])
|
|
234
|
-
assert_lineage_column(result, [("model.model2", "y"), ("model.model4", "y")])
|
|
235
|
-
|
|
236
|
-
result = adapter.get_cll("model.model3", "c")
|
|
237
|
-
assert_lineage_model(result, [])
|
|
238
|
-
assert_lineage_column(result, [("model.model1", "c"), ("model.model2", "c"), ("model.model3", "c")])
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
def test_impact_radius_nodes(dbt_test_helper):
|
|
242
|
-
# non-breaking
|
|
243
|
-
dbt_test_helper.create_model(
|
|
244
|
-
"model1",
|
|
245
|
-
unique_id="model.model1",
|
|
246
|
-
curr_sql="select 1 as c",
|
|
247
|
-
base_sql="select 1 as c --- non-breaking",
|
|
248
|
-
curr_columns={"c": "int"},
|
|
249
|
-
base_columns={"c": "int"},
|
|
250
|
-
)
|
|
251
|
-
# breaking
|
|
252
|
-
dbt_test_helper.create_model(
|
|
253
|
-
"model2",
|
|
254
|
-
unique_id="model.model2",
|
|
255
|
-
curr_sql='select c, 2025 as y from {{ ref("model1") }}',
|
|
256
|
-
base_sql='select c, 2025 as y from {{ ref("model1") }} where c > 0 --- breaking',
|
|
257
|
-
curr_columns={"c": "int", "y": "int"},
|
|
258
|
-
base_columns={"c": "int", "y": "int"},
|
|
259
|
-
depends_on=["model.model1"],
|
|
260
|
-
)
|
|
261
|
-
dbt_test_helper.create_model(
|
|
262
|
-
"model3",
|
|
263
|
-
unique_id="model.model3",
|
|
264
|
-
curr_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
265
|
-
base_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
266
|
-
curr_columns={"c": "int"},
|
|
267
|
-
base_columns={"c": "int"},
|
|
268
|
-
depends_on=["model.model2"],
|
|
269
|
-
)
|
|
270
|
-
dbt_test_helper.create_model(
|
|
271
|
-
"model4",
|
|
272
|
-
unique_id="model.model4",
|
|
273
|
-
curr_sql='select y from {{ ref("model2") }}',
|
|
274
|
-
base_sql='select y from {{ ref("model2") }}',
|
|
275
|
-
curr_columns={"y": "int"},
|
|
276
|
-
base_columns={"y": "int"},
|
|
277
|
-
depends_on=["model.model2"],
|
|
278
|
-
)
|
|
279
|
-
|
|
280
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
281
|
-
|
|
282
|
-
# breaking
|
|
283
|
-
result = adapter.get_impacted_nodes("model.model2")
|
|
284
|
-
assert_lineage_model(result, ["model.model2", "model.model3", "model.model4"])
|
|
285
|
-
|
|
286
|
-
# non-breaking
|
|
287
|
-
result = adapter.get_impacted_nodes("model.model1")
|
|
288
|
-
assert_lineage_model(result, [])
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
def test_impact_radius_columns(dbt_test_helper):
|
|
292
|
-
# added column
|
|
293
|
-
dbt_test_helper.create_model(
|
|
294
|
-
"model1",
|
|
295
|
-
unique_id="model.model1",
|
|
296
|
-
curr_sql="select 1 as c, 2 as d --- add d",
|
|
297
|
-
base_sql="select 1 as c",
|
|
298
|
-
curr_columns={"c": "int", "d": "int"},
|
|
299
|
-
base_columns={"c": "int"},
|
|
300
|
-
)
|
|
301
|
-
# modified column
|
|
302
|
-
dbt_test_helper.create_model(
|
|
303
|
-
"model2",
|
|
304
|
-
unique_id="model.model2",
|
|
305
|
-
curr_sql='select c, 2024 as y from {{ ref("model1") }} --- modify y',
|
|
306
|
-
base_sql='select c, 2025 as y from {{ ref("model1") }}',
|
|
307
|
-
curr_columns={"c": "int", "y": "int"},
|
|
308
|
-
base_columns={"c": "int", "y": "int"},
|
|
309
|
-
depends_on=["model.model1"],
|
|
310
|
-
)
|
|
311
|
-
dbt_test_helper.create_model(
|
|
312
|
-
"model3",
|
|
313
|
-
unique_id="model.model3",
|
|
314
|
-
curr_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
315
|
-
base_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
316
|
-
curr_columns={"c": "int"},
|
|
317
|
-
base_columns={"c": "int"},
|
|
318
|
-
depends_on=["model.model2"],
|
|
319
|
-
)
|
|
320
|
-
dbt_test_helper.create_model(
|
|
321
|
-
"model4",
|
|
322
|
-
unique_id="model.model4",
|
|
323
|
-
curr_sql='select y from {{ ref("model2") }}',
|
|
324
|
-
base_sql='select y from {{ ref("model2") }}',
|
|
325
|
-
curr_columns={"y": "int"},
|
|
326
|
-
base_columns={"y": "int"},
|
|
327
|
-
depends_on=["model.model2"],
|
|
328
|
-
)
|
|
329
|
-
|
|
330
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
331
|
-
|
|
332
|
-
result = adapter.get_impacted_cll("model.model2")
|
|
333
|
-
assert_lineage_model(result, ["model.model3"])
|
|
334
|
-
assert_lineage_column(result, [("model.model2", "y"), ("model.model4", "y")])
|
|
335
|
-
|
|
336
|
-
result = adapter.get_impacted_cll("model.model1")
|
|
337
|
-
assert_lineage_model(result, [])
|
|
338
|
-
assert_lineage_column(result, [("model.model1", "d")])
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
def test_impact_radius(dbt_test_helper):
|
|
342
|
-
# added column
|
|
343
|
-
dbt_test_helper.create_model(
|
|
344
|
-
"model1",
|
|
345
|
-
unique_id="model.model1",
|
|
346
|
-
curr_sql="select 1 as c, 2 as d --- add d",
|
|
347
|
-
base_sql="select 1 as c",
|
|
348
|
-
curr_columns={"c": "int", "d": "int"},
|
|
349
|
-
base_columns={"c": "int"},
|
|
350
|
-
)
|
|
351
|
-
# breaking, added column, modified column
|
|
352
|
-
dbt_test_helper.create_model(
|
|
353
|
-
"model2",
|
|
354
|
-
unique_id="model.model2",
|
|
355
|
-
curr_sql='select c, 2024 as y, d from {{ ref("model1") }} --- modify y, add d',
|
|
356
|
-
base_sql='select c, 2025 as y from {{ ref("model1") }} where c > 0 --- breaking',
|
|
357
|
-
curr_columns={"c": "int", "y": "int", "d": "int"},
|
|
358
|
-
base_columns={"c": "int", "y": "int"},
|
|
359
|
-
depends_on=["model.model1"],
|
|
360
|
-
)
|
|
361
|
-
dbt_test_helper.create_model(
|
|
362
|
-
"model3",
|
|
363
|
-
unique_id="model.model3",
|
|
364
|
-
curr_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
365
|
-
base_sql='select c from {{ ref("model2") }} where y < 2025',
|
|
366
|
-
curr_columns={"c": "int"},
|
|
367
|
-
base_columns={"c": "int"},
|
|
368
|
-
depends_on=["model.model2"],
|
|
369
|
-
)
|
|
370
|
-
dbt_test_helper.create_model(
|
|
371
|
-
"model4",
|
|
372
|
-
unique_id="model.model4",
|
|
373
|
-
curr_sql='select y from {{ ref("model2") }}',
|
|
374
|
-
base_sql='select y from {{ ref("model2") }}',
|
|
375
|
-
curr_columns={"y": "int"},
|
|
376
|
-
base_columns={"y": "int"},
|
|
377
|
-
depends_on=["model.model2"],
|
|
378
|
-
)
|
|
379
|
-
|
|
380
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
381
|
-
|
|
382
|
-
result = adapter.get_impact_radius("model.model2")
|
|
383
|
-
assert_lineage_model(result, ["model.model2", "model.model3", "model.model4"])
|
|
384
|
-
assert_lineage_column(result, [("model.model2", "d"), ("model.model2", "y"), ("model.model4", "y")])
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
from recce.adapter.dbt_adapter import DbtAdapter
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def test_select(dbt_test_helper):
|
|
5
|
-
csv_data_curr = """
|
|
6
|
-
customer_id,name,age
|
|
7
|
-
1,Alice,30
|
|
8
|
-
2,Bob,25
|
|
9
|
-
3,Charlie,35
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
csv_data_base = """
|
|
13
|
-
customer_id,name,age
|
|
14
|
-
1,Alice,35
|
|
15
|
-
2,Bob,25
|
|
16
|
-
3,Charlie,35
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
dbt_test_helper.create_model("customers_1", csv_data_base, csv_data_curr)
|
|
20
|
-
dbt_test_helper.create_model("customers_2", csv_data_base, csv_data_base, depends_on=["customers_1"])
|
|
21
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
22
|
-
|
|
23
|
-
# Test methods
|
|
24
|
-
node_ids = adapter.select_nodes("customers_1")
|
|
25
|
-
assert len(node_ids) == 1
|
|
26
|
-
node_ids = adapter.select_nodes("resource_type:model")
|
|
27
|
-
assert len(node_ids) == 2
|
|
28
|
-
node_ids = adapter.select_nodes("tag:test_tag")
|
|
29
|
-
assert len(node_ids) == 2
|
|
30
|
-
node_ids = adapter.select_nodes("tag:test_tag2")
|
|
31
|
-
assert len(node_ids) == 0
|
|
32
|
-
node_ids = adapter.select_nodes("config.materialized:incremental")
|
|
33
|
-
assert len(node_ids) == 0
|
|
34
|
-
node_ids = adapter.select_nodes("config.materialized:table")
|
|
35
|
-
assert len(node_ids) == 2
|
|
36
|
-
|
|
37
|
-
# Test state method
|
|
38
|
-
node_ids = adapter.select_nodes("state:modified")
|
|
39
|
-
assert len(node_ids) == 1
|
|
40
|
-
|
|
41
|
-
# Test set operation
|
|
42
|
-
node_ids = adapter.select_nodes("customers_1 customers_2")
|
|
43
|
-
assert len(node_ids) == 2
|
|
44
|
-
node_ids = adapter.select_nodes("customers_1,customers_2")
|
|
45
|
-
assert len(node_ids) == 0
|
|
46
|
-
node_ids = adapter.select_nodes("config.materialized:table,tag:test_tag")
|
|
47
|
-
assert len(node_ids) == 2
|
|
48
|
-
node_ids = adapter.select_nodes("config.materialized:table,tag:test_tag2")
|
|
49
|
-
assert len(node_ids) == 0
|
|
50
|
-
node_ids = adapter.select_nodes(exclude="customers_1")
|
|
51
|
-
assert len(node_ids) == 1
|
|
52
|
-
node_ids = adapter.select_nodes("customers_1", exclude="customers_2")
|
|
53
|
-
assert len(node_ids) == 1
|
|
54
|
-
|
|
55
|
-
# Test graph operation
|
|
56
|
-
node_ids = adapter.select_nodes("state:modified+")
|
|
57
|
-
assert len(node_ids) == 2
|
|
58
|
-
node_ids = adapter.select_nodes("+state:modified")
|
|
59
|
-
assert len(node_ids) == 1
|
|
60
|
-
|
|
61
|
-
# Test resource type: snapshot
|
|
62
|
-
dbt_test_helper.create_snapshot("snapshot_1", csv_data_base, csv_data_curr)
|
|
63
|
-
dbt_test_helper.create_model("use_snapshot", csv_data_base, csv_data_base, depends_on=["snapshot_1"])
|
|
64
|
-
|
|
65
|
-
node_ids = adapter.select_nodes("resource_type:snapshot")
|
|
66
|
-
assert len(node_ids) == 1
|
|
67
|
-
|
|
68
|
-
node_ids = adapter.select_nodes("resource_type:snapshot+")
|
|
69
|
-
assert len(node_ids) == 2
|
|
70
|
-
|
|
71
|
-
node_ids = adapter.select_nodes("state:modified,resource_type:snapshot")
|
|
72
|
-
assert len(node_ids) == 1
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def test_select_removed_by_graph(dbt_test_helper):
|
|
76
|
-
csv_data_curr = """
|
|
77
|
-
customer_id,name,age
|
|
78
|
-
1,Alice,30
|
|
79
|
-
2,Bob,25
|
|
80
|
-
3,Charlie,35
|
|
81
|
-
"""
|
|
82
|
-
|
|
83
|
-
csv_data_base = """
|
|
84
|
-
customer_id,name,age
|
|
85
|
-
1,Alice,35
|
|
86
|
-
2,Bob,25
|
|
87
|
-
3,Charlie,35
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
dbt_test_helper.create_model("customers_1", csv_data_base, csv_data_curr)
|
|
91
|
-
dbt_test_helper.create_model("customers_2", base_csv=csv_data_base, depends_on=["customers_1"])
|
|
92
|
-
dbt_test_helper.create_model("customers_3", curr_csv=csv_data_curr, depends_on=["customers_1"])
|
|
93
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
94
|
-
|
|
95
|
-
# Test graph operation
|
|
96
|
-
node_ids = adapter.select_nodes("customers_1+")
|
|
97
|
-
assert len(node_ids) == 3
|
|
98
|
-
node_ids = adapter.select_nodes("+customers_2")
|
|
99
|
-
assert len(node_ids) == 2
|
|
100
|
-
node_ids = adapter.select_nodes("+customers_3")
|
|
101
|
-
assert len(node_ids) == 2
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
def test_select_source_removed_by_graph(dbt_test_helper):
|
|
105
|
-
csv_data_curr = """
|
|
106
|
-
customer_id,name,age
|
|
107
|
-
1,Alice,30
|
|
108
|
-
2,Bob,25
|
|
109
|
-
3,Charlie,35
|
|
110
|
-
"""
|
|
111
|
-
|
|
112
|
-
csv_data_base = """
|
|
113
|
-
customer_id,name,age
|
|
114
|
-
1,Alice,35
|
|
115
|
-
2,Bob,25
|
|
116
|
-
3,Charlie,35
|
|
117
|
-
"""
|
|
118
|
-
|
|
119
|
-
dbt_test_helper.create_model("customers_2", base_csv=csv_data_base)
|
|
120
|
-
dbt_test_helper.create_model("customers_3", curr_csv=csv_data_curr)
|
|
121
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
122
|
-
|
|
123
|
-
# Test graph operation
|
|
124
|
-
node_ids = adapter.select_nodes("state:modified")
|
|
125
|
-
assert len(node_ids) == 2
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
def test_select_with_disabled(dbt_test_helper):
|
|
129
|
-
csv_data_curr = """
|
|
130
|
-
customer_id,name,age
|
|
131
|
-
1,Alice,30
|
|
132
|
-
2,Bob,25
|
|
133
|
-
3,Charlie,35
|
|
134
|
-
"""
|
|
135
|
-
|
|
136
|
-
csv_data_base = """
|
|
137
|
-
customer_id,name,age
|
|
138
|
-
1,Alice,35
|
|
139
|
-
2,Bob,25
|
|
140
|
-
3,Charlie,35
|
|
141
|
-
"""
|
|
142
|
-
|
|
143
|
-
dbt_test_helper.create_model("customers_1", csv_data_base, csv_data_curr)
|
|
144
|
-
dbt_test_helper.create_model("customers_2", csv_data_base, csv_data_curr, disabled=True)
|
|
145
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
146
|
-
|
|
147
|
-
# Test graph operation
|
|
148
|
-
node_ids = adapter.select_nodes("customers_1+")
|
|
149
|
-
assert len(node_ids) == 1
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
def test_select_with_pacakage_mode_include_exclude(dbt_test_helper):
|
|
153
|
-
csv_data_curr = """
|
|
154
|
-
customer_id,name,age
|
|
155
|
-
1,Alice,30
|
|
156
|
-
2,Bob,25
|
|
157
|
-
3,Charlie,35
|
|
158
|
-
"""
|
|
159
|
-
|
|
160
|
-
csv_data_base = """
|
|
161
|
-
customer_id,name,age
|
|
162
|
-
1,Alice,35
|
|
163
|
-
2,Bob,25
|
|
164
|
-
3,Charlie,35
|
|
165
|
-
"""
|
|
166
|
-
|
|
167
|
-
"""
|
|
168
|
-
The diagram of the models:
|
|
169
|
-
customers_1 ── customers_2 ── customers_3(*) ├── other_package.customers_4
|
|
170
|
-
└── customers_5
|
|
171
|
-
|
|
172
|
-
Only customers_3 is changed
|
|
173
|
-
"""
|
|
174
|
-
dbt_test_helper.create_model("customers_1", csv_data_base, csv_data_base)
|
|
175
|
-
dbt_test_helper.create_model("customers_2", csv_data_base, csv_data_base, depends_on=["customers_1"])
|
|
176
|
-
dbt_test_helper.create_model("customers_3", csv_data_base, csv_data_curr, depends_on=["customers_2"])
|
|
177
|
-
dbt_test_helper.create_model(
|
|
178
|
-
"customers_4", csv_data_base, csv_data_base, depends_on=["customers_3"], package_name="other_package"
|
|
179
|
-
)
|
|
180
|
-
dbt_test_helper.create_model("customers_5", csv_data_base, csv_data_base, depends_on=["customers_3"])
|
|
181
|
-
|
|
182
|
-
adapter: DbtAdapter = dbt_test_helper.context.adapter
|
|
183
|
-
|
|
184
|
-
node_ids = adapter.select_nodes(packages=["other_package"])
|
|
185
|
-
assert len(node_ids) == 1
|
|
186
|
-
|
|
187
|
-
node_ids = adapter.select_nodes(view_mode="changed_models")
|
|
188
|
-
assert len(node_ids) == 4
|
|
189
|
-
|
|
190
|
-
node_ids = adapter.select_nodes(view_mode="changed_models", packages=["other_package"])
|
|
191
|
-
assert len(node_ids) == 1
|
|
192
|
-
|
|
193
|
-
node_ids = adapter.select_nodes(view_mode="changed_models", packages=["other_package"], exclude="customers_4")
|
|
194
|
-
assert len(node_ids) == 0
|
|
195
|
-
node_ids = adapter.select_nodes(view_mode="changed_models", packages=["other_package"], select="customers_1+")
|
|
196
|
-
assert len(node_ids) == 1
|
|
197
|
-
node_ids = adapter.select_nodes(view_mode="changed_models", select="+customers_5")
|
|
198
|
-
assert len(node_ids) == 3
|
|
199
|
-
node_ids = adapter.select_nodes(view_mode="all", select="+customers_5")
|
|
200
|
-
assert len(node_ids) == 4
|
|
201
|
-
node_ids = adapter.select_nodes(select="+customers_5")
|
|
202
|
-
assert len(node_ids) == 4
|
tests/tasks/__init__.py
DELETED
|
File without changes
|
tests/tasks/conftest.py
DELETED