Skip to content

Commit 2b03153

Browse files
committed
Transformed files always JSON files
1 parent a329a99 commit 2b03153

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

abdiff/core/run_ab_transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ def get_transformed_filename(filename_details: dict) -> str:
318318
index=f"_{sequence}" if (sequence := filename_details["index"]) else "",
319319
)
320320
output_filename = (
321-
"{source}-{run_date}-{run_type}-{stage}-records-to-index{index}.{file_type}"
321+
"{source}-{run_date}-{run_type}-{stage}-records-to-{action}{index}.json"
322322
)
323323
return output_filename.format(
324324
source=filename_details["source"],
325325
run_date=filename_details["run-date"],
326326
run_type=filename_details["run-type"],
327327
stage=filename_details["stage"],
328328
index=filename_details["index"],
329-
file_type=filename_details["file_type"],
329+
action=filename_details["action"],
330330
)

tests/test_run_ab_transforms.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ def test_get_output_filename_success():
191191
"stage": "extracted",
192192
"action": "index",
193193
"index": None,
194-
"file_type": "xml",
194+
"file_type": "json",
195195
}
196196
)
197-
== "source-2024-01-01-full-transformed-records-to-index.xml"
197+
== "source-2024-01-01-full-transformed-records-to-index.json"
198198
)
199199

200200

@@ -297,8 +297,8 @@ def test_get_output_filename_indexed_success():
297297
"stage": "extracted",
298298
"action": "index",
299299
"index": "01",
300-
"file_type": "xml",
300+
"file_type": "json",
301301
}
302302
)
303-
== "source-2024-01-01-full-transformed-records-to-index_01.xml"
303+
== "source-2024-01-01-full-transformed-records-to-index_01.json"
304304
)

0 commit comments

Comments
 (0)