Commit 2750214f authored by Chris Burr's avatar Chris Burr
Browse files

Merge branch 'support-transform_ids-input' into 'master'

Support transform_ids as input data

See merge request !42
parents f9a4de39 25744004
Pipeline #3521046 passed with stages
in 5 minutes and 35 seconds
......@@ -64,6 +64,9 @@ def prepare_test(production_name, job_name, dependent_input=None):
if "bk_query" in job_data["input"]:
params["bk_query"] = job_data["input"]["bk_query"]
elif "transform_ids" in job_data["input"]:
params["transform_ids"] = job_data["input"]["transform_ids"]
params["filetype"] = job_data["input"]["filetype"]
elif "job_name" in job_data["input"]:
dependent_job = job_data["input"]["job_name"]
# check we only need to handle one output
......@@ -83,7 +86,15 @@ def prepare_test(production_name, job_name, dependent_input=None):
f"Local input file not found for {job_name}, please check you have provided the correct path."
)
params["bk_query"] = prod_data[dependent_job]["input"]["bk_query"]
if "bk_query" in job_data["input"]:
params["bk_query"] = prod_data[dependent_job]["input"]["bk_query"]
elif "transform_ids" in job_data["input"]:
params["transform_ids"] = job_data[dependent_job]["transform_ids"]
params["filetype"] = job_data[dependent_job]["filetype"]
else:
raise NotImplementedError(
"Input requires either a bookkeeping location or a previous job name"
)
params["override_output_filetype"] = prod_data[dependent_job]["output"][0]
else:
raise NotImplementedError(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment