Skip to content

Commit 00d1392

Browse files
test: Constant Resolution
1 parent 5726a26 commit 00d1392

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

metadata-ingestion/tests/integration/lookml/test_lookml.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ def test_view_to_view_lineage_and_lookml_constant(pytestconfig, tmp_path, mock_t
909909
pipeline = Pipeline.create(new_recipe)
910910
pipeline.run()
911911
pipeline.pretty_print_summary()
912-
pipeline.raise_from_status(raise_warnings=False)
912+
assert pipeline.source.get_report().warnings.total_elements == 1
913913

914914
golden_path = test_resources_dir / "vv_lineage_lookml_constant_golden.json"
915915
mce_helpers.check_golden_file(
@@ -1025,7 +1025,7 @@ def test_special_liquid_variables():
10251025
# Case 4: Non-existent constant in sql_table_name
10261026
(
10271027
{"sql_table_name": "SELECT * FROM @{nonexistent}"},
1028-
{"datahub_transformed_sql_table_name": "SELECT * FROM NULL"},
1028+
{"datahub_transformed_sql_table_name": "SELECT * FROM @{nonexistent}"},
10291029
False,
10301030
),
10311031
# Case 5: View with unsupported attribute

metadata-ingestion/tests/integration/lookml/vv-lineage-and-lookml-constant/star_award_winner.view.lkml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
view: star_award_winner {
2-
sql_table_name: @{customer_support_db}.@{customer_support_schema}.@{customer_support_table};;
2+
sql_table_name: @{customer_support_db}.@{customer_support_schema}.@{invalid_constant};;
33

44

55
dimension: id {

metadata-ingestion/tests/integration/lookml/vv_lineage_lookml_constant_golden.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"aspect": {
118118
"json": {
119119
"materialized": false,
120-
"viewLogic": "view: star_award_winner {\n sql_table_name: @{customer_support_db}.@{customer_support_schema}.@{customer_support_table};;\n\n\n dimension: id {\n label: \"id\"\n primary_key: yes\n type: number\n sql: ${TABLE}.id ;;\n }\n\n}",
120+
"viewLogic": "view: star_award_winner {\n sql_table_name: @{customer_support_db}.@{customer_support_schema}.@{invalid_constant};;\n\n\n dimension: id {\n label: \"id\"\n primary_key: yes\n type: number\n sql: ${TABLE}.id ;;\n }\n\n}",
121121
"viewLanguage": "lookml"
122122
}
123123
},
@@ -168,15 +168,15 @@
168168
"time": 1586847600000,
169169
"actor": "urn:li:corpuser:datahub"
170170
},
171-
"dataset": "urn:li:dataset:(urn:li:dataPlatform:postgres,star_award_winner_year.public.winner,PROD)",
171+
"dataset": "urn:li:dataset:(urn:li:dataPlatform:postgres,star_award_winner_year.public.@{invalid_constant},PROD)",
172172
"type": "VIEW"
173173
}
174174
],
175175
"fineGrainedLineages": [
176176
{
177177
"upstreamType": "FIELD_SET",
178178
"upstreams": [
179-
"urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:postgres,star_award_winner_year.public.winner,PROD),id)"
179+
"urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:postgres,star_award_winner_year.public.@{invalid_constant},PROD),id)"
180180
],
181181
"downstreamType": "FIELD",
182182
"downstreams": [

0 commit comments

Comments
 (0)