【发布时间】:2020-12-11 16:30:45
【问题描述】:
我正在从事一项 AWS Glue 工作,我有一个函数 "some_function",我想在 DynamicFrame dy_f 上应用该函数,但我还想将输入参数传递给 some_function。
Map.apply(frame=products_combination, f=search)
some_function 的定义是:
some_function(record, k)
到目前为止我已经尝试过: 作品:
Map.apply(frame=products_combination, f=search) ##provided i'm not taking k as input in some_function def as well
什么是错误:
Map.apply(frame=products_combination, f=search(k=10))
这会返回“TypeError: search() missing 1 required positional argument: 'record'”
如何将参数传递给 Map.apply 函数?我已经浏览了 [这里] 的文档,但在那里找不到我的解决方案。1
【问题讨论】:
标签: amazon-web-services pyspark aws-glue distributed-system aws-glue-spark