tests.system.amazon.aws.example_glue
¶
模块内容¶
函数¶
|
|
|
属性¶
- tests.system.amazon.aws.example_glue.EXAMPLE_CSV = 多行字符串[源代码]¶
显示值
"""product,value apple,0.5 milk,2.5 bread,4.0 """
- tests.system.amazon.aws.example_glue.EXAMPLE_SCRIPT = 多行字符串[源代码]¶
显示值
""" from pyspark.context import SparkContext from awsglue.context import GlueContext glueContext = GlueContext(SparkContext.getOrCreate()) datasource = glueContext.create_dynamic_frame.from_catalog( database='{db_name}', table_name='input') print('There are %s items in the table' % datasource.count()) datasource.toDF().write.format('csv').mode("append").save('s3://{bucket_name}/output') """