如何执行将多个 py 文件压缩为 zip 的 ETL 作业?

问题描述 投票:0回答:0

您将如何在 AWS Glue 中运行 ETL 作业,其中 .py 文件被压缩为 zip,py_files.zip?

config.json
init.py
transformations.py
udfs.py
output.py
main.py

main.py

from init import *
from transformations import *
from udfs import *
from output import *

这个作业设置是什么,如何在 ETL 脚本中设置它来实际运行作业? 我尝试将文件位置(S3 存储桶)作为 Python/Jar/Other lib 路径 并尝试通过导入将其导入 Glue 脚本:

胶水脚本:

from py_files import *

我对整个 ETL 过程很陌生,有哪些最佳实践来构建文件以避免只包含一个包含所有代码的长脚本?

python pyspark etl aws-glue
© www.soinside.com 2019 - 2024. All rights reserved.