initial stage
This commit is contained in:
parent
921ce0bf48
commit
6b2ef00c25
|
@ -132,8 +132,8 @@ def import_EOSC_graph():
|
||||||
for entity in ENTITIES:
|
for entity in ENTITIES:
|
||||||
keys = hook.list_keys(bucket_name=S3_BUCKET_NAME, prefix=f'{entity}/')
|
keys = hook.list_keys(bucket_name=S3_BUCKET_NAME, prefix=f'{entity}/')
|
||||||
to_delete = list(filter(lambda key: key.endswith('.PROCESSED'), keys))
|
to_delete = list(filter(lambda key: key.endswith('.PROCESSED'), keys))
|
||||||
if len(to_delete) > 0:
|
for obj in to_delete:
|
||||||
hook.delete_objects(bucket=S3_BUCKET_NAME,keys=to_delete)
|
hook.delete_objects(bucket=S3_BUCKET_NAME,keys=obj)
|
||||||
for key in keys:
|
for key in keys:
|
||||||
if key.endswith('.gz'):
|
if key.endswith('.gz'):
|
||||||
pieces.append((entity, key))
|
pieces.append((entity, key))
|
||||||
|
|
Loading…
Reference in New Issue