tests.system.amazon.aws.example_glue
¶
Module Contents¶
Functions¶
|
|
|
Attributes¶
- tests.system.amazon.aws.example_glue.EXAMPLE_CSV = Multiline-String[source]¶
Show Value
"""product,value apple,0.5 milk,2.5 bread,4.0 """
- tests.system.amazon.aws.example_glue.EXAMPLE_SCRIPT = Multiline-String[source]¶
Show Value
""" 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') """