initial stage
This commit is contained in:
parent
51b695c1b7
commit
ba37ed66eb
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import codecs
|
||||
import gzip
|
||||
import io
|
||||
import json
|
||||
|
@ -153,7 +154,7 @@ for config_name, config in configs.items():
|
|||
continue
|
||||
print(f'Processing {indexname}: {key}')
|
||||
s3_obj = hook.get_key(key, bucket_name=kwargs["params"]["EOSC_CATALOG_BUCKET"])
|
||||
with gzip.GzipFile(s3_obj.get()["Body"]) if key.endswith(".gz") else s3_obj.get()["Body"] as gzipfile:
|
||||
with gzip.GzipFile(s3_obj.get()["Body"]) if key.endswith(".gz") else codecs.getreader('utf-8')(s3_obj.get()["Body"]) as gzipfile:
|
||||
def _generate_data():
|
||||
buff = io.BufferedReader(gzipfile)
|
||||
for line in buff:
|
||||
|
|
Loading…
Reference in New Issue