acdc_aws_etl_pipeline 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- acdc_aws_etl_pipeline/upload/metadata_submitter.py +13 -11
- {acdc_aws_etl_pipeline-0.4.0.dist-info → acdc_aws_etl_pipeline-0.4.2.dist-info}/METADATA +1 -1
- {acdc_aws_etl_pipeline-0.4.0.dist-info → acdc_aws_etl_pipeline-0.4.2.dist-info}/RECORD +4 -4
- {acdc_aws_etl_pipeline-0.4.0.dist-info → acdc_aws_etl_pipeline-0.4.2.dist-info}/WHEEL +0 -0
|
@@ -365,7 +365,7 @@ def create_gen3_submission_class(api_key: dict, api_endpoint: str):
|
|
|
365
365
|
submit = None
|
|
366
366
|
|
|
367
367
|
try:
|
|
368
|
-
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix=".json") as tmp_file:
|
|
368
|
+
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix=".json", dir="/tmp") as tmp_file:
|
|
369
369
|
json.dump(api_key, tmp_file)
|
|
370
370
|
tmp_api_key_path = tmp_file.name
|
|
371
371
|
auth = Gen3Auth(refresh_file=tmp_api_key_path)
|
|
@@ -393,6 +393,7 @@ def submit_metadata(
|
|
|
393
393
|
max_size_kb: int = 50,
|
|
394
394
|
exclude_nodes: list = None,
|
|
395
395
|
max_retries: int = 5,
|
|
396
|
+
write_submission_results_path: str = None
|
|
396
397
|
):
|
|
397
398
|
"""
|
|
398
399
|
Submit a set of metadata JSON files to a Gen3 data commons endpoint, in order.
|
|
@@ -490,16 +491,17 @@ def submit_metadata(
|
|
|
490
491
|
res = submit.submit_record("program1", project_id, jsn)
|
|
491
492
|
|
|
492
493
|
# writing submission results as log json
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
494
|
+
if write_submission_results_path is not None:
|
|
495
|
+
log_filename = os.path.join(
|
|
496
|
+
log_dir, f"{project_id}_{node}_split{index + 1}_of_{n_json_data}.json"
|
|
497
|
+
)
|
|
498
|
+
abs_log_filename = os.path.abspath(log_filename)
|
|
499
|
+
with open(abs_log_filename, "a") as f:
|
|
500
|
+
json.dump(res, f)
|
|
501
|
+
f.write("\n")
|
|
502
|
+
logger.info(
|
|
503
|
+
f"Wrote submission response to log file: {abs_log_filename}"
|
|
504
|
+
)
|
|
503
505
|
|
|
504
506
|
logger.info(
|
|
505
507
|
f"\033[92m[SUCCESS]\033[0m | Project: {project_id:<10} | "
|
|
@@ -3,12 +3,12 @@ acdc_aws_etl_pipeline/ingest/ingest.py,sha256=0meo4Sq6o0EPvgfFu0QPMQ5ZEHDiSEMsVG
|
|
|
3
3
|
acdc_aws_etl_pipeline/upload/__init__.py,sha256=kRI1wozjK-b9YXMAPwzWHzm967ZiUAM6g8rRo4ONWtI,67
|
|
4
4
|
acdc_aws_etl_pipeline/upload/gen3datasubmitter.py,sha256=bu5d8IOsKFIA1uvvzaxb7YIKwBZKdP-0QvBt-gZMyUc,8625
|
|
5
5
|
acdc_aws_etl_pipeline/upload/metadata_deleter.py,sha256=T4q9xqSE2Beu3zluvAmKh7wJWcCFGz2AZ9h9ZcASfyA,63
|
|
6
|
-
acdc_aws_etl_pipeline/upload/metadata_submitter.py,sha256=
|
|
6
|
+
acdc_aws_etl_pipeline/upload/metadata_submitter.py,sha256=9ms1X3rjP4INGfNSr4GsM6FkTOfT3JRF3PxAN6pisFE,20316
|
|
7
7
|
acdc_aws_etl_pipeline/upload/upload_synthdata_s3.py,sha256=Ge5TQzZkWnJNp-q0Ak-Yhv1h1eWLxg-PlWVHrd1m0B8,5155
|
|
8
8
|
acdc_aws_etl_pipeline/utils/athena_utils.py,sha256=QJlBe-07Hkq-BqmcxBu6ZtAmVfZSHuSY4dijcysgPH8,29560
|
|
9
9
|
acdc_aws_etl_pipeline/utils/dbt_utils.py,sha256=5XRFOwNNIeuW2sQuor3h_OZTuXGg6xv2AUYwj9bMAAM,2054
|
|
10
10
|
acdc_aws_etl_pipeline/utils/release_writer.py,sha256=vsxHJ6l-UWPpzeyEPHurX5iFgeCEQ-9FbySAbPNfTTM,7555
|
|
11
11
|
acdc_aws_etl_pipeline/validate/validate.py,sha256=fTa76YvixCWOGkAIuR7CZ2WryMJcpc2wvSOHLZDEknc,28159
|
|
12
|
-
acdc_aws_etl_pipeline-0.4.
|
|
13
|
-
acdc_aws_etl_pipeline-0.4.
|
|
14
|
-
acdc_aws_etl_pipeline-0.4.
|
|
12
|
+
acdc_aws_etl_pipeline-0.4.2.dist-info/METADATA,sha256=Kzc0tDdxnD6OBHLZnOwbzw1MEwCdLG521YPFPttK1Jw,2853
|
|
13
|
+
acdc_aws_etl_pipeline-0.4.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
14
|
+
acdc_aws_etl_pipeline-0.4.2.dist-info/RECORD,,
|
|
File without changes
|