Skip to content

Commit 001e729

Browse files
authored
support DBT_ENGINE prefix for DBT_RECORDER env vars (#12149)
* support DBT_ENGINE prefix for DBT_RECORDER env vars * changelog entry
1 parent 7e10fc7 commit 001e729

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Support DBT_ENGINE prefix for record-mode env vars
3+
time: 2025-11-05T16:50:14.992799-05:00
4+
custom:
5+
Author: michelleark
6+
Issue: "12149"

core/dbt/cli/requires.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,16 @@ def setup_record_replay():
136136

137137
recorder: Optional[Recorder] = None
138138
if rec_mode == RecorderMode.REPLAY:
139-
previous_recording_path = os.environ.get("DBT_RECORDER_FILE_PATH")
139+
previous_recording_path = os.environ.get(
140+
"DBT_ENGINE_RECORDER_FILE_PATH"
141+
) or os.environ.get("DBT_RECORDER_FILE_PATH")
140142
recorder = Recorder(
141143
RecorderMode.REPLAY, types=rec_types, previous_recording_path=previous_recording_path
142144
)
143145
elif rec_mode == RecorderMode.DIFF:
144-
previous_recording_path = os.environ.get("DBT_RECORDER_FILE_PATH")
146+
previous_recording_path = os.environ.get(
147+
"DBT_ENGINE_RECORDER_FILE_PATH"
148+
) or os.environ.get("DBT_RECORDER_FILE_PATH")
145149
# ensure types match the previous recording
146150
types = get_record_types_from_dict(previous_recording_path)
147151
recorder = Recorder(

0 commit comments

Comments
 (0)