Skip to content

Commit b822139

Browse files
Add missing query_text column to dbt_tests table
- Added query_text column to dbt_tests table schema - Updated flatten_test macro to use query_text instead of compiled_code - This ensures compatibility with Elementary internal data processing which expects query_text column in the dbt_tests artifact Fixes ELE-5137 Co-Authored-By: Yosef Arbiv <[email protected]>
1 parent 20b7637 commit b822139

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

macros/edr/dbt_artifacts/upload_dbt_tests.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
('package_name', 'string'),
3636
('type', 'string'),
3737
('original_path', 'long_string'),
38+
('query_text', 'long_string'),
3839
('path', 'string'),
3940
('generated_at', 'string'),
4041
('metadata_hash', 'string'),
@@ -177,7 +178,7 @@
177178
'package_name': node_dict.get('package_name'),
178179
'type': elementary.get_test_sub_type(original_file_path, test_namespace),
179180
'original_path': original_file_path,
180-
'compiled_code': elementary.get_compiled_code(node_dict),
181+
'query_text': elementary.get_compiled_code(node_dict),
181182
'path': node_dict.get('path'),
182183
'generated_at': elementary.datetime_now_utc_as_string(),
183184
'quality_dimension': unified_meta.get('quality_dimension') or elementary.get_quality_dimension(test_original_name, test_namespace),

0 commit comments

Comments
 (0)